[PATCH] D45642: [PPC64] V2 abi: Add glink section for lazy symbol resolution.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 4 15:01:33 PDT 2018
ruiu added inline comments.
================
Comment at: ELF/Arch/PPC64.cpp:198
+ int64_t GotPltOffset = InX::GotPlt->getVA() - (InX::Plt->getVA() + 8);
+ write64(Buf + 52, GotPltOffset);
+}
----------------
sfertile wrote:
> ruiu wrote:
> > Looks like you set 60 to `PltHeaderSize` but you are using only the first 56 bytes. Is this intentional?
> I'm writing a 64 bit offset to `Buf + 52`, so the whole 60 bytes are used.
Ah. I stand corrected!
================
Comment at: ELF/SyntheticSections.cpp:882-883
GotPltSection::GotPltSection()
- : SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS,
- Target->GotPltEntrySize, ".got.plt") {}
+ : SyntheticSection(SHF_ALLOC | SHF_WRITE,
+ Config->EMachine == EM_PPC64 ? SHT_NOBITS : SHT_PROGBITS,
+ Target->GotPltEntrySize,
----------------
sfertile wrote:
> ruiu wrote:
> > BSS-ish .got.plt looks pretty odd. Is this really what the spec says? It at least needs some explanation in comment for a reader.
> yeah this is odd, I don't know why its made to look like a .bss section but it is specified by the abi (both V1 and V2 64 bit abis as well as the 32 bit abi I believe)
Can you add this comment as a code comment? I believe honest comment like that will be useful in the future.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D45642
More information about the llvm-commits
mailing list