[lld] [LLD][AArch64][ARM] Delay adding long thunk mapping symbols (PR #116975)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 09:21:00 PST 2024


MaskRay wrote:

> This removes the FIXME in the newly added aarch64-thunk-bti-multipass.s test. I've updated all the Arm thunks that have additional mapping symbols using the same pattern. I've not written any additional tests for all the Arm as these are quite difficult to write. I can add tests for some or all of these if necessary.
> 
> I considered an alternative approach of adding a finalize() member function to ThunkSection and having that be called once per ThunkSection, that would then know for sure whether a thunk is short or long and could add the additional symbols. That would require another pass through all the input sections to find the ThunkSections though so unless we need finalize for something else I went with adding the additional symbols when we transition from short to long.

Thanks. The current approach looks good to me.

It may be worth mentioning #108989 and aarch64-thunk-bti-multipass.s in the description.

https://github.com/llvm/llvm-project/pull/116975


More information about the llvm-commits mailing list