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: selective[1245] xfail on x86-64


On Thu, May 30, 2002 at 02:09:54PM +0100, Nick Clifton wrote:
> Hi Alan,
> 
> > > Hmm - well at the very least I think that you ought to add a comment
> > > as well, explaining that it is relocs in the .eh_frame section that
> > > are keeping the redundant symbols in the executables.  It would also
> > > be good to add a FIXME note to the x86_64 sources somewhere saying
> > > that this ought to be corrected some day.
> > 
> > It's not specific to x86_64.  I see the same thing on powerpc64, and
> > I think other targets will suffer the same problem.
> 
> Ok - well then perhaps there ought to be a more generic test in
> selective.exp.  Something like:

Or maybe we could just treat .eh_frame specially in elf_gc_mark.
Andreas, does this cure the x86_64 problem?  (It doesn't work
on powerpc64 because the .opd section refers to all functions.
I'll need to do something about that in gcc before we can
expect powerpc64 to do garbage collection.)

	* elflink.h (elf_gc_mark): Ignore .eh_frame relocs.

Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.162
diff -u -p -r1.162 elflink.h
--- bfd/elflink.h	23 May 2002 13:12:46 -0000	1.162
+++ bfd/elflink.h	30 May 2002 13:46:34 -0000
@@ -7587,7 +7587,8 @@ elf_gc_mark (info, sec, gc_mark_hook)
 
   /* Look through the section relocs.  */
   ret = true;
-  if ((sec->flags & SEC_RELOC) != 0 && sec->reloc_count > 0)
+  if ((sec->flags & SEC_RELOC) != 0 && sec->reloc_count > 0
+      && strcmp (sec->name, ".eh_frame") != 0)
     {
       Elf_Internal_Rela *relstart, *rel, *relend;
       Elf_Internal_Shdr *symtab_hdr;

-- 
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]