Accept hidden COFF symbols, but treat them as if they were debugging symbols.
authorLuke Allardyce <lukeallardyce@gmail.com>
Fri, 11 Nov 2016 10:08:05 +0000 (10:08 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 11 Nov 2016 10:08:05 +0000 (10:08 +0000)
PR ld/20722
* coffcode.h (coff_slurp_symbol_table): Accept C_HIDDEN symbols,
but treat them as debugging symbols.

bfd/ChangeLog
bfd/coffcode.h

index abfda75b2b3bf0f3187886827f4aeec2c8ffcc2e..b8a1ba422518fbee8f7bae995e52147ca5871d93 100644 (file)
@@ -1,3 +1,9 @@
+2016-11-11  Luke Allardyce  <lukeallardyce@gmail.com>
+
+       PR ld/20722
+       * coffcode.h (coff_slurp_symbol_table): Accept C_HIDDEN symbols,
+       but treat them as debugging symbols.
+
 2016-11-10  Jiong Wang  <jiong.wang@arm.com>
 
        PR target/20737
index 0862f665024ad1ea3a6436f9208305c14a991d82..b926c65bbe3eb4af5424180f483563672875337f 100644 (file)
@@ -5068,7 +5068,6 @@ coff_slurp_symbol_table (bfd * abfd)
            case C_UEXT:        /* Tentative external definition.  */
 #endif
            case C_EXTLAB:      /* External load time label.  */
-           case C_HIDDEN:      /* Ext symbol in dmert public lib.  */
            default:
              _bfd_error_handler
                /* xgettext:c-format */
@@ -5076,6 +5075,10 @@ coff_slurp_symbol_table (bfd * abfd)
                 abfd, src->u.syment.n_sclass,
                 dst->symbol.section->name, dst->symbol.name);
              ret = FALSE;
+             /* Faal through.  */
+           case C_HIDDEN:      /* Ext symbol in dmert public lib.  */
+             /* PR 20722: These symbols can also be generated by
+                building DLLs with --gc-sections enabled.  */
              dst->symbol.flags = BSF_DEBUGGING;
              dst->symbol.value = (src->u.syment.n_value);
              break;