[lld] [LLD][ELF][AArch64] Discard .ARM.attributes sections (PR #125838)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 07:31:39 PST 2025


smithp35 wrote:

> My preference would be to revert the breaking change and find the proper solution (fix all the linkers, apply shf_exclude, put behind a flag..) without time pressure. Especially since it landed before the branch point.
> 
> But if you think this is better, please land it so at least lld users get fixed :)

FWIW I've just checked GNU ld. It does already have some code for SHT_AARCH64_ATTRIBUTES as the section name has been reserved since the initial AArch64 ABI. This has the same effect as the lld patch above.
https://github.com/bminor/binutils-gdb/blob/master/bfd/elfnn-aarch64.c#L8383 

So I think that leaves us with people building clang alone, and then using an older lld. I'm hopeful that I can add SHF_EXCLUDE to the spec so that we can make sure old LLD does not accumulate the sections.

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


More information about the llvm-commits mailing list