arm-ld, -q and interworking code

tanaka tanaka@personal-media.co.jp
Fri Apr 9 04:49:00 GMT 2004


I want to execute a program which includes ARM/THUMB interworking code, 
on some systems.
The system require relocatable format program.
The program which includes only ARM code already runs fine.

tanaka

Daniel Jacobowitz wrote:
> On Fri, Apr 09, 2004 at 11:34:18AM +0900, tanaka wrote:
> 
>>Thanks for your reply.
>>
>>ld's help says,
>>
>>> -q, --emit-relocs           Generate relocations in final output
>>
>>so, ld should emit relocation information at the offset 00000014, 
>>shouldn't it?
> 
> 
> That's debatable.  What it actually means is, relocations from the
> input files are preserved in the output.
> 
> 
>>best regards.
>>
>>------
>>tanaka
>>
>>
>>
>>Daniel Jacobowitz wrote:
>>
>>>On Wed, Apr 07, 2004 at 02:06:49PM +0900, tanaka wrote:
>>>
>>>
>>>>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?
>>>
>>>
>>>No.  Or at least, not really.
>>>
>>>
>>>
>>>>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
>>>>-----------------------------------
>>>
>>>
>>>This is a statically linked executable.  The linker fills in the
>>>address of main, but has no reason to use a relocation to do so.
>>>
>>
>>
>>
> 




More information about the Binutils mailing list