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]

Re: PATCH: Fix linkonce for ELF/PPC.


On Mon, Oct 29, 2001 at 01:41:35PM +1030, Alan Modra wrote:
> On Sun, Oct 28, 2001 at 11:24:34AM -0800, H . J . Lu wrote:
> > > 
> > > I think I found the reason. For ELF/PPC, you cannot change the
> > > relocation type of a relocation against removed a linkonce section
> > > to R_PPC_NONE.
> 
> Why is that so?  Is there some relocation type that must be kept?

I didn't check which reloc has to be kept. If I have to guess, it may
be R_PPC_RELATIVE.

> 
> > That means we may have to introduce a new function
> > > to let each ELF target decide what to do with relocations against
> > > against removed linkonce sections. We can add something like
> > > 
> > > bfd_vma
> > > bfd_elf_removed_linkonce_r_info (abfd, r_info);
> > >    bfd *abfd;
> > >    bfd_vma r_info;
> > > {
> > >   return ELF_R_INFO (0, 0);
> > > }
> > > 
> > > Each backend can override it if necassry. Alan, could you please look
> > > into it?
> > > 
> > > Thanks.
> > > 
> > 
> > This patch is against the today's CVS. Any comments?
> 
> I think it would be better to fix the ppc backend so that R_NONE relocs
> don't cause a problem.  I find it curious that the ppc backend, which
> offends rather badly when it comes to generating R_*_NONE relocs, can't
> handle them.
> 

I don't know how it happens on ELF/PPC. The problem can be in linker,
gcc and glibc. What I saw was the gcc couldn't catch the exception with
libstdc++.so built by the current ld. It just aborted. Also see

http://gcc.gnu.org/ml/gcc/2001-09/msg01248.html

It may or may not be related. Feel to find a real fix for the problem.
But we still need a workaround in the meantime.


H.J.


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