summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2008-07-10 19:05:29 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2008-07-10 19:05:29 +0000
commit177b6151b6564f929b03d9758c8dc6ed0f2c1691 (patch)
tree91a87d8ff6a86e482a46aff233d2d9232176f3b9 /gas
parent6aaf56daf22eee688b0e23fdeadec3b489c992d5 (diff)
downloadbinutils-redhat-177b6151b6564f929b03d9758c8dc6ed0f2c1691.tar.gz
include/elf/
* mips.h (ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): New macros. bfd/ * elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16. (mips_elf_calculate_relocation): Likewise. (_bfd_mips_elf_add_symbol_hook): Likewise. (_bfd_mips_elf_finish_dynamic_symbol): Likewise. (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise. opcodes/ * mips-dis.c (_print_insn_mips): Use ELF_ST_IS_MIPS16. gas/ * config/tc-mips.c (mips16_mark_labels): Use ELF_ST_SET_MIPS16. (mips_fix_adjustable): Likewise. (mips_frob_file_after_relocs): Likewise. gas/testsuite/ * gas/mips/mips16-vis-1.d, gas/mips/mips16-vis-1.s: New tests. * gas/mips/mips.exp: Run them.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-mips.c6
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/mips/mips.exp2
-rw-r--r--gas/testsuite/gas/mips/mips16-vis-1.d3
-rw-r--r--gas/testsuite/gas/mips/mips16-vis-1.s7
6 files changed, 26 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 16ee4def21..447c152923 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * config/tc-mips.c (mips16_mark_labels): Use ELF_ST_SET_MIPS16.
+ (mips_fix_adjustable): Likewise.
+ (mips_frob_file_after_relocs): Likewise.
+
2008-07-08 Nathan Sidwell <nathan@codesourcery.com>
* config/tc-m68k.c (m68k_set_cpu, m68k_set_arch): Don't complain
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index d5ed84ceb2..d12d3c412b 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -2321,7 +2321,7 @@ mips16_mark_labels (void)
#if defined(OBJ_ELF) || defined(OBJ_MAYBE_ELF)
if (IS_ELF)
- S_SET_OTHER (label, STO_MIPS16);
+ S_SET_OTHER (label, ELF_ST_SET_MIPS16 (S_GET_OTHER (label)));
#endif
if ((S_GET_VALUE (label) & 1) == 0
/* Don't adjust the address if the label is global or weak, or
@@ -13976,7 +13976,7 @@ mips_fix_adjustable (fixS *fixp)
that we have for MIPS16 symbols. */
if (IS_ELF
&& fixp->fx_subsy == NULL
- && (S_GET_OTHER (fixp->fx_addsy) == STO_MIPS16
+ && (ELF_ST_IS_MIPS16 (S_GET_OTHER (fixp->fx_addsy))
|| *symbol_get_tc (fixp->fx_addsy)))
return 0;
#endif
@@ -14453,7 +14453,7 @@ mips_frob_file_after_relocs (void)
count = bfd_get_symcount (stdoutput);
for (i = 0; i < count; i++, syms++)
{
- if (elf_symbol (*syms)->internal_elf_sym.st_other == STO_MIPS16
+ if (ELF_ST_IS_MIPS16 (elf_symbol (*syms)->internal_elf_sym.st_other)
&& ((*syms)->value & 1) != 0)
{
(*syms)->value &= ~1;
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index d3cead1b6a..680badd06e 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gas/mips/mips16-vis-1.d, gas/mips/mips16-vis-1.s: New tests.
+ * gas/mips/mips.exp: Run them.
+
2008-07-09 Kai Tietz <kai.tietz@onevision.com>
* gas/i386/i386.exp (x86-64-pcrel): Disable for w64.
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 8ee4646ecf..16edfb73a9 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -827,4 +827,6 @@ if { [istarget mips*-*-vxworks*] } {
run_list_test_arches "mips-double-float-flag" \
"-32 -msingle-float -mdouble-float" \
[mips_arch_list_matching mips1]
+
+ run_dump_test "mips16-vis-1"
}
diff --git a/gas/testsuite/gas/mips/mips16-vis-1.d b/gas/testsuite/gas/mips/mips16-vis-1.d
new file mode 100644
index 0000000000..7cdce48265
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips16-vis-1.d
@@ -0,0 +1,3 @@
+# readelf: --symbols
+#...
+.*: 0+0 * 2 * FUNC * GLOBAL * HIDDEN \[MIPS16\] * [0-9]+ foo
diff --git a/gas/testsuite/gas/mips/mips16-vis-1.s b/gas/testsuite/gas/mips/mips16-vis-1.s
new file mode 100644
index 0000000000..01cb1baf41
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips16-vis-1.s
@@ -0,0 +1,7 @@
+ .set mips16
+ .globl foo
+ .hidden foo
+ .ent foo
+foo:
+ nop
+ .end foo