]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
This commit was manufactured by cvs2svn to create branch 'binutils-
authornobody <>
Sun, 5 Dec 2010 21:44:09 +0000 (21:44 +0000)
committernobody <>
Sun, 5 Dec 2010 21:44:09 +0000 (21:44 +0000)
2_21-branch'.

Cherrypick from master 2010-12-05 21:44:08 UTC Arnold Metselaar <arnold.metselaar@planet.nl> 'PR gas/12269':
    gas/testsuite/gas/i386/ifunc-2.l
    gas/testsuite/gas/i386/ifunc-2.s
    gas/testsuite/gas/i386/ifunc-3.d
    gas/testsuite/gas/i386/ifunc-3.s
    gas/testsuite/gas/z80/atend.d
    gas/testsuite/gas/z80/atend.s

gas/testsuite/gas/i386/ifunc-2.l [new file with mode: 0644]
gas/testsuite/gas/i386/ifunc-2.s [new file with mode: 0644]
gas/testsuite/gas/i386/ifunc-3.d [new file with mode: 0644]
gas/testsuite/gas/i386/ifunc-3.s [new file with mode: 0644]
gas/testsuite/gas/z80/atend.d [new file with mode: 0644]
gas/testsuite/gas/z80/atend.s [new file with mode: 0644]

