This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Building symbol table
- From: Alan Modra <amodra at gmail dot com>
- To: Jan Smets <jan dot smets at alcatel-lucent dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 20 Nov 2012 12:03:37 +1030
- Subject: Re: Building symbol table
- References: <50A397D4.3090202@alcatel-lucent.com>
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