This is the mail archive of the binutils@sourceware.org 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: Release 2.22: branch created


On 09/10/2011 14:17, Christopher Faylor wrote:
> On Mon, Sep 26, 2011 at 11:42:51AM +0200, Tristan Gingold wrote:
>> On Sep 25, 2011, at 8:07 PM, Dave Korn wrote:
>>
>>> On 22/09/2011 10:16, Tristan Gingold wrote:
>>>> I have just created the 2_22 branch for binutils, and built a snapshot
>>>> (which is ok for i686-pc-linux-gnu).
>>>>
>>>> You can download it from: 
>>>> ftp://sourceware.org/pub/binutils/snapshots/binutils-2.21.53.tar.bz2
>>>>
>>>> The branch is open to fix regressions/bugs, do not hesitate to ask before
>>>> committing on the branch.
>>>>
>>>> Tristan.
>>>>
>>>  I'm planning to commit
>>>
>>>    http://sourceware.org/ml/binutils/2011-09/msg00174.html
>>>
>>> to mainline within the next 48 hours, it fixes a serious bug in linking
>>> PE-COFF DLLs.  Ok for the branch too please?
>> Sure.
> 
> I was hoping to roll a new version of binutils for Cygwin soon but I
> don't see this patch in either trunk or branch.  Are there plans to
> incorporate it anytime soon?

  Sorry for the delay, there turned out to be hidden gotchas.  After building
GCC and running the testsuite both before and after rebasing the DLLs, I
determined that the original patch wasn't quite conservative enough.
Generating base relocs needs to follow what the static final link does with
the underlying BFD relocs, and what it turns out is that relocs in .eh_frame
sections against discarded COMDAT sections are discarded (linked to *ABS*
zero), but relocs in .gcc_except_data section get resolved as usual (i.e.
against the kept section), so the original patch wasn't conservative enough.
I just got through running the C++ testsuite with DLLs built against the
attached slight variant of the original patch and I'll look to commit it
tomorrow after a little more testing.  (I'll also post it to the list with a
proper changelog when I do so, this is just advance notice.)

    cheers,
      DaveK

? ld/testsuite/ld-plugin/dummy.c
? ld/testsuite/ld-plugin/dummy.s
? ld/testsuite/ld-plugin/func1p.c
? ld/testsuite/ld-plugin/func2.c
? ld/testsuite/ld-plugin/func2i.c
? ld/testsuite/ld-plugin/func3h.c
? ld/testsuite/ld-plugin/lto-10.out
? ld/testsuite/ld-plugin/lto-10a.c
? ld/testsuite/ld-plugin/lto-10b.c
? ld/testsuite/ld-plugin/lto-10r.d
? ld/testsuite/ld-plugin/lto-11.out
? ld/testsuite/ld-plugin/lto-11a.c
? ld/testsuite/ld-plugin/lto-11b.c
? ld/testsuite/ld-plugin/lto-11c.c
? ld/testsuite/ld-plugin/lto-12.out
? ld/testsuite/ld-plugin/lto-12a.c
? ld/testsuite/ld-plugin/lto-12b.c
? ld/testsuite/ld-plugin/lto-12c.c
? ld/testsuite/ld-plugin/lto-13.out
? ld/testsuite/ld-plugin/lto-13a.c
? ld/testsuite/ld-plugin/lto-13b.c
? ld/testsuite/ld-plugin/lto-13c.c
? ld/testsuite/ld-plugin/lto-14.out
? ld/testsuite/ld-plugin/lto-14a.c
? ld/testsuite/ld-plugin/lto-14b.c
? ld/testsuite/ld-plugin/lto-14c.c
? ld/testsuite/ld-plugin/lto-15.out
? ld/testsuite/ld-plugin/lto-15a.c
? ld/testsuite/ld-plugin/lto-15b.c
? ld/testsuite/ld-plugin/lto-1a.c
? ld/testsuite/ld-plugin/lto-1b.c
? ld/testsuite/ld-plugin/lto-2.c
? ld/testsuite/ld-plugin/lto-3.d
? ld/testsuite/ld-plugin/lto-3.out
? ld/testsuite/ld-plugin/lto-3a.c
? ld/testsuite/ld-plugin/lto-3b.c
? ld/testsuite/ld-plugin/lto-3c.c
? ld/testsuite/ld-plugin/lto-3r.d
? ld/testsuite/ld-plugin/lto-4.out
? ld/testsuite/ld-plugin/lto-4a.c
? ld/testsuite/ld-plugin/lto-4b.c
? ld/testsuite/ld-plugin/lto-4c.c
? ld/testsuite/ld-plugin/lto-4r-a.d
? ld/testsuite/ld-plugin/lto-4r-b.d
? ld/testsuite/ld-plugin/lto-4r-c.d
? ld/testsuite/ld-plugin/lto-4r-d.d
? ld/testsuite/ld-plugin/lto-5.d
? ld/testsuite/ld-plugin/lto-5.out
? ld/testsuite/ld-plugin/lto-5a.c
? ld/testsuite/ld-plugin/lto-5b.c
? ld/testsuite/ld-plugin/lto-5r.d
? ld/testsuite/ld-plugin/lto-6.c
? ld/testsuite/ld-plugin/lto-7.out
? ld/testsuite/ld-plugin/lto-7a.c
? ld/testsuite/ld-plugin/lto-7b.c
? ld/testsuite/ld-plugin/lto-7c.c
? ld/testsuite/ld-plugin/lto-7d.c
? ld/testsuite/ld-plugin/lto-8.out
? ld/testsuite/ld-plugin/lto-8a.c
? ld/testsuite/ld-plugin/lto-8b.c
? ld/testsuite/ld-plugin/lto-9.cc
? ld/testsuite/ld-plugin/lto-9.d
? ld/testsuite/ld-plugin/lto.exp
? ld/testsuite/ld-plugin/pr12365a.c
? ld/testsuite/ld-plugin/pr12365b.c
? ld/testsuite/ld-plugin/pr12365c.c
Index: ld/pe-dll.c
===================================================================
RCS file: /cvs/src/src/ld/pe-dll.c,v
retrieving revision 1.138
diff -p -u -r1.138 pe-dll.c
--- ld/pe-dll.c	16 Sep 2011 01:15:19 -0000	1.138
+++ ld/pe-dll.c	11 Oct 2011 01:58:46 -0000
@@ -1395,6 +1395,15 @@ generate_reloc (bfd *abfd, struct bfd_li
 		      else if (!blhe || blhe->type != bfd_link_hash_defined)
 			continue;
 		    }
+		  /* Nor for Dwarf FDE references to discarded sections.  */
+		  else if (bfd_is_abs_section (sym->section->output_section))
+		    {
+		      /* We only ignore relocs from .eh_frame sections, as
+			 they are discarded by the final link rather than
+			 resolved against the kept section.  */
+		      if (!strcmp (s->name, ".eh_frame"))
+			continue;
+		    }
 
 		  reloc_data[total_relocs].vma = sec_vma + relocs[i]->address;
 

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