This is the mail archive of the
mailing list for the binutils project.
Re: ld - references to merged SEC_MERGED .debug_str not adjusted
- From: Paul Shortis <pshortis at dataworx dot com dot au>
- To: binutils at sourceware dot org
- Date: Wed, 14 May 2014 19:20:43 +1000
- Subject: Re: ld - references to merged SEC_MERGED .debug_str not adjusted
- Authentication-results: sourceware.org; auth=none
- References: <5372A30D dot 6060302 at dataworx dot com dot au>
- Reply-to: pshortis at dataworx dot com dot au
I forgot, binutils 2.23
On 14/05/14 08:56, Paul Shortis wrote:
I've ported bfd, gas etc to my custom processor, and all is
functioning well with one exception ...
I've trimmed down a test case to ...
int main( int argc, char *argv)
The object file produced by gcc/gas looks fine with indirect
string offsets in .debug_info pointing to the correct places in
However after linking to create a binary, dumping the binary
reveals that unused entries in .debug_str have been deleted (I
assume because this is a SEC_MERGE section), however the
indirect string offsets in .debug_info that point into
.debug_str haven't been adjusted and are therefore invalid.
gdb, of course objects to loading the linked binary.
I've started stepping through ld execution to see what is
happening but I could lose a few days familiarizing myself with
I'm assuming I'm repeating some sort of a newbie blunder but
Google hasn't been helpful. Does anyone have any pointers that
may get me closer to a solution to the problem ?