[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix for linking an arm-elf binary with no input bfds.
From: |
Nick Clifton |
Subject: |
Fix for linking an arm-elf binary with no input bfds. |
Date: |
08 Aug 2002 07:35:57 +0100 |
Hi Guys,
If you try to create a binary using the arm-elf linker and no input
bfds it fails with an internal error:
% arm-elf-ar cq foo.a
% arm-elf-ld -r -o foo.o foo.a
arm-elf-ld: internal error earmelf.c 160
I am applying the patch below to fix this.
Cheers
Nick
2002-08-07 Nick Clifton <address@hidden>
* emultempl/armelf.em (arm_elf_before_allocation): Only search
for an interworking bfd if there are input bfds.
Index: ld/emultempl/armelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/armelf.em,v
retrieving revision 1.27
diff -c -3 -p -w -r1.27 armelf.em
*** ld/emultempl/armelf.em 1 Jul 2002 08:07:31 -0000 1.27
--- ld/emultempl/armelf.em 7 Aug 2002 15:18:16 -0000
*************** arm_elf_before_allocation ()
*** 100,105 ****
--- 100,107 ----
/* Call the standard elf routine. */
gld${EMULATION_NAME}_before_allocation ();
+ if (link_info.input_bfds != NULL)
+ {
/* The interworking bfd must be the last one in the link. */
bfd_for_interwork = NULL;
for (tem = link_info.input_bfds; tem != NULL; tem = tem->link_next)
*************** arm_elf_before_allocation ()
*** 111,117 ****
tem->output_has_begun = false;
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. */
--- 113,119 ----
tem->output_has_begun = false;
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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fix for linking an arm-elf binary with no input bfds.,
Nick Clifton <=