This is the mail archive of the
mailing list for the binutils project.
Re: [patch] Nios II build_id fix
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: Cesar Philippidis <cesar at codesourcery dot com>, <binutils at sourceware dot org>, Alan Modra <amodra at gmail dot com>
- Date: Sat, 5 Apr 2014 21:16:10 -0600
- Subject: Re: [patch] Nios II build_id fix
- Authentication-results: sourceware.org; auth=none
- References: <533EF156 dot 3030504 at codesourcery dot com> <20140405013150 dot GI18201 at bubble dot grove dot modra dot org>
On 04/04/2014 07:31 PM, Alan Modra wrote:
On Fri, Apr 04, 2014 at 10:52:22AM -0700, Cesar Philippidis wrote:
@@ -2016,6 +2016,10 @@ nios2_elf32_build_stubs (struct bfd_link
+ /* Ignore non-stub sections. */
+ if (!strstr (stub_sec->name, STUB_SUFFIX))
Um, how do you manage to get non-stub sections in the stub bfd? Hmm,
via dynobj being set to the stub bfd, I expect. If so, you could
probably test (stub_sec->flags & SEC_LINKER_CREATED) == 0 instead.
I had the same question when looking at this code. I think this also
suffers from the same bug (PR 13049) mentioned in the comment on
STUB_SUFFIX in elf32-arm.c.
Hmmmm. I see that stub sections are being created without
SEC_LINKER_CREATED (ld/emultempl/nios2elf.em), while dynamic sections
created in dynobj do have that flag by default (from
ELF_DYNAMIC_SEC_FLAGS). Other sections that end up in dynobj maybe do,
maybe don't -- it doesn't seem like a reliable way to distinguish stub
sections from anything else, at least.
Maybe we could define a new section flag for actual stub sections?
That's a target-independent change (bfd/section.c) and I couldn't
approve it. Alan, WDYT?
Otherwise, I suppose we're stuck with the same band-aid in the ARM