This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Segfault with -pie on IA64


On Sun, Nov 16, 2003 at 06:27:12PM -0800, Jim Wilson wrote:
> The .rela.opd section contents were not initialized because it isn't in dynobj.
> I don't fully understand the difference between dynobj and abfd here, but it
> seems that if fptr_sec (.opd) is in dynobj, then its relocation section
> rel_fptr_sec (.rela.opd) must be also.  The following patch does this, and
> solves this problem.

There's nothing particularly special about dynobj.  It's just one of the
input bfds to which linker created sections are attached.  The thing is
that various elf linker routines, like size_dynamic_sections, know to
look in dynobj for these special sections.

> 1) There is no .rela.opd section in the linker script.  This seems to be
> harmless in that the orphan section code will handle it, but it seems like
> it should really be in there since all of the other known sections are.

Yes.

> 2) There is code in elfNN_ia64_size_dynamic_section that strips off all of
> the zero size dynamic sections, including fptr_sec, but it doesn't handle
> rel_fptr_sec.  I think it should.

Actually, it does handle .rela.opd along with any other .rel*, at least
when you attach the section to the proper bfd.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]