aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog10
-rw-r--r--gas/config/tc-mips.c4
-rw-r--r--gas/testsuite/gas/mips/mips.exp6
-rw-r--r--gas/testsuite/gas/mips/pr14798-irix.d6
-rw-r--r--gas/testsuite/gas/mips/pr14798.d5
-rw-r--r--gas/testsuite/gas/mips/pr14798.s4
6 files changed, 35 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index bc2b906..2230f44 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,13 @@
+2019-05-20 Faraz Shahbazker <fshahbazker@wavecomp.com>
+
+ 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.
+
2019-05-17 John Darrington <john@darrington.wattle.id.au>
* doc/c-arm.texi (ARM Options): Remove "(r)" and "(tm)"
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 1c5dc7a..0f0ace5 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 != ','))
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 4db6683..c8ecd04 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -2087,4 +2087,10 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test_arches "llpscp-32" [mips_arch_list_matching mips32r6]
run_dump_test_arch "llpscp-64" "" mips64r6
+
+ if [istarget *-*-irix*] {
+ run_dump_test "pr14798-irix"
+ } else {
+ run_dump_test "pr14798"
+ }
}
diff --git a/gas/testsuite/gas/mips/pr14798-irix.d b/gas/testsuite/gas/mips/pr14798-irix.d
new file mode 100644
index 0000000..155a10c
--- /dev/null
+++ b/gas/testsuite/gas/mips/pr14798-irix.d
@@ -0,0 +1,6 @@
+#DUMPPROG: readelf
+#readelf: -s
+#source: pr14798.s
+#...
+ *[0-9]+: +[0-9]+ +[0-9]+ +OBJECT +GLOBAL +DEFAULT +[0-9]+ foo
+#pass
diff --git a/gas/testsuite/gas/mips/pr14798.d b/gas/testsuite/gas/mips/pr14798.d
new file mode 100644
index 0000000..cfdef3e
--- /dev/null
+++ b/gas/testsuite/gas/mips/pr14798.d
@@ -0,0 +1,5 @@
+#DUMPPROG: readelf
+#readelf: -s
+#...
+ *[0-9]+: +[0-9]+ +[0-9]+ +NOTYPE +GLOBAL +DEFAULT +[0-9]+ foo
+#pass
diff --git a/gas/testsuite/gas/mips/pr14798.s b/gas/testsuite/gas/mips/pr14798.s
new file mode 100644
index 0000000..1ee2486
--- /dev/null
+++ b/gas/testsuite/gas/mips/pr14798.s
@@ -0,0 +1,4 @@
+ .text
+ .globl foo
+foo:
+ nop