2010-08-26 Nathan Sidwell * elf32-arm.c (elf32_arm_final_link): Process stub sections exactly once. Index: elf32-arm.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-arm.c,v retrieving revision 1.240 diff -c -3 -p -r1.240 elf32-arm.c *** elf32-arm.c 25 Aug 2010 14:53:40 -0000 1.240 --- elf32-arm.c 26 Aug 2010 10:31:32 -0000 *************** elf32_arm_final_link (bfd *abfd, struct *** 9443,9458 **** /* Process stub sections (eg BE8 encoding, ...). */ struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info); int i; ! for(i=0; itop_id; i++) { ! sec = htab->stub_group[i].stub_sec; ! if (sec) { ! osec = sec->output_section; ! elf32_arm_write_section (abfd, info, sec, sec->contents); ! if (! bfd_set_section_contents (abfd, osec, sec->contents, ! sec->output_offset, sec->size)) ! return FALSE; } - } /* Write out any glue sections now that we have created all the stubs. */ --- 9443,9461 ---- /* Process stub sections (eg BE8 encoding, ...). */ struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info); int i; ! for (i=0; itop_id; i++) ! { ! sec = htab->stub_group[i].stub_sec; ! /* Only process it once, in its link_sec slot. */ ! if (sec && i == htab->stub_group[i].link_sec->id) ! { ! osec = sec->output_section; ! elf32_arm_write_section (abfd, info, sec, sec->contents); ! if (! bfd_set_section_contents (abfd, osec, sec->contents, ! sec->output_offset, sec->size)) ! return FALSE; ! } } /* Write out any glue sections now that we have created all the stubs. */