[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/14814] New: problem in linking files which contain some farcall
From: |
tanjinfa at huawei dot com |
Subject: |
[Bug ld/14814] New: problem in linking files which contain some farcall instructions with -r |
Date: |
Wed, 07 Nov 2012 12:03:38 +0000 |
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: address@hidden
ReportedBy: address@hidden
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 ld/14814] New: problem in linking files which contain some farcall instructions with -r,
tanjinfa at huawei dot com <=