bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/18147] gold should not issue relocation overflow error with --


From: amodra at gmail dot com
Subject: [Bug gold/18147] gold should not issue relocation overflow error with --unresolved-symbols=ignore-all
Date: Fri, 20 Mar 2015 12:16:20 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18147

--- Comment #3 from Alan Modra <amodra at gmail dot com> ---
Here is my thinking, FWIW.

What is the value of an undefined symbol?

Why should a branch to zero not report an overflow, if there is indeed an
overflow?

Try linking the same testcase on x86_64, but with -Ttext=0x100000000.

ld/ld-new -o pr18147 pr18147.o --unresolved-symbols=ignore-all
-Ttext=0x100000000
ld/ld-new: warning: cannot find entry symbol _start; defaulting to
0000000100000000
pr18147.o: In function `f1':
pr18147.c:(.text+0x3): relocation truncated to fit: R_X86_64_PC32 against
undefined symbol `f2'

gold on x86_64 doesn't report an error, but that is simply because gold on
x86_64 doesn't report relocation overflows, a serious defect IMO.

gold/ld-new -o pr18147 pr18147.o --defsym f2=0 -Ttext=0x100000000
=> no error

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]