This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld - references to merged SEC_MERGED .debug_str not adjusted
- From: Alan Modra <amodra at gmail dot com>
- To: Paul Shortis <pshortis at dataworx dot com dot au>
- Cc: binutils at sourceware dot org
- Date: Fri, 16 May 2014 16:54:39 +0930
- 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>
On Wed, May 14, 2014 at 08:56:13AM +1000, Paul Shortis wrote:
> 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.
Presumably you have relocations on the .debug_info pointers to
.debug_str.. Are those relocs against the .debug_str section symbol?
Do you use _bfd_elf_rela_local_sym (or _bfd_elf_rel_local_sym) to
adjust the reloc addends?
--
Alan Modra
Australia Development Lab, IBM