Patchworkβ Out of order unwind entry warning

login
register
about
Submitter John David Anglin
Date 2009-11-02 02:34:32
Message ID <20091102023432.GA12425@hiauly1.hia.nrc.ca>
Download mbox | patch
Permalink /patch/56921/
State Not Applicable
Headers show

Comments

John David Anglin - 2009-11-02 02:34:32
On Sun, 01 Nov 2009, John David Anglin wrote:

> On Sun, 01 Nov 2009, John David Anglin wrote:
> 
> > On Fri, 30 Oct 2009, Helge Deller wrote:
> > 
> > > But when compiling the kernel something is still wrong.
> > > I tried it a few times now, recompiled binutils, the kernel and so on.
> > > I'm not 100% sure that I did everything correct, but I still think there is
> > > something wrong...
> > 
> > I believe that you are correct but I think we have another unrelated bug.
> > It appears that the unwind data is getting messed up in the link of
> > built-in.o.
> 
> It seems the unwind data is being sorted by ld -r.

Does the attached patch fix the problem?

Dave
Helge Deller - 2009-11-02 21:02:31
On 11/02/2009 03:34 AM, John David Anglin wrote:
> On Sun, 01 Nov 2009, John David Anglin wrote:
>
>> On Sun, 01 Nov 2009, John David Anglin wrote:
>>
>>> On Fri, 30 Oct 2009, Helge Deller wrote:
>>>
>>>> But when compiling the kernel something is still wrong.
>>>> I tried it a few times now, recompiled binutils, the kernel and so on.
>>>> I'm not 100% sure that I did everything correct, but I still think there is
>>>> something wrong...
>>>
>>> I believe that you are correct but I think we have another unrelated bug.
>>> It appears that the unwind data is getting messed up in the link of
>>> built-in.o.
>>
>> It seems the unwind data is being sorted by ld -r.
>
> Does the attached patch fix the problem?

Yes, it does :-)

All of your patches applied seem to work 100% OK.

Helge

PS: I only tested 32bit, but I assume 64bit will then work as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

Index: elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.168
diff -u -3 -p -r1.168 elf32-hppa.c
--- elf32-hppa.c	18 Jun 2009 14:18:28 -0000	1.168
+++ elf32-hppa.c	2 Nov 2009 02:32:05 -0000
@@ -3238,6 +3238,9 @@  elf32_hppa_final_link (bfd *abfd, struct
 
   /* If we're producing a final executable, sort the contents of the
      unwind section.  */
+  if (info->relocatable)
+    return TRUE;
+
   return elf_hppa_sort_unwind (abfd);
 }
 
Index: elf64-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-hppa.c,v
retrieving revision 1.92
diff -u -3 -p -r1.92 elf64-hppa.c
--- elf64-hppa.c	21 May 2009 14:15:49 -0000	1.92
+++ elf64-hppa.c	2 Nov 2009 02:32:05 -0000
@@ -3033,7 +3033,7 @@  elf_hppa_final_link (bfd *abfd, struct b
 
   /* If we're producing a final executable, sort the contents of the
      unwind section. */
-  if (retval)
+  if (retval && !info->relocatable)
     retval = elf_hppa_sort_unwind (abfd);
 
   return retval;