Fix PR17226, ld --gc-sections segfaults on sparc-linux
authorAlan Modra <amodra@gmail.com>
Tue, 5 Aug 2014 01:19:54 +0000 (10:49 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 5 Aug 2014 01:19:54 +0000 (10:49 +0930)
PR ld/17226
* elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Typo fix.

bfd/ChangeLog
bfd/elfxx-sparc.c

index 876de33..6085db8 100644 (file)
@@ -1,5 +1,10 @@
 2014-08-05  Alan Modra  <amodra@gmail.com>
 
+       PR ld/17226
+       * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Typo fix.
+
+2014-08-05  Alan Modra  <amodra@gmail.com>
+
        * linker.c (generic_link_check_archive_element): Move handling
        of command link -u symbols with a common symbol def to the
        code handling non-common symbols so that archive element symbols
index e8ebcb3..2a5eb01 100644 (file)
@@ -1970,7 +1970,7 @@ _bfd_sparc_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
        }
 
       r_type = SPARC_ELF_R_TYPE (rel->r_info);
-      r_type = sparc_elf_tls_transition (info, abfd, r_type, h != NULL);
+      r_type = sparc_elf_tls_transition (info, abfd, r_type, h == NULL);
       switch (r_type)
        {
        case R_SPARC_TLS_LDM_HI22: