This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PR 10474, ppc relocation overflow, no auto relax
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Tue, 4 Aug 2009 17:47:19 +0930
- Subject: PR 10474, ppc relocation overflow, no auto relax
Silly me. The automatic relax wasn't happening because section size
is transferred to rawsize by lang_reset_memory_regions.
PR 10474
* emultempl/ppc32elf.em (ppc_before_allocation): Test rawsize,
not size, after lang_reset_memory_regions.
Index: ld/emultempl/ppc32elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc32elf.em,v
retrieving revision 1.19
diff -u -p -r1.19 ppc32elf.em
--- ld/emultempl/ppc32elf.em 10 Jul 2009 12:29:40 -0000 1.19
+++ ld/emultempl/ppc32elf.em 4 Aug 2009 08:07:08 -0000
@@ -136,12 +136,12 @@ ppc_before_allocation (void)
{
if ((o->flags & (SEC_ALLOC | SEC_CODE)) != (SEC_ALLOC | SEC_CODE))
continue;
- if (o->size == 0)
+ if (o->rawsize == 0)
continue;
if (low > o->vma)
low = o->vma;
- if (high < o->vma + o->size - 1)
- high = o->vma + o->size - 1;
+ if (high < o->vma + o->rawsize - 1)
+ high = o->vma + o->rawsize - 1;
}
if (high > low && high - low > (1 << 25) - 1)
command_line.relax = TRUE;
--
Alan Modra
Australia Development Lab, IBM