porting assembly file to compiled using GNU linker rather than ARMLINK
benjaminlee001@shaw.ca
benjaminlee001@shaw.ca
Fri Feb 28 23:57:00 GMT 2003
Hi all,
I've got a question regarding the use of GNU linker.
I am trying to compile an assembler file using GNU as and ld. The file is a file to setup the C envoirnment and is originally built using ARM SDT armasm and armlink. I've changed all the directives in the file so that it would compile under GNU as. But when I try to link the file together with other source files, it gives me a message saying that "undefined reference to `Image$$RO$$Limit'" in that file. The symbol "Image$$RO$$Limit'" represents the code size and is determined at link time by armlink. So how can I get GNU linker to define the symbol at link time so I can build the object file successfully? The portion of code that contains that symbol is listed below.
> IMPORT |Image$$RO$$Limit| ; End of ROM code (=start of ROM data)
> IMPORT |Image$$RW$$Base| ; Base of RAM to initialise
> IMPORT |Image$$ZI$$Base| ; Base and limit of area
> IMPORT |Image$$ZI$$Limit| ; to zero initialise
>
> LDR r0, =|Image$$RO$$Limit| ; Get pointer to ROM data
> LDR r1, =|Image$$RW$$Base| ; and RAM copy
> LDR r3, =|Image$$ZI$$Base| ; Zero init base to top of initialised data
> CMP r0, r1 ; Check that they are different
> BEQ %F1
>0 CMP r1, r3 ; Copy init data
> LDRCC r2, [r0], #4
> STRCC r2, [r1], #4
> BCC %B0
>1 LDR r1, =|Image$$ZI$$Limit| ; Top of zero init segment
> MOV r2, #0
>2 CMP r3, r1 ; Zero init
> STRCC r2, [r3], #4
> BCC %B2
Please help me out on this,
Thank you so much,
Ben
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list