From 7e9f44842b8d759356a7dba6e4a60d617d411f4f Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Sat, 15 May 2010 19:50:44 +0000 Subject: 2010-05-15 Kai Tietz * emultempl/pe.em (is_underscoring): New helper function. (gld_${EMULATION_NAME}_before_parse): Replace code for pe(p)_leading_underscore detection by is_underscoring. (U): Likewise. (GET_INIT_SYMBOL_NAME): Likewise. (U_SIZE): Likewise. (set_pe_name): (set_entry_point): (gld_${EMULATION_NAME}_set_symbols): * emultempl/pep.em: Likewise. * pe-dll.c (pe_detail_list): Set default underscoring for x64 target. (pe_dll_id_target): Add initialization of pe(p)_leading_underscore. --- ld/pe-dll.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ld/pe-dll.c') diff --git a/ld/pe-dll.c b/ld/pe-dll.c index 60d36a4558..5048c2077f 100644 --- a/ld/pe-dll.c +++ b/ld/pe-dll.c @@ -261,7 +261,11 @@ static pe_details_type pe_detail_list[] = #endif PE_ARCH_i386, bfd_arch_i386, +#ifdef pe_use_x86_64 + FALSE, +#else TRUE, +#endif autofilter_symbollist_i386 }, { @@ -416,9 +420,11 @@ pe_dll_id_target (const char *target) int u = pe_leading_underscore; /* Underscoring mode. -1 for use default. */ if (u == -1) bfd_get_target_info (target, NULL, NULL, &u, NULL); - if (u != -1) - pe_detail_list[i].underscored = (u != 0 ? TRUE : FALSE); + if (u == -1) + abort (); + pe_detail_list[i].underscored = (u != 0 ? TRUE : FALSE); pe_details = pe_detail_list + i; + pe_leading_underscore = (u != 0 ? 1 : 0); return; } einfo (_("%XUnsupported PEI architecture: %s\n"), target); -- cgit v1.2.1