aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-02-15 07:37:11 +0000
committerJan Beulich <jbeulich@novell.com>2005-02-15 07:37:11 +0000
commit0ca3e4557f03289c3b174dd841dfa73dbe51d505 (patch)
treeb3179806724ab64c11a48f9231a2831db2d0a364 /gas/testsuite
parent2fac3d48f3188e1ebd61881223b6e0b576241c9f (diff)
downloadgdb-0ca3e4557f03289c3b174dd841dfa73dbe51d505.zip
gdb-0ca3e4557f03289c3b174dd841dfa73dbe51d505.tar.gz
gdb-0ca3e4557f03289c3b174dd841dfa73dbe51d505.tar.bz2
bfd/
2005-02-15 Jan Beulich <jbeulich@novell.com> * elfxx-ia64.c (ia64_howto_table): Correct strings for R_IA64_DTPMOD64[LM]SB. gas/ 2005-02-15 Jan Beulich <jbeulich@novell.com> * config/tc-ia64.c (ia64_gen_real_reloc_type): Define and initialize new variables type, suffix, and width. Handle BFD_RELOC_IA64_DIR(32|64)[LM]SB in FUNC_LT_FPTR_RELATIVE case. Handle BFD_RELOC_IA64_DIR64[LM]SB in FUNC_TP_RELATIVE case. Add FUNC_DTP_MODULE case. Handle BFD_RELOC_IA64_DIR32[LM]SB in FUNC_DTP_RELATIVE case. Return incoming relocation type if BFD_RELOC_IA64_IPLT[LM]SB in FUNC_IPLT_RELOC case. Generate warning if unable to translate relocation type, using the new variables. gas/testsuite/ 2005-02-15 Jan Beulich <jbeulich@novell.com> * gas/ia64/reloc.[ds]: New. * gas/ia64/reloc-bad.[ls]: New. * gas/ia64/ia64.exp: Run new tests.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/ia64/ia64.exp3
-rw-r--r--gas/testsuite/gas/ia64/reloc-bad.l43
-rw-r--r--gas/testsuite/gas/ia64/reloc-bad.s61
-rw-r--r--gas/testsuite/gas/ia64/reloc.d64
-rw-r--r--gas/testsuite/gas/ia64/reloc.s82
6 files changed, 259 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 454dcc2..1844441 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2005-02-15 Jan Beulich <jbeulich@novell.com>
+ * gas/ia64/reloc.[ds]: New.
+ * gas/ia64/reloc-bad.[ls]: New.
+ * gas/ia64/ia64.exp: Run new tests.
+
+2005-02-15 Jan Beulich <jbeulich@novell.com>
+
* gas/ia64/operand-or.d: Pass -xnone to assembler.
2005-02-13 Jan Beulich <jbeulich@novell.com>
diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp
index 0455b2e..a6fe570 100644
--- a/gas/testsuite/gas/ia64/ia64.exp
+++ b/gas/testsuite/gas/ia64/ia64.exp
@@ -49,6 +49,9 @@ if [istarget "ia64-*"] then {
run_dump_test "dependency-1"
+ run_dump_test "reloc"
+ run_list_test "reloc-bad" ""
+
run_dump_test "real"
run_dump_test "align"
run_dump_test "order"
diff --git a/gas/testsuite/gas/ia64/reloc-bad.l b/gas/testsuite/gas/ia64/reloc-bad.l
new file mode 100644
index 0000000..5a2df9a
--- /dev/null
+++ b/gas/testsuite/gas/ia64/reloc-bad.l
@@ -0,0 +1,43 @@
+.*: Assembler messages:
+.*:[[:digit:]]+: (Error|Warning): .* GPREL14 .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF14 .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF32[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF64[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* PLTOFF14 .*
+.*:[[:digit:]]+: (Error|Warning): .* PLTOFF32[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* FPTR14 .*
+.*:[[:digit:]]+: (Error|Warning): .* FPTR22 .*
+.*:[[:digit:]]+: (Error|Warning): .* PCREL14 .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_FPTR14 .*
+.*:[[:digit:]]+: (Error|Warning): .* SEGREL14 .*
+.*:[[:digit:]]+: (Error|Warning): .* SEGREL22 .*
+.*:[[:digit:]]+: (Error|Warning): .* SEGREL64I .*
+.*:[[:digit:]]+: (Error|Warning): .* SECREL14 .*
+.*:[[:digit:]]+: (Error|Warning): .* SECREL22 .*
+.*:[[:digit:]]+: (Error|Warning): .* SECREL64I .*
+.*:[[:digit:]]+: (Error|Warning): .* LTV14 .*
+.*:[[:digit:]]+: (Error|Warning): .* LTV22 .*
+.*:[[:digit:]]+: (Error|Warning): .* LTV64I .*
+.*:[[:digit:]]+: (Error|Warning): .* IPLT14 .*
+.*:[[:digit:]]+: (Error|Warning): .* IPLT22 .*
+.*:[[:digit:]]+: (Error|Warning): .* IPLT64I .*
+.*:[[:digit:]]+: (Error|Warning): .* IPLT32[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* IPLT64[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF14X .*
+.*:[[:digit:]]+: (Error|Warning): .* TPREL32[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_TPREL14 .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_TPREL64I .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_TPREL32[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_TPREL64[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* DTPMOD14 .*
+.*:[[:digit:]]+: (Error|Warning): .* DTPMOD22 .*
+.*:[[:digit:]]+: (Error|Warning): .* DTPMOD64I .*
+.*:[[:digit:]]+: (Error|Warning): .* DTPMOD32[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_DTPMOD14 .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_DTPMOD64I .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_TPREL32[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_TPREL64[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_DTPREL14 .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_DTPREL64I .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_DTPREL32[LM]SB .*
+.*:[[:digit:]]+: (Error|Warning): .* LTOFF_DTPREL64[LM]SB .*
diff --git a/gas/testsuite/gas/ia64/reloc-bad.s b/gas/testsuite/gas/ia64/reloc-bad.s
new file mode 100644
index 0000000..ed61e32
--- /dev/null
+++ b/gas/testsuite/gas/ia64/reloc-bad.s
@@ -0,0 +1,61 @@
+ .global esym
+ .section .rodata, "a", @progbits
+ .text
+_start:
+ adds r1 = @gprel(esym), r0
+
+ adds r1 = @ltoff(esym), r0
+ .xdata4 .rodata, @ltoff(esym)
+ .xdata8 .rodata, @ltoff(esym)
+
+ adds r1 = @pltoff(esym), r0
+ .xdata4 .rodata, @pltoff(esym)
+
+ adds r1 = @fptr(esym), r0
+ mov r2 = @fptr(esym)
+
+ adds r1 = @pcrel(esym), r0
+
+ adds r1 = @ltoff(@fptr(esym)), r0
+
+ adds r1 = @segrel(esym), r0
+ mov r2 = @segrel(esym)
+ movl r3 = @segrel(esym)
+
+ adds r1 = @secrel(esym), r0
+ mov r2 = @secrel(esym)
+ movl r3 = @secrel(esym)
+
+ adds r1 = @ltv(esym), r0
+ mov r2 = @ltv(esym)
+ movl r3 = @ltv(esym)
+
+ adds r1 = @iplt(esym), r0
+ mov r2 = @iplt(esym)
+ movl r3 = @iplt(esym)
+ .xdata4 .rodata, @iplt(esym)
+ .xdata8 .rodata, @iplt(esym)
+
+ adds r1 = @ltoffx(esym), r0
+
+ .xdata4 .rodata, @tprel(esym)
+
+ adds r1 = @ltoff(@tprel(esym)), r0
+ movl r3 = @ltoff(@tprel(esym))
+ .xdata4 .rodata, @ltoff(@tprel(esym))
+ .xdata8 .rodata, @ltoff(@tprel(esym))
+
+ adds r1 = @dtpmod(esym), r0
+ mov r2 = @dtpmod(esym)
+ movl r3 = @dtpmod(esym)
+ .xdata4 .rodata, @dtpmod(esym)
+
+ adds r1 = @ltoff(@dtpmod(esym)), r0
+ movl r3 = @ltoff(@dtpmod(esym))
+ .xdata4 .rodata, @ltoff(@tprel(esym))
+ .xdata8 .rodata, @ltoff(@tprel(esym))
+
+ adds r1 = @ltoff(@dtprel(esym)), r0
+ movl r3 = @ltoff(@dtprel(esym))
+ .xdata4 .rodata, @ltoff(@dtprel(esym))
+ .xdata8 .rodata, @ltoff(@dtprel(esym))
diff --git a/gas/testsuite/gas/ia64/reloc.d b/gas/testsuite/gas/ia64/reloc.d
new file mode 100644
index 0000000..467282d
--- /dev/null
+++ b/gas/testsuite/gas/ia64/reloc.d
@@ -0,0 +1,64 @@
+#objdump: -r
+#name: ia64 relocations
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET[[:space:]]+TYPE[[:space:]]+VALUE[[:space:]]*
+[[:xdigit:]]+[012][[:space:]]+IMM14[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+IMM22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+IMM64[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+GPREL22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+GPREL64I[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+LTOFF22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+LTOFF64I[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+PLTOFF22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+PLTOFF64I[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+FPTR64I[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+PCREL60B[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+PCREL21B[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+PCREL21M[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+PCREL21F[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+LTOFF_FPTR22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+LTOFF_FPTR64I[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+PCREL22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+PCREL64I[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+LTOFF22X[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+LDXMOV[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+TPREL14[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+TPREL22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+TPREL64I[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+LTOFF_TPREL22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+LTOFF_DTPMOD22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+DTPREL14[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+DTPREL22[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+DTPREL64I[[:space:]]+esym
+[[:xdigit:]]+[012][[:space:]]+LTOFF_DTPREL22[[:space:]]+esym
+
+RELOCATION RECORDS FOR \[\.rodata\.4\]:
+OFFSET[[:space:]]+TYPE[[:space:]]+VALUE[[:space:]]*
+[[:xdigit:]]+[048cC][[:space:]]+DIR32[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[048cC][[:space:]]+GPREL32[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[048cC][[:space:]]+FPTR32[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[048cC][[:space:]]+PCREL32[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[048cC][[:space:]]+LTOFF_FPTR32[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[048cC][[:space:]]+SEGREL32[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[048cC][[:space:]]+SECREL32[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[048cC][[:space:]]+LTV32[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[048cC][[:space:]]+DTPREL32[LM]SB[[:space:]]+esym
+
+RELOCATION RECORDS FOR \[\.rodata\.8\]:
+OFFSET[[:space:]]+TYPE[[:space:]]+VALUE[[:space:]]*
+[[:xdigit:]]+[08][[:space:]]+DIR64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+GPREL64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+PLTOFF64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+FPTR64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+PCREL64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+LTOFF_FPTR64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+SEGREL64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+SECREL64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+LTV64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+IPLT[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+TPREL64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+DTPMOD64[LM]SB[[:space:]]+esym
+[[:xdigit:]]+[08][[:space:]]+DTPREL64[LM]SB[[:space:]]+esym
diff --git a/gas/testsuite/gas/ia64/reloc.s b/gas/testsuite/gas/ia64/reloc.s
new file mode 100644
index 0000000..e5caa7c
--- /dev/null
+++ b/gas/testsuite/gas/ia64/reloc.s
@@ -0,0 +1,82 @@
+ .global esym
+ .section .rodata.4, "a", @progbits
+ .section .rodata.8, "a", @progbits
+ .text
+_start:
+ adds r1 = esym, r0
+ mov r2 = esym
+ movl r3 = esym
+ .xdata4 .rodata.4, esym
+ .xdata8 .rodata.8, esym
+
+ mov r2 = @gprel(esym)
+ movl r3 = @gprel(esym)
+ .xdata4 .rodata.4, @gprel(esym)
+ .xdata8 .rodata.8, @gprel(esym)
+
+ mov r2 = @ltoff(esym)
+ movl r3 = @ltoff(esym)
+
+ mov r2 = @pltoff(esym)
+ movl r3 = @pltoff(esym)
+ .xdata8 .rodata.8, @pltoff(esym)
+
+ movl r3 = @fptr(esym)
+ .xdata4 .rodata.4, @fptr(esym)
+ .xdata8 .rodata.8, @fptr(esym)
+
+ brl.call.sptk b1 = esym
+ br.call.sptk b2 = esym
+ chk.s r0, esym
+ fchkf esym
+ .xdata4 .rodata.4, @pcrel(esym)
+ .xdata8 .rodata.8, @pcrel(esym)
+
+ mov r2 = @ltoff(@fptr(esym))
+ movl r3 = @ltoff(@fptr(esym))
+ .xdata4 .rodata.4, @ltoff(@fptr(esym))
+ .xdata8 .rodata.8, @ltoff(@fptr(esym))
+
+ .xdata4 .rodata.4, @segrel(esym)
+ .xdata8 .rodata.8, @segrel(esym)
+
+ .xdata4 .rodata.4, @secrel(esym)
+ .xdata8 .rodata.8, @secrel(esym)
+
+ // REL32 only in executables
+ // REL64 only in executables
+
+ .xdata4 .rodata.4, @ltv(esym)
+ .xdata8 .rodata.8, @ltv(esym)
+
+//todo PCREL21BI
+ mov r2 = @pcrel(esym)
+ movl r3 = @pcrel(esym)
+
+ .xdata16 .rodata.8, @iplt(esym)
+
+ // COPY only in executables
+
+//todo movl r3 = -esym
+
+ mov r2 = @ltoffx(esym)
+ ld8.mov r3 = [r2], esym
+
+ adds r1 = @tprel(esym), r0
+ mov r2 = @tprel(esym)
+ movl r3 = @tprel(esym)
+ .xdata8 .rodata.8, @tprel(esym)
+
+ mov r2 = @ltoff(@tprel(esym))
+
+ .xdata8 .rodata.8, @dtpmod(esym)
+
+ mov r2 = @ltoff(@dtpmod(esym))
+
+ adds r1 = @dtprel(esym), r0
+ mov r2 = @dtprel(esym)
+ movl r3 = @dtprel(esym)
+ .xdata4 .rodata.4, @dtprel(esym)
+ .xdata8 .rodata.8, @dtprel(esym)
+
+ mov r2 = @ltoff(@dtprel(esym))