Linking to rom code symbols

Mike Frysinger vapier@gentoo.org
Fri Nov 13 03:32:00 GMT 2009


On Thursday 12 November 2009 20:27:56 Fabrice Gautier wrote:
> I'm trying to find an efficient and convenient way to link a aplication
> to rom code.
> 
> The rom code is compiled as a rom.elf file.

presumably the ROM api is largely fixed, as is the address where it lives.  so 
create a header file that declares const function pointers with a fixed 
address.  then all your C code will simply call that address directly.

if your ROM doesnt have any sort of stable abi, i imagine you could write a 
script that converts the final linked addresses into a C header file.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20091113/0895da73/attachment.sig>


More information about the Binutils mailing list