From 36bd86fa510ec16c32d7d7134b5897787a3f54b2 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Wed, 22 Aug 2018 11:42:53 +0000 Subject: [PATCH] Allw for Darwin to operate with an assembler supporting gotoff in data. gcc/ * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O specific test before the one for HAVE_AS_GOTOFF_IN_DATA. From-SVN: r263764 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a0e321d874d..a3c675352dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-08-22 Iain Sandoe + + * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O + specific test before the one for HAVE_AS_GOTOFF_IN_DATA. + 2018-08-22 Iain Sandoe PR bootstrap/81033 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 0b2b1b796d6..03118102319 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -19768,8 +19768,6 @@ ix86_output_addr_diff_elt (FILE *file, int value, int rel) if (TARGET_64BIT || TARGET_VXWORKS_RTP) fprintf (file, "%s%s%d-%s%d\n", directive, LPREFIX, value, LPREFIX, rel); - else if (HAVE_AS_GOTOFF_IN_DATA) - fprintf (file, ASM_LONG "%s%d@GOTOFF\n", LPREFIX, value); #if TARGET_MACHO else if (TARGET_MACHO) { @@ -19778,6 +19776,8 @@ ix86_output_addr_diff_elt (FILE *file, int value, int rel) putc ('\n', file); } #endif + else if (HAVE_AS_GOTOFF_IN_DATA) + fprintf (file, ASM_LONG "%s%d@GOTOFF\n", LPREFIX, value); else asm_fprintf (file, ASM_LONG "%U%s+[.-%s%d]\n", GOT_SYMBOL_NAME, LPREFIX, value); -- 2.30.2