[PATCH] D30256: [ELF] - Implemented -z noreloc-overflow.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 13:38:00 PST 2017
>> So I think the answer is that the GNU linker doesn't warn on text relocations at all.
>
>Yes, until I add -z text, which I belive exist exactly for that.
>
>ld.bfd test.o -shared -o out -z text
>ld.bfd: test.o: warning: relocation against `_start' in readonly section `.text'
>ld.bfd: read-only segment has dynamic relocations.
>
>George.
In addition they have --warn-shared-textrel for emiting warnings:
ld.bfd test.o -shared -o out --warn-shared-textrel
ld.bfd: test.o: warning: relocation against `_start' in readonly section `.text'
ld.bfd: warning: creating a DT_TEXTREL in a shared object.
George.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170222/168328cd/attachment.html>
More information about the llvm-commits
mailing list