[llvm-bugs] [Bug 34058] New: missing error on reference to undefined weak symbol
llvm-bugs at lists.llvm.org
Thu Aug 3 15:24:01 PDT 2017
Bug ID: 34058
Summary: missing error on reference to undefined weak symbol
Assignee: unassignedbugs at nondot.org
Reporter: rafael.espindola at gmail.com
CC: llvm-bugs at lists.llvm.org
bfd ld with -shared will produce an error on
leaq foo(%rip), %rax
That is reasonable. The value of foo is zero, and we will not be able to
compute that a runtime. The intention of the leaq was probably to check the
value of foo in the first place.
The problem is that it should *not* produce an error if the leaq is replaced
with a call. The logic being that the call will be guarded:
Unfortunately, on x86_64 at least, both constructs produce the same relocation.
It just seems too fuzzy to have the linker parse the instruction using the
I am reporting the bug in case someone has a better idea on how to implement
this or if some other architecture does have different relocations.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs