Relax relocation type checking in a non-ALLOC section.
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. I believe 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 to fix a program because it's not always easy. This patch relaxes the error checking and emit a warning instead. Differential Revision: https://reviews.llvm.org/D43351 llvm-svn: 325307
Loading
Please sign in to comment