This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: binutils-2.19.90 snapshot is available
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org, Tristan Gingold <gingold at adacore dot com>, Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Date: Fri, 9 Oct 2009 15:50:17 +1030
- Subject: Re: binutils-2.19.90 snapshot is available
- References: <20090913022526.GR28290@bubble.grove.modra.org> <20090913153703.GA3796@ednor.casa.cgf.cx> <20090913160312.GA11300@ednor.casa.cgf.cx> <20090913160931.GA19246@ednor.casa.cgf.cx> <20090921214900.GA17794@ednor.casa.cgf.cx> <4AB84B22.7010901@gmail.com> <20090923203325.GA4166@ednor.casa.cgf.cx> <20090923215610.GB28784@bubble.grove.modra.org> <20090927160942.GA8212@ednor.casa.cgf.cx> <6dc9ffc80910082111h196d9315k7d316b1479359b2f@mail.gmail.com>
On Thu, Oct 08, 2009 at 09:11:02PM -0700, H.J. Lu wrote:
> This patch may have caused:
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=10749
Yes, it did. I'm going to apply the following patch to both
mainline and branch, and revert my 2009-09-28 patch
http://sourceware.org/ml/binutils/2009-09/msg00646.html on the
branch.
I'd like to see what breaks if I leave my 2009-09-28 change in
mainline. As a very old comment in the ELF linker scripts said,
zeroing vma for ld -r was to avoid bugs in the Solaris linker. Those
bugs may now be fixed.
PR ld/10749
* ldlang.c (lang_size_sections_1): Zero section vmas only for COFF.
Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.322
diff -u -p -r1.322 ldlang.c
--- ld/ldlang.c 8 Oct 2009 01:00:27 -0000 1.322
+++ ld/ldlang.c 9 Oct 2009 05:07:38 -0000
@@ -4665,7 +4665,13 @@ lang_size_sections_1
lang_memory_region_type *r;
os = &s->output_section_statement;
- if (os->addr_tree == NULL && link_info.relocatable)
+ /* FIXME: We shouldn't need to zero section vmas for ld -r
+ here, in lang_insert_orphan, or in the default linker scripts.
+ This is covering for coff backend linker bugs. See PR6945. */
+ if (os->addr_tree == NULL
+ && link_info.relocatable
+ && (bfd_get_flavour (link_info.output_bfd)
+ == bfd_target_coff_flavour))
os->addr_tree = exp_intop (0);
if (os->addr_tree != NULL)
{
--
Alan Modra
Australia Development Lab, IBM