[PATCH] D41613: [ELF] - Do not use HeaderSize for conditions in PltSection.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 28 02:45:49 PST 2017
grimar created this revision.
grimar added reviewers: ruiu, rafael.
Herald added subscribers: kbarton, nemanjai, emaste.
Found this during experiments with refactoring.
Our PltSection code assumes that InX::Iplt section has zero header size
and that InX::Plt always has non-zero header:
https://github.com/llvm-mirror/lld/blob/master/ELF/SyntheticSections.cpp#L1870
But PPC64 target sets PltHeaderSize to zero:
https://github.com/llvm-mirror/lld/blob/master/ELF/Arch/PPC64.cpp#L68
(I could be wrong about reasons, but I think PPC64 target just does not
implement lazy binding).
Because of that, ppc64-toc-restore.s testcase, for example, sets `IsInIplt` flag for
symbols, what does not seem to be correct.
I suggest to stop using `HeaderSize == 0` in code as condition to find out whether
we are in Plt or Iplt section.
https://reviews.llvm.org/D41613
Files:
ELF/SyntheticSections.cpp
ELF/SyntheticSections.h
ELF/Writer.cpp
test/ELF/ppc64-ifunc.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41613.128277.patch
Type: text/x-patch
Size: 4302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171228/6582dde3/attachment.bin>
More information about the llvm-commits
mailing list