[PATCH] D150631: [LLD] Emit DT_PPC64_OPT into the dynamic section
Stefan Pintilie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 13:30:05 PDT 2023
stefanp added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:1535
+ // There may be multiple TOCs due to emitting thunks for some NOTOC relocs.
+ if (config->emachine == EM_PPC64)
+ addInt(DT_PPC64_OPT, getPPC64TargetInfo()->dynamicSectionOptFlags);
----------------
MaskRay wrote:
> Does GNU ld emit this dynamic tag when it is 0? An alternative is to omit this entry if 0.
I checked this with `GNU ld (GNU Binutils) 2.37.20220122` on a PowerPC machine.
It looks like that version of ld does generate the dynamic tag even for 0.
I used the test `test/ELF/ppc64-plt-stub.s` which generates `0x0000000070000003 (PPC64_OPT) 0x0` with both this patch and `ld`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150631/new/
https://reviews.llvm.org/D150631
More information about the llvm-commits
mailing list