aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-05-13 04:47:59 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-05-13 04:47:59 -0700
commite69c76f4bfaf4c1b72f020f811afe03a5f7cd831 (patch)
tree151e266a775ef99bf77540ddc0166d0c5a972ef9 /gas
parent31955f993de7b502b7a89bba4f9c9b0a34f90b2c (diff)
downloadbinutils-e69c76f4bfaf4c1b72f020f811afe03a5f7cd831.zip
binutils-e69c76f4bfaf4c1b72f020f811afe03a5f7cd831.tar.gz
binutils-e69c76f4bfaf4c1b72f020f811afe03a5f7cd831.tar.bz2
Revert "Add -mno-shared to x86 assembler"
This reverts commit 573cc2e57db66165b390044338d3a4ad51f36bf8.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog10
-rw-r--r--gas/config/tc-i386.c17
-rw-r--r--gas/doc/c-i386.texi10
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/relax-4.d32
-rw-r--r--gas/testsuite/gas/i386/x86-64-relax-3.d33
7 files changed, 0 insertions, 110 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 7010e64..4877538 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -29,16 +29,6 @@
the symbol name checking code to here from...
(md_undefined_symbo): ... here.
-2015-05-08 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/tc-i386.c (no_shared): New.
- (OPTION_MNO_SHARED): Likewise.
- (elf_symbol_resolved_in_segment_p): Check no_shared.
- (md_longopts): Add mno-shared.
- (md_parse_option): Handle OPTION_MNO_SHARED.
- (md_show_usage): Add -mno-shared.
- * doc/c-i386.texi: Document -mno-shared.
-
2015-05-07 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (elf_symbol_resolved_in_segment_p): New.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index db263ee..75f268f 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -524,11 +524,6 @@ static enum x86_elf_abi x86_elf_abi = I386_ABI;
static int use_big_obj = 0;
#endif
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
-/* 1 if not generating code for a shared library. */
-static int no_shared = 0;
-#endif
-
/* 1 for intel syntax,
0 if att syntax. */
static int intel_syntax = 0;
@@ -8834,10 +8829,6 @@ elf_symbol_resolved_in_segment_p (symbolS *fr_symbol)
/* Symbol may be weak or local. */
return !S_IS_WEAK (fr_symbol);
- /* Non-weak symbols won't be preempted. */
- if (no_shared)
- return 1;
-
/* Global symbols with default visibility in a shared library may be
preempted by another definition. */
return ELF_ST_VISIBILITY (S_GET_OTHER (fr_symbol)) != STV_DEFAULT;
@@ -9537,7 +9528,6 @@ const char *md_shortopts = "qn";
#define OPTION_MBIG_OBJ (OPTION_MD_BASE + 18)
#define OPTION_OMIT_LOCK_PREFIX (OPTION_MD_BASE + 19)
#define OPTION_MEVEXRCIG (OPTION_MD_BASE + 20)
-#define OPTION_MNO_SHARED (OPTION_MD_BASE + 21)
struct option md_longopts[] =
{
@@ -9548,7 +9538,6 @@ struct option md_longopts[] =
#endif
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
{"x32", no_argument, NULL, OPTION_X32},
- {"mno-shared", no_argument, NULL, OPTION_MNO_SHARED},
#endif
{"divide", no_argument, NULL, OPTION_DIVIDE},
{"march", required_argument, NULL, OPTION_MARCH},
@@ -9609,10 +9598,6 @@ md_parse_option (int c, char *arg)
/* -s: On i386 Solaris, this tells the native assembler to use
.stab instead of .stab.excl. We always use .stab anyhow. */
break;
-
- case OPTION_MNO_SHARED:
- no_shared = 1;
- break;
#endif
#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
|| defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O))
@@ -10042,8 +10027,6 @@ md_show_usage (FILE *stream)
-mold-gcc support old (<= 2.8.1) versions of gcc\n"));
fprintf (stream, _("\
-madd-bnd-prefix add BND prefix for all valid branches\n"));
- fprintf (stream, _("\
- -mno-shared enable branch optimization for non shared code\n"));
# if defined (TE_PE) || defined (TE_PEP)
fprintf (stream, _("\
-mbig-obj generate big object files\n"));
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index 47bcbbb..1645c8c 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -298,16 +298,6 @@ The @code{.att_syntax} and @code{.intel_syntax} directives will take precedent.
This option forces the assembler to add BND prefix to all branches, even
if such prefix was not explicitly specified in the source code.
-@cindex @samp{-mno-shared} option, i386
-@cindex @samp{-mno-shared} option, x86-64
-@item -mno-shared
-On ELF target, the assembler normally generates code which can go into a
-shared library where non-weak symbols can be preempted. The
-@samp{-mno-shared} option tells the assembler to generate code not for
-a shared library, where non-weak symbols won't be preempted. The
-resulting code is slightly smaller. This option mainly affects the
-handling of branch instructions.
-
@cindex @samp{-mbig-obj} option, x86-64
@item -mbig-obj
On x86-64 PE/COFF target this option forces the use of big object file
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 9dbd94c..793b329 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -33,12 +33,6 @@
should not generate the warning.
* gas/arm/pr18347.l: Update expected output.
-2015-05-08 H.J. Lu <hongjiu.lu@intel.com>
-
- * gas/i386/i386.exp: Run relax-4 and x86-64-relax-3.
- * gas/i386/relax-4.d: New file.
- * gas/i386/x86-64-relax-3.d: Likewise.
-
2015-05-07 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/i386.exp: Run relax-3 and x86-64-relax-2.
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index c66dbc5..b6f2810 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -396,7 +396,6 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "note"
run_dump_test "relax-3"
- run_dump_test "relax-4"
if {![istarget "*-*-nacl*"]} then {
run_dump_test "iamcu-1"
@@ -764,7 +763,6 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_list_test "x86-64-size-inval-1" "-al"
run_dump_test "x86-64-relax-2"
- run_dump_test "x86-64-relax-3"
run_dump_test "x86-64-jump"
}
diff --git a/gas/testsuite/gas/i386/relax-4.d b/gas/testsuite/gas/i386/relax-4.d
deleted file mode 100644
index b188841..0000000
--- a/gas/testsuite/gas/i386/relax-4.d
+++ /dev/null
@@ -1,32 +0,0 @@
-#source: relax-3.s
-#as: -mno-shared
-#objdump: -dwr
-
-.*: +file format .*
-
-Disassembly of section .text:
-
-0+ <foo>:
-[ ]*[a-f0-9]+: eb 1c jmp 1e <local>
-[ ]*[a-f0-9]+: eb 16 jmp 1a <hidden_def>
-[ ]*[a-f0-9]+: eb 16 jmp 1c <global_def>
-[ ]*[a-f0-9]+: e9 fc ff ff ff jmp 7 <foo\+0x7> 7: (R_386_PC)?(DISP)?32 weak_def
-[ ]*[a-f0-9]+: e9 fc ff ff ff jmp c <foo\+0xc> c: (R_386_PC)?(DISP)?32 weak_hidden_undef
-[ ]*[a-f0-9]+: e9 fc ff ff ff jmp 11 <foo\+0x11> 11: (R_386_PC)?(DISP)?32 weak_hidden_def
-[ ]*[a-f0-9]+: e9 fc ff ff ff jmp 16 <foo\+0x16> 16: (R_386_PC)?(DISP)?32 hidden_undef
-
-0+1a <hidden_def>:
-[ ]*[a-f0-9]+: c3 ret
-
-0+1b <weak_hidden_def>:
-[ ]*[a-f0-9]+: c3 ret
-
-0+1c <global_def>:
-[ ]*[a-f0-9]+: c3 ret
-
-0+1d <weak_def>:
-[ ]*[a-f0-9]+: c3 ret
-
-0+1e <local>:
-[ ]*[a-f0-9]+: c3 ret
-#pass
diff --git a/gas/testsuite/gas/i386/x86-64-relax-3.d b/gas/testsuite/gas/i386/x86-64-relax-3.d
deleted file mode 100644
index d0c7ee4..0000000
--- a/gas/testsuite/gas/i386/x86-64-relax-3.d
+++ /dev/null
@@ -1,33 +0,0 @@
-#source: relax-3.s
-#as: -mno-shared
-#objdump: -dwr
-
-.*: +file format .*
-
-
-Disassembly of section .text:
-
-0+ <foo>:
-[ ]*[a-f0-9]+: eb 1c jmp 1e <local>
-[ ]*[a-f0-9]+: eb 16 jmp 1a <hidden_def>
-[ ]*[a-f0-9]+: eb 16 jmp 1c <global_def>
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq b <foo\+0xb> 7: R_X86_64_PC32 weak_def-0x4
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 10 <foo\+0x10> c: R_X86_64_PC32 weak_hidden_undef-0x4
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 15 <foo\+0x15> 11: R_X86_64_PC32 weak_hidden_def-0x4
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 1a <hidden_def> 16: R_X86_64_PC32 hidden_undef-0x4
-
-0+1a <hidden_def>:
-[ ]*[a-f0-9]+: c3 retq
-
-0+1b <weak_hidden_def>:
-[ ]*[a-f0-9]+: c3 retq
-
-0+1c <global_def>:
-[ ]*[a-f0-9]+: c3 retq
-
-0+1d <weak_def>:
-[ ]*[a-f0-9]+: c3 retq
-
-0+1e <local>:
-[ ]*[a-f0-9]+: c3 retq
-#pass