http://sourceware.org/bugzilla/show_bug.cgi?id=14814
Bug #: 14814
Summary: problem in linking files which contain some farcall
instructions with -r
Product: binutils
Version: 2.22
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
These are three test cases that triggers the bug
The back end of the GCC compiler is arm
=========================
a.s
.global _start
.text
_start:
bl bar_b
bl bar_c
=========================
b.s
.global bar_b
bar_b:
bx lr
=========================
c.s
.global bar_c
.space 0x02000008
bar_c:
bx lr
Instruction BL bar_c in a.s is a farcall instruction
First use assemble them individually,then we got a.o,b.o,c.o
Then link a.o c.o with -r,and got ac.o
But when link ac.o with b.o,the linker emits these
ac.o: In function `_start':
c.c:(.text+0x0): relocation truncated to fit: R_ARM_CALL against symbol
`bar_b' defined in .text section in b.o
c.c:(.text+0x4): relocation truncated to fit: R_ARM_CALL against symbol
`bar_c' defined in .text section in ac.o
When I change the link order like this
ld a.o b.o -o ab.o
ld ab.o c.o -o abc.out
The linker works.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils