summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2004-06-30 13:42:45 +0000
committerAlan Modra <amodra@bigpond.net.au>2004-06-30 13:42:45 +0000
commite4eb5f6179210cf0371df0ef3f616229fabc8e4e (patch)
tree4ea7c5cf15563e9e00ef83d3d601a824c94e0142 /bfd/elflink.c
parentc51ab8dab364d9d9b7a2e33cf8e766bb486e596b (diff)
downloadgdb-e4eb5f6179210cf0371df0ef3f616229fabc8e4e.tar.gz
* elflink.c (elf_section_ignore_discarded_relocs): Don't test
sec_info_type, test section name instead.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 7b8d2524282..354cfbbe5a5 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