Run --gc-sections tests only if supported.
[deliverable/binutils-gdb.git] / bfd / elf32-score7.c
index f780e56ab791f5ffbd2f2bcd9c421aa135598184..3e98bfc45ac2fc8038b5cbe7589c04f5b96a56c4 100644 (file)
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for S+core.
-   Copyright 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by
    Brain.lin (brain.lin@sunplusct.com)
    Mei Ligang (ligang@sunnorth.com.cn)
@@ -920,9 +920,6 @@ score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data)
 {
   struct score_elf_hash_sort_data *hsd = data;
 
-  if (h->root.root.type == bfd_link_hash_warning)
-    h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
-
   /* Symbols without dynamic symbol table entries aren't interesting at all.  */
   if (h->root.dynindx == -1)
     return TRUE;
@@ -2447,15 +2444,8 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd,
         }
 
       if (sec != NULL && elf_discarded_section (sec))
-        {
-          /* For relocs against symbols from removed linkonce sections,
-             or sections discarded by a linker script, we just want the
-             section contents zeroed.  Avoid any special processing.  */
-          _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
-          rel->r_info = 0;
-          rel->r_addend = 0;
-          continue;
-        }
+       RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
+                                        rel, relend, howto, contents);
 
       if (info->relocatable)
         {
This page took 0.024002 seconds and 4 git commands to generate.