summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-11-13 20:39:21 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-11-13 20:39:21 +0000
commit125cd9927779417b946c49ce4039d2dd014637fc (patch)
tree3c5006c7b6fbda73693a066634cc4aab3ac1e433 /ld
parent283f3db6fc74e457c358c8053a69260103a45eca (diff)
downloadbinutils-redhat-125cd9927779417b946c49ce4039d2dd014637fc.tar.gz
bfd/
* bfd-in.h (bfd_elf32_arm_process_before_allocation): Update prototype. (bfd_elf32_arm_set_byteswap_code): New prototype. * bfd-in2.h: Regenerate. * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Don't take byteswap_code as an argument. Revert 2006-11-01 change. (bfd_elf32_arm_set_byteswap_code): New. (elf32_arm_size_dynamic_sections): Call bfd_elf32_arm_process_before_allocation. ld/ * emultempl/armelf.em (arm_elf_before_allocation): Only call bfd_elf32_arm_process_before_allocation if no dynamic sections.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/emultempl/armelf.em25
2 files changed, 18 insertions, 12 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 7f838f627f..4abbfbc729 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * emultempl/armelf.em (arm_elf_before_allocation): Only call
+ bfd_elf32_arm_process_before_allocation if no dynamic sections.
+
2006-11-08 Alan Modra <amodra@bigpond.net.au>
* emultempl/elf32.em (gld*_before_allocation): Adjust output section
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index f78b4957e9..d52d387f9d 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -121,21 +121,22 @@ arm_elf_before_allocation (void)
if (bfd_for_interwork != NULL)
bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
}
- /* We should be able to set the size of the interworking stub section. */
- /* Here we rummage through the found bfds to collect glue information. */
- /* FIXME: should this be based on a command line option? krk@cygnus.com */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, & link_info,
- byteswap_code))
- {
+ bfd_elf32_arm_set_byteswap_code (&link_info, byteswap_code);
+
+ /* We should be able to set the size of the interworking stub section. We
+ can't do it until later if we have dynamic sections, though. */
+ if (! elf_hash_table (&link_info)->dynamic_sections_created)
+ {
+ /* Here we rummage through the found bfds to collect glue information. */
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (!bfd_elf32_arm_process_before_allocation (is->the_bfd,
+ &link_info))
/* xgettext:c-format */
einfo (_("Errors encountered processing file %s"), is->filename);
- }
- }
- }
+ }
+ }
/* Call the standard elf routine. */
gld${EMULATION_NAME}_before_allocation ();