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: PPC relocs in shared libraries


On Fri, Sep 27, 2002 at 09:04:35AM -0400, Daniel Jacobowitz wrote:
> On Fri, Sep 27, 2002 at 02:44:37PM +0930, Alan Modra wrote:
> > On Thu, Sep 26, 2002 at 03:39:00PM -0400, Daniel Jacobowitz wrote:
> > > So we're looking at RELA sections.  RELA does not use the in-section
> > > data, does it?
> > 
> > RELA relocs shouldn't, but see eg. current glibc
> > sysdeps/ia64/dl-machine.h:elf_machine_rela_relative  :-(
> 
> Aha.  Looks like prelinker stuff, I see...

Prelink is innocent. Screwed up ABIs are guilty. See the recent SPARC
problems with R_SPARC_RELATIVE, and these two are not the only ones.

> > Note that there is one good reason to apply the reloc to the
> > section contents as well as emitting a reloc and that is glibc's
> > ELF_MACHINE_REL_RELATIVE optimization.  Prior to seeing that one
> > I was inclined to say the section contents should be left at zero.
> > Not that this is particularly relevant to debug sections.
> 
> It's pretty nice for GDB too.  But GDB needs to handle either way, so
> it doesn't really care.

I still don't understand why GDB needs to care about reloc sections in
ET_DYN/ET_EXEC. Most arches don't generate them and it has to understand
the debug format anyway (and thus knows where to add l_addr and where not).

	Jakub


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