aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-11-29 08:14:22 +0000
committerNick Clifton <nickc@redhat.com>2007-11-29 08:14:22 +0000
commit39ce1a6a19467e6b495ee1858884d0e34513d504 (patch)
tree5deda8b3520ffce63a9a10af0fe0438022dba2e3 /bfd
parentc36b740af1121b812f151980b89722f39ef0b808 (diff)
downloadgdb-39ce1a6a19467e6b495ee1858884d0e34513d504.zip
gdb-39ce1a6a19467e6b495ee1858884d0e34513d504.tar.gz
gdb-39ce1a6a19467e6b495ee1858884d0e34513d504.tar.bz2
PR ld/5398
* elf32-arm.c (bfd_elf32_arm_process_before_allocation): Do not complain if there is no glue bfd, just return.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-arm.c14
2 files changed, 16 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e78868e..df02dfb 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-29 Nick Clifton <nickc@redhat.com>
+
+ PR ld/5398
+ * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Do not
+ complain if there is no glue bfd, just return.
+
2007-11-28 Nick Clifton <nickc@redhat.com>
* elf-m10300.c (mn10300_elf_relax_section): Extend previous fix to
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 0e8e423..811d651 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -3116,13 +3116,13 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
if (link_info->relocatable)
return TRUE;
- /* Here we have a bfd that is to be included on the link. We have a hook
- to do reloc rummaging, before section sizes are nailed down. */
+ /* Here we have a bfd that is to be included on the link. We have a
+ hook to do reloc rummaging, before section sizes are nailed down. */
globals = elf32_arm_hash_table (link_info);
- check_use_blx (globals);
BFD_ASSERT (globals != NULL);
- BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ check_use_blx (globals);
if (globals->byteswap_code && !bfd_big_endian (abfd))
{
@@ -3131,6 +3131,12 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
return FALSE;
}
+ /* PR 5398: If we have not decided to include any loadable sections in
+ the output then we will not have a glue owner bfd. This is OK, it
+ just means that there is nothing else for us to do here. */
+ if (globals->bfd_of_glue_owner == NULL)
+ return TRUE;
+
/* Rummage around all the relocs and map the glue vectors. */
sec = abfd->sections;