* elflink.c (elf_section_ignore_discarded_relocs): Don't test
authorAlan Modra <amodra@gmail.com>
Wed, 30 Jun 2004 13:42:45 +0000 (13:42 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 30 Jun 2004 13:42:45 +0000 (13:42 +0000)
sec_info_type, test section name instead.

bfd/ChangeLog
bfd/elflink.c

index 78bcea55e357d05df8149202e9427b907d747840..20f0c227ac34abdc237cd48e1d9676d594469fda 100644 (file)
@@ -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
index 7b8d2524282d982aa82f315584dfd3c4f9ea5176..354cfbbe5a5e90ce718ff23c07ea025e533ce6b2 100644 (file)
@@ -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