[lld] [LLD][ELF][AArch64] Add BTI Aware long branch thunks (PR #108989)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 21 13:34:40 PDT 2024


MaskRay wrote:

> Hmm, the tests are passing on my local linux machine, not sure what has happened with Windows. Will need to try and find a Windows machine and investigate.
> 
> [UPDATE] It looks like it is due to the positioning of the .dynstr section, the test's .dynamic section has a DT_NEEDED which has a file path in it, this will affect the offset between the .plt and .got.plt. I'll update the test to be more robust.

If an output DSO is used to link another component, we do `ld.lld -shared -soname=t.so ... -o %t.so` to ensure that the DT_NEEDED entry needs a fixed-length .dynstr entry.

This is error-prone, which is one of the reasons I prefer `rm -rf %t && split-file %s %t && cd %t` :)

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


More information about the llvm-commits mailing list