This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: ld/1467: Orphaned section is put in the odd place
On Sat, Oct 15, 2005 at 04:13:12PM -0700, H. J. Lu wrote:
> On Sat, Oct 15, 2005 at 01:14:10PM +0930, Alan Modra wrote:
> > On Fri, Oct 14, 2005 at 07:57:46AM -0700, H. J. Lu wrote:
> > > bfd/
> > >
> > > 2005-10-14 H.J. Lu <hongjiu.lu@intel.com>
> > >
> > > PR ld/1467
> > > * elf-bfd.h (_bfd_elf_match_sections_by_type): New.
> > > (_bfd_generic_match_sections_by_type): New. Defined.
> > >
> > > * elf.c (_bfd_elf_match_sections_by_type): New.
> > >
> > > * libbfd-in.h (_bfd_generic_match_sections_by_type): New.
> > >
> > > * bfd-in2.h: Regenerated.
> > > * libbfd.h: Likewise.
> > >
> > > * libbfd.c (_bfd_generic_match_sections_by_type): New.
> > >
> > > * targets.c (BFD_JUMP_TABLE_LINK): Initialize
> > > _bfd_match_sections_by_type with
> > > _bfd_generic_match_sections_by_type.
> > > (bfd_target): Add _bfd_match_sections_by_type.
> > >
> > > ld/
> > >
> > > 2005-10-14 H.J. Lu <hongjiu.lu@intel.com>
> > >
> > > PR ld/1467
> > > * emultempl/elf32.em: Include "elf-bfd.h".
> > > (gld${EMULATION_NAME}_place_orphan): Check section type and
> > > don't use section name for ELF input sections.
> > >
> > > * ld.texinfo: Document orphan section processing.
> > >
> > > * ldlang.c (lang_output_section_find_by_flags): Match section
> > > types by calling bfd_match_sections_by_type.
> >
> > Looks good to me.
> >
>
> It turns out that ELF section info of an output section may not be
> set. Gcc uses orphan sections to check HAVE_LD_RO_RW_SECTION_MIXING.
I opened a bug for it:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=1487
My patch doesn't fix it. I am working on a differnt patch.
> If it isn't set, many libstdc++ tests will fail. There may be latent
> isssues with gcc and binutils. This patch will match SHT_NULL to
> any types and fixes the libstdc++ failures.
>
It is a different bug. I am looking into it now.
H.J.