This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
arm-ld, -q and interworking code
- From: tanaka <tanaka at personal-media dot co dot jp>
- To: binutils at sources dot redhat dot com
- Date: Wed, 07 Apr 2004 14:06:49 +0900
- Subject: arm-ld, -q and interworking code
Hello,
LD for ARM does not emits relocation information for the address
which is in the interworking code When executed with -q option.
>------------ test.r --------------
>test: file format elf32-littlearm
>
>RELOCATION RECORDS FOR [.text]:
>OFFSET TYPE VALUE
>00000000 R_ARM_PC24 main
I think
00000014 ?????? ?????
is missing. Is this bug?
---------- Environment -----------
Linux-2.4.20-8
Configured with: ../gcc-3.3.2/configure
--prefix=/work/linux/tool/Linux-i686 --target=arm-unknown-elf
--enable-interwork --with-gnu-as --with-gnu-ld --disable-threads
--enable-languages=c,c++
Thread model: single
gcc version 3.3.2
GNU assembler version 2.14 (arm-unknown-elf) using BFD version 2.14 20030612
GNU ld version 2.14 20030612
----------------------------------
------------ crt.S ---------------
.text
.global _start
.type _start, function
.balign 4
_start:
b main
------------ main.c --------------
int main()
{
return 0;
}
----------- command --------------
./arm-unknown-elf-gcc -mthumb-interwork -c crt0.S -o crt0.o
./arm-unknown-elf-gcc -fomit-frame-pointer -mthumb -mthumb-interwork -c
main.c -o main.o
./arm-unknown-elf-gcc -Wl,-q -Wl,-Ttext,0x100000 -mthumb-interwork
-nostdlib crt0.o main.o -o test
./arm-unknown-elf-objdump -r test > test.r
./arm-unknown-elf-objdump -S --disassemble-zeroes test >> test.r
------------ test.r --------------
test: file format elf32-littlearm
RELOCATION RECORDS FOR [.text]:
OFFSET TYPE VALUE
00000000 R_ARM_PC24 main
test: file format elf32-littlearm
Disassembly of section .text:
00100000 <_start>:
100000: ea000001 b c <_stack-0x7fff4>
00100004 <main>:
100004: 2300 mov r3, #0
100006: 1c18 mov r0, r3 (add r0, r3, #0)
100008: 4770 bx lr
10000a: 46c0 nop (mov r8, r8)
0010000c <__main_from_arm>:
10000c: e59fc000 ldr ip, [pc, #0] ; 100014 <__main_from_arm+0x8>
100010: e12fff1c bx ip
100014: 00100005 andeqs r0, r0, r5
-----------------------------------
best regards.
------
tanaka