[PATCH] D41551: [ELF] - Allow relocation to a weak undefined symbol when -z notext is given.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 26 00:27:06 PST 2017


grimar added a comment.

In https://reviews.llvm.org/D41551#963986, @emaste wrote:

> Conflicts after https://reviews.llvm.org/rL321430. I tried a straightforward rebase (moving the `if ((S.Flags & SHF_WRITE) || !Config->ZText)` block below `if (Sym.isUndefWeak())` but `test/ELF/retain-und.s` (from https://reviews.llvm.org/rL293093) fails.


That testcase looks close to what this patch trying to fix. It contains weak undef.
Both gold and bfd of v2.29.51.20171006 does not produce relocation for that testcase.

It seems to me we should fix that testcase as well. I'll rebase this patch now.


https://reviews.llvm.org/D41551





More information about the llvm-commits mailing list