From 07088e95873628decec7b00b769486e6252873b9 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 4 Aug 2009 08:15:24 +0000 Subject: [PATCH] PR 10474 * emultempl/ppc32elf.em (ppc_before_allocation): Test rawsize, not size, after lang_reset_memory_regions. --- ld/ChangeLog | 6 ++++++ ld/emultempl/ppc32elf.em | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 65ac90232e5..a3774ecf2ce 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2009-08-04 Alan Modra + + PR 10474 + * emultempl/ppc32elf.em (ppc_before_allocation): Test rawsize, + not size, after lang_reset_memory_regions. + 2009-07-30 Alan Modra * emulparams/elf32ppc.sh (PLT): Don't include ".iplt". diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em index b801df8697f..9918a48f3c1 100644 --- a/ld/emultempl/ppc32elf.em +++ b/ld/emultempl/ppc32elf.em @@ -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; -- 2.30.2