[PATCH] D46200: Mitigate relocation overflow [part 2 of 2]
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 17 02:28:20 PDT 2018
grimar added a comment.
It looks a bit hacky. But I think it should work. Rui, what do you think?
================
Comment at: ELF/Writer.cpp:1710
+ OutputSection *DefaultOutSec;
+ if (Config->Pic || !(DefaultOutSec = findSection(".text")))
+ DefaultOutSec = Out::ElfHeader;
----------------
We do not write like that I think: `!(DefaultOutSec = findSection(".text")`.
Please move the assignment to the `DefaultOutSec` outside of the `if`.
I think `".text"` can be a default for both `Pic` and `!Pic` probably.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D46200
More information about the llvm-commits
mailing list