Building symbol table

Alan Modra amodra@gmail.com
Tue Nov 20 01:33:00 GMT 2012


On Wed, Nov 14, 2012 at 02:08:36PM +0100, Jan Smets wrote:
> I was exploring different ideas:
>  a) include the .symtab/etc sections in my data segment and use a
> linker script to PROVIDE() pointers to the beginning/end of the
> tables.
>     This didn't work.
> 
>  b) Make a binary dump of the .shstrtab/.symtab/.strtab sections of
> my ELF executable and push that binary data to my board in a similar
> way as my text/data segments.
> 
>   I was hoping that  objcopy  -j .strtab -j .symtab <in> <out> -O
> binary would get my that.

No, this approach won't work.  Special sections like these are not
seen by BFD as being sections in the usual sense, so objdump, objcopy,
ld etc. can't manipulate them like .text or .data.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list