This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Question about your patch
- From: Catherine Moore <clm at codesourcery dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Catherine Moore <clm at codesourcery dot com>, binutils at sourceware dot org
- Date: Tue, 27 Jan 2009 11:05:49 -0500
- Subject: Question about your patch
Hi Nick --
I'm looking at a change that you made to elf32-arm.c back in November as part of this patch:
bfd/ChangeLog
2008-11-25 Nick Clifton <nickc@redhat.com>
* elflink.c (is_reloc_section): New function. Returns true if the
given name matches the name of the reloc-containing section
associated with the given section.
<lots of stuff deleted>
The part that I'm interested in is in elf32_arm_check_relocs (hopefully, there's enough context):
old part:
! if ((sec->flags & SEC_ALLOC) != 0
! /* BPABI objects never have dynamic
! relocations mapped. */
! && !htab->symbian_p)
! flags |= SEC_ALLOC | SEC_LOAD;
new part:
! /* BPABI objects never have dynamic relocations mapped. */
! if (! htab->symbian_p)
{
! flagword flags;
! flags = bfd_get_section_flags (dynobj, sreloc);
! flags &= ~(SEC_LOAD | SEC_ALLOC);
! bfd_set_section_flags (dynobj, sreloc, flags);
}
What I'm seeing is that the SEC_ALLOC flag is missing for .rel.somename sections that are created,
which in turn is causing these sections to be emitted to the output bfd instead of being placed in
the .rel.dyn section. In particular, it's happening during the building of libc.so for arm-linux.
Did you mean to make that change to the flags to prevent the SEC_ALLOC flag from being set?
Thanks,
Catherine