2011-09-09 Kai Tietz <ktietz@redhat.com>
authorKai Tietz <kai.tietz@onevision.com>
Fri, 9 Sep 2011 16:28:12 +0000 (16:28 +0000)
committerKai Tietz <kai.tietz@onevision.com>
Fri, 9 Sep 2011 16:28:12 +0000 (16:28 +0000)
        * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
        for targets without symbol_leading_char.

bfd/ChangeLog
bfd/peicode.h

index d3c38e71ec3d62849084a4b134d9ffb748756715..5339ad0f4c5c7832fe47a95dee94e0fe93a03b47 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-09  Kai Tietz  <ktietz@redhat.com>
+
+       * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
+       for targets without symbol_leading_char.
+
 2011-09-08  Bernd Jendrissek  <bernd.jendrissek@gmail.com>
 
        * bfdwin.c (bfd_get_file_window): Fix memory leak.
index bca644dc622d846138f2734bac23fa6664899030..5d100298f15150152cda4e7ccd9866402009dac7 100644 (file)
@@ -884,7 +884,11 @@ pe_ILF_build_a_bfd (bfd *           abfd,
       if (import_name_type != IMPORT_NAME)
        {
          char c = symbol[0];
-         if (c == '_' || c == '@' || c == '?')
+         
+         /* Check that we don't remove for targets with empty
+            USER_LABEL_PREFIX the leading underscore.  */
+         if ((c == '_' && abfd->xvec->symbol_leading_char != 0)
+             || c == '@' || c == '?')
            symbol++;
        }