}
static const char *
-asm_prefix (int mach, const char *name)
+asm_prefix (const char *name)
{
- /* ??? --leading_underscore is only supported on x86. */
- if (!(mach == M386 || mach == MX86))
- return "";
/* Symbol names starting with ? do not have a leading underscore. */
if (name && *name == '?')
return "";
#define ASM_ALIGN_SHORT mtable[machine].how_align_short
#define ASM_RVA_BEFORE rvabefore (machine)
#define ASM_RVA_AFTER rvaafter (machine)
-#define ASM_PREFIX(NAME) asm_prefix (machine, (NAME))
+#define ASM_PREFIX(NAME) asm_prefix (NAME)
#define ASM_ALIGN_LONG mtable[machine].how_align_long
#define HOW_BFD_READ_TARGET 0 /* Always default. */
#define HOW_BFD_WRITE_TARGET mtable[machine].how_bfd_target
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-if {![istarget "i*86-*-*"]
- && ![istarget "x86_64-*-mingw*"]
- && ![istarget "arm-*-pe*"]} {
+if { ![is_pecoff_format] } {
return
}
-if {![istarget "i*86-*-*pe*"] \
- && ![istarget "i*86-*-cygwin*"] \
- && ![istarget "i*86-*-mingw32*"] \
- && ![istarget "arm-*-pe*"] \
- && ![istarget "x86_64-*-mingw*"] } {
- set target_xfail "yes"
-} else {
- set target_xfail "no"
-}
-
-# PR 19459: The ARM does not support inserting a leading underscore.
-if { [istarget "arm-*-pe*"] } {
- set target_no_leading_underscore "yes"
-} else {
- set target_no_leading_underscore "no"
-}
-
if {![info exists DLLTOOL]} then {
return
}
pass "dlltool (fastcall export)"
}
-if { "$target_xfail" == "yes" } {
- setup_xfail *-*
-}
-
verbose "$DLLTOOL -l libversion.a --def $srcdir/$subdir/version.def $dlltool_gas_flag" 1
catch "exec $DLLTOOL -l libersion.a --def $srcdir/$subdir/version.def $dlltool_gas_flag" err
pass "dlltool (version.dll)"
}
-if { "$target_xfail" == "yes" } {
- setup_xfail *-*
-}
-
verbose "$DLLTOOL -p prefix --leading-underscore -l tmpdir/libalias.a -d $srcdir/$subdir/alias.def $dlltool_gas_flag" 1
catch "exec $DLLTOOL -p prefix --leading-underscore -l tmpdir/libalias.a -d $srcdir/$subdir/alias.def $dlltool_gas_flag" err
pass "dlltool -p (execution)"
set got [binutils_run $NM "tmpdir/libalias.a"]
-if { "$target_no_leading_underscore" == "yes" } {
- set want "00000000 I __imp_prefixsymbol.*00000000 T prefixsymbol.*00000000 I __imp_symbol.*00000000 T symbol"
-} else {
- set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
-}
+set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
if [regexp $want $got] then {
pass "dlltool -p (symbol names)"
pass "dlltool -p (execution) alias-2.def"
set got [binutils_run $NM "tmpdir/libalias2.a"]
-if { "$target_no_leading_underscore" == "yes" } {
- set want "00000000 I __imp_prefixsymbol.*00000000 T prefixsymbol.*00000000 I __imp_symbol.*00000000 T symbol"
-} else {
- set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
-}
+set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
if [regexp $want $got] then {
pass "dlltool -p (symbol names) alias-2.def"
pass "dlltool -p (execution leading-underscore)"
set got [binutils_run $NM "tmpdir/libalias_u.a"]
-if { "$target_no_leading_underscore" == "yes" } {
- set want "00000000 I __imp_prefixsymbol.*00000000 T prefixsymbol.*00000000 I __imp_symbol.*00000000 T symbol"
-} else {
- set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
-}
-
-if { "$target_xfail" == "yes" } {
- setup_xfail *-*
-}
+set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
if [regexp $want $got] then {
pass "dlltool -p (symbol names leading underscore)"
pass "dlltool -p (execution leading underscore) alias-2.def"
set got [binutils_run $NM "tmpdir/libalias_u2.a"]
-if { "$target_no_leading_underscore" == "yes" } {
- set want "00000000 I __imp_prefixsymbol.*00000000 T prefixsymbol.*00000000 I __imp_symbol.*00000000 T symbol"
-} else {
- set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
-}
+set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
if [regexp $want $got] then {
pass "dlltool -p (symbol names leading underscore) alias-2.def"