aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-12-05 23:20:40 +0000
committerRichard Henderson <rth@redhat.com>2002-12-05 23:20:40 +0000
commitfa2c7effe700e9bd50092557403e118c702ffde8 (patch)
tree216d40ae5195369b62bf527d47d1b3594c1540f5 /gas
parenta9a9bd0f6672cfb4a9131288759bb0dd60ec0738 (diff)
downloadfsf-binutils-gdb-fa2c7effe700e9bd50092557403e118c702ffde8.zip
fsf-binutils-gdb-fa2c7effe700e9bd50092557403e118c702ffde8.tar.gz
fsf-binutils-gdb-fa2c7effe700e9bd50092557403e118c702ffde8.tar.bz2
* config/ia64.c (enum reloc_func): Add FUNC_LT_RELATIVE_X.
(ia64_gen_real_reloc_type): Handle it. (pseudo_func): Add @ltoffx. (md_begin): Build .<ltoffx>. (ia64_force_relocation): True for LTOFF22X and LDXMOV. * gas/ia64/ltoff22x-1.[ds]: New. * gas/ia64/ia64.exp: Run it.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-ia64.c17
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/ia64/ia64.exp1
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-1.d10
-rw-r--r--gas/testsuite/gas/ia64/ltoff22x-1.s4
6 files changed, 45 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4283fea..fbc9ba0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2002-12-05 Richard Henderson <rth@redhat.com>
+
+ * config/ia64.c (enum reloc_func): Add FUNC_LT_RELATIVE_X.
+ (ia64_gen_real_reloc_type): Handle it.
+ (pseudo_func): Add @ltoffx.
+ (md_begin): Build .<ltoffx>.
+ (ia64_force_relocation): True for LTOFF22X and LDXMOV.
+
2002-12-05 Alan Modra <amodra@bigpond.net.au>
* config/tc-arm.c (arm_force_relocation): Move out of #if OBJ_ELF.
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index cd14e31..1feedf5 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -82,6 +82,7 @@ enum reloc_func
FUNC_FPTR_RELATIVE,
FUNC_GP_RELATIVE,
FUNC_LT_RELATIVE,
+ FUNC_LT_RELATIVE_X,
FUNC_PC_RELATIVE,
FUNC_PLT_RELATIVE,
FUNC_SEC_RELATIVE,
@@ -487,6 +488,7 @@ pseudo_func[] =
{ "fptr", PSEUDO_FUNC_RELOC, { 0 } },
{ "gprel", PSEUDO_FUNC_RELOC, { 0 } },
{ "ltoff", PSEUDO_FUNC_RELOC, { 0 } },
+ { "ltoffx", PSEUDO_FUNC_RELOC, { 0 } },
{ "pcrel", PSEUDO_FUNC_RELOC, { 0 } },
{ "pltoff", PSEUDO_FUNC_RELOC, { 0 } },
{ "secrel", PSEUDO_FUNC_RELOC, { 0 } },
@@ -6544,6 +6546,10 @@ md_begin ()
symbol_new (".<ltoff>", undefined_section, FUNC_LT_RELATIVE,
&zero_address_frag);
+ pseudo_func[FUNC_LT_RELATIVE_X].u.sym =
+ symbol_new (".<ltoffx>", undefined_section, FUNC_LT_RELATIVE_X,
+ &zero_address_frag);
+
pseudo_func[FUNC_PC_RELATIVE].u.sym =
symbol_new (".<pcrel>", undefined_section, FUNC_PC_RELATIVE,
&zero_address_frag);
@@ -10000,6 +10006,9 @@ ia64_force_relocation (fix)
case BFD_RELOC_IA64_PLTOFF64I:
case BFD_RELOC_IA64_PLTOFF64MSB:
case BFD_RELOC_IA64_PLTOFF64LSB:
+
+ case BFD_RELOC_IA64_LTOFF22X:
+ case BFD_RELOC_IA64_LDXMOV:
return 1;
default:
@@ -10160,6 +10169,14 @@ ia64_gen_real_reloc_type (sym, r_type)
}
break;
+ case FUNC_LT_RELATIVE_X:
+ switch (r_type)
+ {
+ case BFD_RELOC_IA64_IMM22: new = BFD_RELOC_IA64_LTOFF22X; break;
+ default: break;
+ }
+ break;
+
case FUNC_PC_RELATIVE:
switch (r_type)
{
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index d28d961..61ad4c2 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-05 Richard Henderson <rth@redhat.com>
+
+ * gas/ia64/ltoff22x-1.[ds]: New.
+ * gas/ia64/ia64.exp: Run it.
+
2002-12-05 Jim Wilson <wilson@redhat.com>
* gas/ia64/opc-x.d: Regenerate.
diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp
index 6c44468..3a672a7 100644
--- a/gas/testsuite/gas/ia64/ia64.exp
+++ b/gas/testsuite/gas/ia64/ia64.exp
@@ -38,4 +38,5 @@ if [istarget "ia64-*"] then {
run_dump_test "tls"
run_dump_test "ldxmov-1"
run_list_test "ldxmov-2" ""
+ run_dump_test "ltoff22x-1"
}
diff --git a/gas/testsuite/gas/ia64/ltoff22x-1.d b/gas/testsuite/gas/ia64/ltoff22x-1.d
new file mode 100644
index 0000000..6eef416
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-1.d
@@ -0,0 +1,10 @@
+# objdump: -r
+# name: ia64 ltoff22x-1
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET TYPE VALUE
+0000000000000000 LTOFF22X foo
+
+
diff --git a/gas/testsuite/gas/ia64/ltoff22x-1.s b/gas/testsuite/gas/ia64/ltoff22x-1.s
new file mode 100644
index 0000000..d7be940
--- /dev/null
+++ b/gas/testsuite/gas/ia64/ltoff22x-1.s
@@ -0,0 +1,4 @@
+ .text
+ addl r3 = @ltoffx(foo#), gp
+ nop.i 0
+ nop.i 0