This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Request to back port a patch to 2.21 branch
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Binutils <binutils at sourceware dot org>
- Date: Wed, 15 Dec 2010 16:26:57 +0100
- Subject: Request to back port a patch to 2.21 branch
Hello,
Alan Modra was so kind to provide a patch (attached file) that fixes the
problem described here:
http://www.cygwin.com/ml/binutils/2010-11/msg00485.html
Is it possible to apply this patch also to the 2.21 branch? We want to use the
Binutils 2.21 for the current RTEMS tool chain and this is the only open issue
remaining.
Have a nice day!
--
Sebastian Huber, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
2010-12-04 Alan Modra <amodra@gmail.com>
* ldlang.c (lang_size_sections_1): Align lma using same alignment
as for vma.
Index: ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -r1.348 -r1.349
--- ldlang.c 21 Nov 2010 20:36:24 -0000 1.348
+++ ldlang.c 4 Dec 2010 03:30:45 -0000 1.349
@@ -4788,6 +4788,7 @@
bfd_vma newdot, after;
lang_output_section_statement_type *os;
lang_memory_region_type *r;
+ int section_alignment = 0;
os = &s->output_section_statement;
if (os->constraint == -1)
@@ -4857,8 +4858,6 @@
}
else
{
- int align;
-
if (os->addr_tree == NULL)
{
/* No address specified for this section, get one
@@ -4909,16 +4908,16 @@
}
newdot = os->region->current;
- align = os->bfd_section->alignment_power;
+ section_alignment = os->bfd_section->alignment_power;
}
else
- align = os->section_alignment;
+ section_alignment = os->section_alignment;
/* Align to what the section needs. */
- if (align > 0)
+ if (section_alignment > 0)
{
bfd_vma savedot = newdot;
- newdot = align_power (newdot, align);
+ newdot = align_power (newdot, section_alignment);
if (newdot != savedot
&& (config.warn_section_align
@@ -4974,8 +4973,8 @@
{
bfd_vma lma = os->lma_region->current;
- if (os->section_alignment != -1)
- lma = align_power (lma, os->section_alignment);
+ if (section_alignment > 0)
+ lma = align_power (lma, section_alignment);
os->bfd_section->lma = lma;
}
else if (r->last_os != NULL
@@ -5016,8 +5015,8 @@
else
lma = dot + last->lma - last->vma;
- if (os->section_alignment != -1)
- lma = align_power (lma, os->section_alignment);
+ if (section_alignment > 0)
+ lma = align_power (lma, section_alignment);
os->bfd_section->lma = lma;
}
}