From 28f68c73a40a1f0a4cdc290cba9168d51999029c Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Thu, 1 Dec 2011 02:51:14 +0000 Subject: [PATCH] * elf32-cris.c (cris_elf_check_relocs) : Move early break for non-SEC_ALLOC sections before GOT and PLT accounting. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-cris.c | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c1a6f0d436f..78b1a958d42 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2011-12-01 Hans-Peter Nilsson + + * elf32-cris.c (cris_elf_check_relocs) : Move early break for + non-SEC_ALLOC sections before GOT and PLT accounting. + 2011-11-29 Andrew Pinski * archures.c (bfd_mach_mips_octeonp): New macro. diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 033d1c8b791..563e2c075e6 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -3583,6 +3583,12 @@ cris_elf_check_relocs (bfd *abfd, sec, cris_elf_howto_table[r_type].name); } + + /* We don't need to handle relocs into sections not going into + the "real" output. */ + if ((sec->flags & SEC_ALLOC) == 0) + break; + if (h != NULL) { h->non_got_ref = 1; @@ -3612,11 +3618,6 @@ cris_elf_check_relocs (bfd *abfd, if (! info->shared) break; - /* We don't need to handle relocs into sections not going into - the "real" output. */ - if ((sec->flags & SEC_ALLOC) == 0) - break; - /* We may need to create a reloc section in the dynobj and made room for this reloc. */ if (sreloc == NULL) -- 2.30.2