summaryrefslogtreecommitdiff
path: root/gas/config/tc-mips.c
diff options
context:
space:
mode:
authorFaraz Shahbazker <fshahbazker@wavecomp.com>2019-05-06 09:09:02 -0700
committerFaraz Shahbazker <fshahbazker@wavecomp.com>2019-05-20 11:08:23 -0700
commitd87343802b81ad123a27beccb140d406f54727c6 (patch)
tree009550005a43b878031c01be5ab6eafd390bd10f /gas/config/tc-mips.c
parentcffc205c9eaacfa312323807cd60b9d3d1c26894 (diff)
downloadbinutils-gdb-d87343802b81ad123a27beccb140d406f54727c6.tar.gz
[MIPS] PR gas/14798: Limit IRIX5 specific default typing to IRIX targets
On IRIX 5, every global symbol that is not explicitly labelled as being a function is assumed to be an object. There is no reason why IRIX behaviour should extend to all MIPS targets, so limit this to only IRIX targets. gas/ PR 14798 * config/tc-mips.c (s_mips_globl): Only treat symbols that are not explicitly labelled as BSF_OBJECTs for IRIX targets. * testsuite/gas/mips/pr14798.s: New test source. * testsuite/gas/mips/pr14798-irix.d: New test. * testsuite/gas/mips/pr14798.d: Likewise. * testsuite/gas/mips/mips.exp: Run the new tests. binutils/ PR 14798 * testsuite/binutils-all/readelf.ss-mips: Update reference output. * testsuite/binutils-all/readelf.ss-tmips: Likewise. ld/ PR 14798 * testsuite/ld-mips-elf/reloc-6a.s: Specify .text section for global code symbols. * testsuite/ld-mips-elf/reloc-6b.s: Likewise.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r--gas/config/tc-mips.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 1c5dc7a8830..0f0ace51800 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -16454,9 +16454,13 @@ s_mips_globl (int x ATTRIBUTE_UNUSED)
*input_line_pointer = c;
SKIP_WHITESPACE_AFTER_NAME ();
+#ifdef TE_IRIX
/* On Irix 5, every global symbol that is not explicitly labelled as
being a function is apparently labelled as being an object. */
flag = BSF_OBJECT;
+#else
+ flag = BSF_NO_FLAGS;
+#endif
if (!is_end_of_line[(unsigned char) *input_line_pointer]
&& (*input_line_pointer != ','))