From e7771322561f06ec5831058f42161b4f9128b372 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 9 Sep 2011 16:28:12 +0000 Subject: [PATCH] 2011-09-09 Kai Tietz * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore for targets without symbol_leading_char. --- bfd/ChangeLog | 5 +++++ bfd/peicode.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d3c38e71ec3..5339ad0f4c5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2011-09-09 Kai Tietz + + * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore + for targets without symbol_leading_char. + 2011-09-08 Bernd Jendrissek * bfdwin.c (bfd_get_file_window): Fix memory leak. diff --git a/bfd/peicode.h b/bfd/peicode.h index bca644dc622..5d100298f15 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -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++; } -- 2.30.2