diff options
author | Faraz Shahbazker <fshahbazker@wavecomp.com> | 2019-05-06 09:09:02 -0700 |
---|---|---|
committer | Faraz Shahbazker <fshahbazker@wavecomp.com> | 2019-05-20 11:08:23 -0700 |
commit | d87343802b81ad123a27beccb140d406f54727c6 (patch) | |
tree | 009550005a43b878031c01be5ab6eafd390bd10f /gas/testsuite/gas/mips | |
parent | cffc205c9eaacfa312323807cd60b9d3d1c26894 (diff) | |
download | binutils-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/testsuite/gas/mips')
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/pr14798-irix.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/pr14798.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/pr14798.s | 4 |
4 files changed, 21 insertions, 0 deletions
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 4db66833d01..c8ecd04e943 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 00000000000..155a10cd5dc --- /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 00000000000..cfdef3e3c64 --- /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 00000000000..1ee2486b1b7 --- /dev/null +++ b/gas/testsuite/gas/mips/pr14798.s @@ -0,0 +1,4 @@ + .text + .globl foo +foo: + nop |