aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
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 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