[PATCH] D40735: [LLD][ELF] InX::BssRelRo should check section contents before marking relro
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 4 07:38:44 PST 2017
jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.
LGTM, with one minor test comment inline.
To summarise the new behaviour as I understand it: "if linker script includes .bss.rel.ro in a section named something else and isn't otherwise relro, then don't treat it as relro". Assuming that's correct, I think that's fine. In my view, if you've written a linker script like that, you've done so deliberately, and don't want the linker preventing you having output as you requested. Yes, it means that there's a theoretical security hole, but you did ask for it, so it's not for the linker to judge.
================
Comment at: test/ELF/relro-copyrel-bss-script.s:24-25
+
+ .data
+ .space 4
+
----------------
Does this bit do anything in the test? If not, please delete it. If it does, please comment on its purpose.
https://reviews.llvm.org/D40735
More information about the llvm-commits
mailing list