diff options
author | James Cowgill <James.Cowgill@imgtec.com> | 2017-09-22 00:54:19 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2017-09-22 00:54:19 +0100 |
commit | 42c0794e961fd7922ad1358bd7221a8c85278ccc (patch) | |
tree | b5f0280aab319cd0f4f22a29a21d67bc4af041f2 /gas/config/tc-mips.c | |
parent | 757bf54bb48a8417154cfdd7128c1775d43478d8 (diff) | |
download | gdb-42c0794e961fd7922ad1358bd7221a8c85278ccc.zip gdb-42c0794e961fd7922ad1358bd7221a8c85278ccc.tar.gz gdb-42c0794e961fd7922ad1358bd7221a8c85278ccc.tar.bz2 |
PR gas/21762: MIPS: Fix .stabs directive marking labels as MIPS16
If a .stabs directive was used before another .set directive in a MIPS
source file, s_mips_stab would call mips_mark_labels without having
initialized the mips_opts structure yet. Fix this by calling
file_mips_check_options which will initialize mips_opts if necessary.
gas/
PR gas/21762
* config/tc-mips.c (s_mips_stab): Insert call to
file_mips_check_options.
* testsuite/gas/mips/micromips@stabs-symbol-type.d: New test.
* testsuite/gas/mips/mips.exp: Run the new tests.
* testsuite/gas/mips/mips16@stabs-symbol-type.d: New test.
* testsuite/gas/mips/stabs-symbol-type.d: New test.
* testsuite/gas/mips/stabs-symbol-type.s: New test source.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 43a7033..e4351f7 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -17149,6 +17149,7 @@ s_nan (int ignore ATTRIBUTE_UNUSED) static void s_mips_stab (int type) { + file_mips_check_options (); mips_mark_labels (); s_stab (type); } |