aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-06-30 13:42:45 +0000
committerAlan Modra <amodra@gmail.com>2004-06-30 13:42:45 +0000
commit72d7a15c9da519b77f40f7d8e0f268cbe9b96e1a (patch)
tree31cff593e48e5ccf6bcef7a909add8c7bc8ba6e3 /bfd
parent06ea1a610f5dbdb2e629ba80e9774a6b1937d6e0 (diff)
downloadgdb-72d7a15c9da519b77f40f7d8e0f268cbe9b96e1a.zip
gdb-72d7a15c9da519b77f40f7d8e0f268cbe9b96e1a.tar.gz
gdb-72d7a15c9da519b77f40f7d8e0f268cbe9b96e1a.tar.bz2
* elflink.c (elf_section_ignore_discarded_relocs): Don't test
sec_info_type, test section name instead.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c15
2 files changed, 12 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 78bcea5..20f0c22 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-30 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (elf_section_ignore_discarded_relocs): Don't test
+ sec_info_type, test section name instead.
+
2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
PR 240
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 7b8d252..354cfbb 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -6263,14 +6263,13 @@ elf_section_ignore_discarded_relocs (asection *sec)
{
const struct elf_backend_data *bed;
- switch (sec->sec_info_type)
- {
- case ELF_INFO_TYPE_STABS:
- case ELF_INFO_TYPE_EH_FRAME:
- return TRUE;
- default:
- break;
- }
+ if (strncmp (".stab", sec->name, 5) == 0
+ && (!sec->name[5] ||
+ (sec->name[5] == '.' && ISDIGIT (sec->name[6]))))
+ return TRUE;
+
+ if (strcmp (".eh_frame", sec->name) == 0)
+ return TRUE;
bed = get_elf_backend_data (sec->owner);
if (bed->elf_backend_ignore_discarded_relocs != NULL