aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-03-12 11:57:05 +0000
committerNick Clifton <nickc@redhat.com>2004-03-12 11:57:05 +0000
commitd1f161ea0a1ea3a6d18421b20ea7d33202d9fdd8 (patch)
treeb35cb68899d093e88717e8fdb63351e0cc46f742
parent4fd61dcb07594dc4535a0af7129b1e2eb5e9d458 (diff)
downloadgdb-d1f161ea0a1ea3a6d18421b20ea7d33202d9fdd8.zip
gdb-d1f161ea0a1ea3a6d18421b20ea7d33202d9fdd8.tar.gz
gdb-d1f161ea0a1ea3a6d18421b20ea7d33202d9fdd8.tar.bz2
Ignore data-only sections when checking interworking status
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-arm.h18
2 files changed, 21 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 22ab879..10055b5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-12 Nick Clifton <nickc@redhat.com>
+ Dave Murphy <wintermute2k4@ntlworld.com>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
+ if the input bfd does not contain any code.
+
2004-03-09 Steve Ellcey <sje@cup.hp.com>
* elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 7c284c1..f8c859f 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -1,5 +1,6 @@
/* 32-bit ELF support for ARM
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -2430,11 +2431,16 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
not, its flags may not have been initialised either, but it
cannot actually cause any incompatibility. Do not short-circuit
dynamic objects; their section list may be emptied by
- elf_link_add_object_symbols. */
+ elf_link_add_object_symbols.
+ Also check to see if there are no code sections in the input.
+ In this case there is no need to check for code specific flags.
+ XXX - do we need to worry about floating-point format compatability
+ in data sections ? */
if (!(ibfd->flags & DYNAMIC))
{
bfd_boolean null_input_bfd = TRUE;
+ bfd_boolean only_data_sections = TRUE;
for (sec = ibfd->sections; sec != NULL; sec = sec->next)
{
@@ -2442,11 +2448,17 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
if (strcmp (sec->name, ".glue_7")
&& strcmp (sec->name, ".glue_7t"))
{
+ if ((bfd_get_section_flags (ibfd, sec)
+ & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
+ == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS))
+ only_data_sections = FALSE;
+
null_input_bfd = FALSE;
break;
}
}
- if (null_input_bfd)
+
+ if (null_input_bfd || only_data_sections)
return TRUE;
}