When the target saves ElfSym::GlobalOffsetTable in the .got rather than .got.plt, Target->GotHeaderEntriesNum states the number of extra entries required in the .got. Rather than having to add Target->GotHeaderEntriesNum to NumEntries in every function which refers to NumEntries, this patch changes the initial value of NumEntries in the constructor. We now add Target->GotHeaderEntriesNum to NumEntries in the constructor if the target saves the GlobalOffsetTable in the .got
Details
Details
- Reviewers
ruiu sfertile rdhindsa • espindola - Commits
- rGc65ae14766f0: [ELF] GotSection increment NumEntries when Target saves GlobalOffsetTable in…
rLLD328559: [ELF] GotSection increment NumEntries when Target saves GlobalOffsetTable in…
rL328559: [ELF] GotSection increment NumEntries when Target saves GlobalOffsetTable in…
Diff Detail
Diff Detail
Event Timeline
ELF/SyntheticSections.cpp | ||
---|---|---|
591–592 ↗ | (On Diff #139324) | This comment just explains what the following code does, so it's not that useful. Please explain why we are doing this instead of what. Also, please avoid explaining things too abstractly. The target that saves the global offset table to the first entry in the .got is PPC64 only, so please directly say so. |
593 ↗ | (On Diff #139324) | Is this possible that GlobalOffsetTable is not defined? |