diff --git a/gas/testsuite/gas/i386/ifunc-2.l b/gas/testsuite/gas/i386/ifunc-2.l
new file mode 100644 (file)
index 0000000..0ed314b
--- /dev/null
@@ -0,0 +1,61 @@
+.*/ifunc-2\.s: Assembler messages:
+.*/ifunc-2\.s:4: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:5: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:6: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:7: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:8: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:9: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:10: Error: can't resolve `bar1' {\.text\.1 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:11: Error: can't resolve `abs1' {\*ABS\* section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:12: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:19: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:20: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:21: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:22: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:23: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:24: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:25: Error: can't resolve `bar1' {\.text\.1 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:26: Error: can't resolve `abs1' {\*ABS\* section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:27: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:34: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:35: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:36: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:37: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:38: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:39: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:40: Error: can't resolve `bar1' {\.text\.1 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:41: Error: can't resolve `abs1' {\*ABS\* section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:42: Error: can't resolve `\.text\.1' {\.text\.1 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:44: Error: can't resolve `abs1' {\*ABS\* section} - `abs2' {\*ABS\* section}
+.*/ifunc-2\.s:45: Error: can't resolve `abs2' {\*ABS\* section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:50: Error: can't resolve `abs1' {\*ABS\* section} - `abs2' {\*ABS\* section}
+.*/ifunc-2\.s:51: Error: can't resolve `abs2' {\*ABS\* section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:56: Error: can't resolve `abs1' {\*ABS\* section} - `abs2' {\*ABS\* section}
+.*/ifunc-2\.s:57: Error: can't resolve `abs2' {\*ABS\* section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:62: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:63: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:64: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:65: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:66: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:67: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:68: Error: can't resolve `bar2' {\.text\.2 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:69: Error: can't resolve `abs1' {\*ABS\* section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:70: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:77: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:78: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:79: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:80: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:81: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:82: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:83: Error: can't resolve `bar2' {\.text\.2 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:84: Error: can't resolve `abs1' {\*ABS\* section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:85: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:92: Error: can't resolve `bar1' {\.text\.1 section} - `foo1' {\.text\.1 section}
+.*/ifunc-2\.s:93: Error: can't resolve `bar2' {\.text\.2 section} - `foo2' {\.text\.2 section}
+.*/ifunc-2\.s:94: Error: can't resolve `bar1' {\.text\.1 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:95: Error: can't resolve `bar2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:96: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar1' {\.text\.1 section}
+.*/ifunc-2\.s:97: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:98: Error: can't resolve `bar2' {\.text\.2 section} - `abs1' {\*ABS\* section}
+.*/ifunc-2\.s:99: Error: can't resolve `abs1' {\*ABS\* section} - `bar2' {\.text\.2 section}
+.*/ifunc-2\.s:100: Error: can't resolve `\.text\.2' {\.text\.2 section} - `bar2' {\.text\.2 section}
diff --git a/gas/testsuite/gas/i386/ifunc-2.s b/gas/testsuite/gas/i386/ifunc-2.s
new file mode 100644 (file)
index 0000000..ca536d3
--- /dev/null
@@ -0,0 +1,100 @@
+       .section .text.1,"ax",@progbits
+
+start1:
+       .long   bar1-foo1
+       .long   bar2-foo2
+       .long   bar1-bar2
+       .long   bar2-bar1
+       .long   start1-bar1
+       .long   start1-bar2
+       .long   bar1-abs1
+       .long   abs1-bar1
+       .long   .-bar1
+
+       .type   foo1,%gnu_indirect_function
+foo1:
+       ret
+       .size   foo1,.-foo1
+
+       .long   bar1-foo1
+       .long   bar2-foo2
+       .long   bar1-bar2
+       .long   bar2-bar1
+       .long   start1-bar1
+       .long   start1-bar2
+       .long   bar1-abs1
+       .long   abs1-bar1
+       .long   .-bar1
+
+       .type   bar1,%gnu_indirect_function
+bar1:
+       ret
+       .size   bar1,.-bar1
+
+       .long   bar1-foo1
+       .long   bar2-foo2
+       .long   bar1-bar2
+       .long   bar2-bar1
+       .long   start1-bar1
+       .long   start1-bar2
+       .long   bar1-abs1
+       .long   abs1-bar1
+       .long   .-bar1
+
+       .long   abs1-abs2
+       .long   abs2-abs1
+
+       .equ    abs1,0x11223300
+       .type   abs1,%gnu_indirect_function
+
+       .long   abs1-abs2
+       .long   abs2-abs1
+
+       .equ    abs2,0x11223380
+       .type   abs2,%gnu_indirect_function
+
+       .long   abs1-abs2
+       .long   abs2-abs1
+
+       .section .text.2,"ax",@progbits
+
+start2:
+       .long   bar1-foo1
+       .long   bar2-foo2
+       .long   bar1-bar2
+       .long   bar2-bar1
+       .long   start2-bar1
+       .long   start2-bar2
+       .long   bar2-abs1
+       .long   abs1-bar2
+       .long   .-bar2
+
+       .type   foo2,%gnu_indirect_function
+foo2:
+       ret
+       .size   foo2,.-foo2
+
+       .long   bar1-foo1
+       .long   bar2-foo2
+       .long   bar1-bar2
+       .long   bar2-bar1
+       .long   start2-bar1
+       .long   start2-bar2
+       .long   bar2-abs1
+       .long   abs1-bar2
+       .long   .-bar2
+
+       .type   bar2,%gnu_indirect_function
+bar2:
+       ret
+       .size   bar2,.-bar2
+
+       .long   bar1-foo1
+       .long   bar2-foo2
+       .long   bar1-bar2
+       .long   bar2-bar1
+       .long   start2-bar1
+       .long   start2-bar2
+       .long   bar2-abs1
+       .long   abs1-bar2
+       .long   .-bar2
diff --git a/gas/testsuite/gas/i386/ifunc-3.d b/gas/testsuite/gas/i386/ifunc-3.d
new file mode 100644 (file)
index 0000000..124de37
--- /dev/null
@@ -0,0 +1,57 @@
+#readelf: --relocs --syms -x .text.1 -x .text.2
+#name: i386 ifunc 3
+
+Relocation section '\.rel\.text\.1' at offset .* contains .* entries:
+ Offset     Info    Type            Sym.Value  Sym. Name
+00000000  ........ R_386_PC32        bar1\(\)     bar1
+00000004  ........ R_386_PC32        bar2\(\)     bar2
+00000008  ........ R_386_PC32        bar1\(\)     bar1
+0000000c  ........ R_386_PC32        bar2\(\)     bar2
+00000010  ........ R_386_32          bar1\(\)     bar1
+00000018  ........ R_386_PC32        bar1\(\)     bar1
+0000001c  ........ R_386_PC32        bar2\(\)     bar2
+00000020  ........ R_386_PC32        bar1\(\)     bar1
+00000024  ........ R_386_PC32        bar2\(\)     bar2
+00000028  ........ R_386_32          bar1\(\)     bar1
+0000002c  ........ R_386_PC32        abs1\(\)     abs1
+00000030  ........ R_386_PC32        abs1\(\)     abs1
+00000034  ........ R_386_32          abs1\(\)     abs1
+00000038  ........ R_386_PC32        abs1\(\)     abs1
+0000003c  ........ R_386_PC32        abs1\(\)     abs1
+00000040  ........ R_386_32          abs1\(\)     abs1
+
+Relocation section '\.rel\.text\.2' at offset .* contains .* entries:
+ Offset     Info    Type            Sym.Value  Sym. Name
+00000000  ........ R_386_PC32        bar1\(\)     bar1
+00000004  ........ R_386_PC32        bar2\(\)     bar2
+00000008  ........ R_386_PC32        bar1\(\)     bar1
+0000000c  ........ R_386_PC32        bar2\(\)     bar2
+00000010  ........ R_386_32          bar2\(\)     bar2
+00000018  ........ R_386_PC32        bar1\(\)     bar1
+0000001c  ........ R_386_PC32        bar2\(\)     bar2
+00000020  ........ R_386_PC32        bar1\(\)     bar1
+00000024  ........ R_386_PC32        bar2\(\)     bar2
+00000028  ........ R_386_32          bar2\(\)     bar2
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value  Size Type    Bind   Vis      Ndx Name
+#...
+.*: 00000014     1 IFUNC   LOCAL  DEFAULT   .* bar1
+.*: 00000014     1 IFUNC   LOCAL  DEFAULT   .* bar2
+#...
+.*: 11223300     0 IFUNC   LOCAL  DEFAULT  ABS abs1
+#...
+
+Hex dump of section '\.text\.1':
+ NOTE: This section has relocations against it, but these have NOT been applied to this dump\.
+  0x00000000 00000000 00000000 08000000 0c000000 .*
+  0x00000010 4054ffff c38d7600 00000000 00000000 .*
+  0x00000020 20000000 24000000 4054ffff 00000000 .*
+  0x00000030 30000000 4054ffff 00000000 3c000000 .*
+  0x00000040 4054ffff                            .*
+
+Hex dump of section '\.text\.2':
+ NOTE: This section has relocations against it, but these have NOT been applied to this dump\.
+  0x00000000 00000000 00000000 08000000 0c000000 .*
+  0x00000010 4054ffff c38d7600 00000000 00000000 .*
+  0x00000020 20000000 24000000 4054ffff          .*
diff --git a/gas/testsuite/gas/i386/ifunc-3.s b/gas/testsuite/gas/i386/ifunc-3.s
new file mode 100644 (file)
index 0000000..dbcf494
--- /dev/null
@@ -0,0 +1,54 @@
+       .section .text.1,"ax",@progbits
+
+start1:
+       .long   bar1-.
+       .long   bar2-.
+       .long   bar1-start1
+       .long   bar2-start1
+       .long   bar1-base
+
+       .type   bar1,%gnu_indirect_function
+bar1:
+       ret
+       .size   bar1,.-bar1
+       .align  4
+
+       .long   bar1-.
+       .long   bar2-.
+       .long   bar1-start1
+       .long   bar2-start1
+       .long   bar1-base
+
+       .long   abs1-.
+       .long   abs1-start1
+       .long   abs1-base
+
+       .equ    abs1,0x11223300
+       .type   abs1,%gnu_indirect_function
+
+       .long   abs1-.
+       .long   abs1-start1
+       .long   abs1-base
+
+       .section .text.2,"ax",@progbits
+
+start2:
+       .long   bar1-.
+       .long   bar2-.
+       .long   bar1-start2
+       .long   bar2-start2
+       .long   bar2-base
+
+       .type   bar2,%gnu_indirect_function
+bar2:
+       ret
+       .size   bar2,.-bar2
+       .align  4
+
+       .long   bar1-.
+       .long   bar2-.
+       .long   bar1-start2
+       .long   bar2-start2
+       .long   bar2-base
+
+       .equ    base,0xabc0
diff --git a/gas/testsuite/gas/z80/atend.d b/gas/testsuite/gas/z80/atend.d
new file mode 100644 (file)
index 0000000..e0427b1
--- /dev/null
@@ -0,0 +1,13 @@
+#objdump: -d
+#name: index intructions with label as offset
+
+.*: .*
+
+Disassembly of section .text:
+
+00000000 <begin>:
+[       ]+0:[  ]+3e 20[        ]+ld a,0x20
+[       ]+2:[  ]+dd 7e 20[     ]+ld a,\(ix\+32\)
+[       ]+5:[  ]+3e 40[        ]+ld a,0x40
+[       ]+7:[  ]+dd 7e 40[     ]+ld a,\(ix\+64\)
+[       ]+a:[  ]+c9[   ]+ret
diff --git a/gas/testsuite/gas/z80/atend.s b/gas/testsuite/gas/z80/atend.s
new file mode 100644 (file)
index 0000000..2fd6725
--- /dev/null
@@ -0,0 +1,15 @@
+begin:
+
+offsetAtStart:    equ   32
+
+            LD    A, offsetAtStart
+            LD    A, (IX + offsetAtStart)
+
+            LD    A, offsetAtEnd
+            LD    A, (IX + offsetAtEnd)
+
+            RET
+
+offsetAtEnd:      equ   64
+            END
+