[PATCH] D43351: Relax relocation type checking in a non-ALLOC section.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 15 13:25:25 PST 2018
ruiu created this revision.
ruiu added reviewers: rafael, grimar.
Herald added subscribers: arichardson, emaste.
Even though it doesn't make sense, there seems to be multiple programs
in the wild that create PC-relative relocations in non-ALLOC sections.
This is caused by the negligence of GNU linkers to not report any errors
for such relocations.
Currently, lld emits warnings against such relocations and exits.
So, you cannot link any program that contains wrong relocations until
you fix an issue in a program that generates wrong ELF files. It's often
impractical because it isn't always easy to fix a problem in a ELF-
generating program.
This patch relaxes the error checking and emit a warning instead.
https://reviews.llvm.org/D43351
Files:
lld/ELF/InputSection.cpp
lld/test/ELF/invalid/invalid-debug-relocations.test
lld/test/ELF/non-abs-reloc.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43351.134499.patch
Type: text/x-patch
Size: 4223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180215/b43a2a9f/attachment.bin>
More information about the llvm-commits
mailing list