]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/
authorBob Wilson <bob.wilson@acm.org>
Thu, 12 Oct 2006 21:56:19 +0000 (21:56 +0000)
committerBob Wilson <bob.wilson@acm.org>
Thu, 12 Oct 2006 21:56:19 +0000 (21:56 +0000)
* elf32-xtensa.c (elf_xtensa_action_discarded): New.
(elf_backend_action_discarded): Define.
ld/
* emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Check
for linkonce XCC exception tables (".e" and ".h").

bfd/ChangeLog
bfd/elf32-xtensa.c
ld/ChangeLog
ld/emultempl/xtensaelf.em

index b7db1d8bd9ba4de695b6f9b673c4a545a04f0a05..db0ee249b073cea0cc33f78db94cd2e40e56073b 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-12  Bob Wilson  <bob.wilson@acm.org>
+
+       * elf32-xtensa.c (elf_xtensa_action_discarded): New.
+       (elf_backend_action_discarded): Define.
+
 2006-10-11  Bob Wilson  <bob.wilson@acm.org>
 
        * elf32-xtensa.c (elf_xtensa_relocate_section): Return after
index a5d76b214dc401fede8dc3248ef7b3dfa642250f..2a6c695ccd82e573d751dc0cc1d0e8afbdd22f94 100644 (file)
@@ -2969,6 +2969,19 @@ elf_xtensa_ignore_discarded_relocs (asection *sec)
   return xtensa_is_property_section (sec);
 }
 
+
+static unsigned int
+elf_xtensa_action_discarded (asection *sec)
+{
+  if (strcmp (".xt_except_table", sec->name) == 0)
+    return 0;
+
+  if (strcmp (".xt_except_desc", sec->name) == 0)
+    return 0;
+
+  return _bfd_elf_default_action_discarded (sec);
+}
+
 \f
 /* Support for core dump NOTE sections.  */
 
@@ -9832,5 +9845,6 @@ static const struct bfd_elf_special_section elf_xtensa_special_sections[] =
 #define elf_backend_relocate_section        elf_xtensa_relocate_section
 #define elf_backend_size_dynamic_sections    elf_xtensa_size_dynamic_sections
 #define elf_backend_special_sections        elf_xtensa_special_sections
+#define elf_backend_action_discarded        elf_xtensa_action_discarded
 
 #include "elf32-target.h"
index f2b8ea354e87aae879245873a8a1aaebf349267e..77d813c3cd0394624a39e9cf10e5cb20894f6582 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-12  Bob Wilson  <bob.wilson@acm.org>
+
+       * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Check
+       for linkonce XCC exception tables (".e" and ".h").
+
 2006-10-11  Bob Wilson  <bob.wilson@acm.org>
 
        * emulparams/elf32xtensa.sh (TEXT_PLT): Enable.
index bbee5462029fa2a5091304740fb43eaf48bec88e..cf3f77445913fbe13c5126bbad9c974b32e6180d 100644 (file)
@@ -1184,7 +1184,7 @@ input_section_linked (asection *sec)
 }
 
 
-/* Strip out any linkonce literal sections or property tables where the
+/* Strip out any linkonce property tables or XCC exception tables where the
    associated linkonce text is from a different object file.  Normally,
    a matching set of linkonce sections is taken from the same object file,
    but sometimes the files are compiled differently so that some of the
@@ -1199,17 +1199,22 @@ is_inconsistent_linkonce_section (asection *sec)
 {
   bfd *abfd = sec->owner;
   const char *sec_name = bfd_get_section_name (abfd, sec);
-  const char *name = 0;
+  const char *name;
 
   if ((bfd_get_section_flags (abfd, sec) & SEC_LINK_ONCE) == 0
       || strncmp (sec_name, ".gnu.linkonce.", linkonce_len) != 0)
     return FALSE;
 
-  /* Check if this is an Xtensa property section.  */
-  if (CONST_STRNEQ (sec_name + linkonce_len, "p."))
-    name = sec_name + linkonce_len + 2;
-  else if (CONST_STRNEQ (sec_name + linkonce_len, "prop."))
-    name = strchr (sec_name + linkonce_len + 5, '.') + 1;
+  /* Check if this is an Xtensa property section or an exception table
+     for Tensilica's XCC compiler.  */
+  name = sec_name + linkonce_len;
+  if (CONST_STRNEQ (name, "prop."))
+    name = strchr (name + 5, '.') + 1;
+  else if (name[1] == '.'
+          && (name[0] == 'p' || name[0] == 'e' || name[0] == 'h'))
+    name += 2;
+  else
+    name = 0;
 
   if (name)
     {