diff options
Diffstat (limited to 'binutils-2.21/ld/testsuite/ld-sh/sh64')
78 files changed, 4276 insertions, 0 deletions
diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/abi32.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/abi32.sd new file mode 100644 index 0000000..8b22e46 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/abi32.sd @@ -0,0 +1,16 @@ + +.*: file format .*-sh64.* + +Contents of section \.text: + 1000 cc000190 c8015590 6bf56630 6ff0fff0 .* + 1010 cc000210 c8400610 cc000150 c8403550 .* + 1020 cffffd90 cbff9590 6bf56630 cc0002b0 .* + 1030 c843e2b0 cc000350 c843c350 cc000040 .* + 1040 c843f040 cc000190 c8004590 6bf56650 .* + 1050 cc000190 c8002590 6bf56410 6ff0fff0 .* + 1060 6ff0fff0 .* +Contents of section \.data: + 10e8 000010f4 0000100d 0000105d 000010e8 .* + 10f8 000010e8 0000100d .* +Contents of section \.stack: + 80000 deaddead .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/abi32.xd b/binutils-2.21/ld/testsuite/ld-sh/sh64/abi32.xd new file mode 100644 index 0000000..94b1014 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/abi32.xd @@ -0,0 +1,45 @@ + +.*: file format .*-sh64 +.* +architecture: sh5, flags 0x00000112: +EXEC_P, HAS_SYMS, D_PAGED +start address 0x0+1011 + +Program Header: + LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7 + filesz 0x0+64 memsz 0x0+64 flags r-x + LOAD off 0x0+168 vaddr 0x0+10e8 paddr 0x0+10e8 align 2\*\*7 + filesz 0x0+18 memsz 0x0+18 flags rw- + LOAD off 0x0+180 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7 + filesz 0x0+4 memsz 0x0+4 flags rw- + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 00000064 0+1000 0+1000 00000100 2\*\*0 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 \.data 00000018 0+10e8 0+10e8 00000168 2\*\*2 + CONTENTS, ALLOC, LOAD, DATA + 2 \.stack 00000004 0+80000 0+80000 00000180 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA +SYMBOL TABLE: +0+1000 l d \.text 0+ (|\.text) +0+10e8 l d \.data 0+ (|\.data) +0+80000 l d \.stack 0+ (|\.stack) +0+10f4 l \.data 0+ foobar +0+10fc l \.data 0+ foobar2 +0+1060 l \.text 0+ 0x04 plugh +0+10f8 g \.data 0+ foobar +0+10e8 g \.data 0+ baz +0+10e8 g .* 0+ ___dtors +0+105c g \.text 0+ 0x04 xyzzy +0+1100 g \*ABS\* 0+ __bss_start +0+10e8 g .* 0+ ___ctors_end +0+10f0 g \.data 0+ baz2 +0+10e8 g .* 0+ ___ctors +0+1000 g \.text 0+ 0x04 foo +0+1100 g \*ABS\* 0+ _edata +0+1100 g \*ABS\* 0+ _end +0+1010 g \.text 0+ 0x04 start +0+100c g \.text 0+ 0x04 bar +0+80000 g \.stack 0+ _stack +0+10e8 g .* 0+ ___dtors_end diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/abi64.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/abi64.sd new file mode 100644 index 0000000..ff26740 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/abi64.sd @@ -0,0 +1,20 @@ + +.*: file format .*-sh64 + +Contents of section \.text: + 1000 cc000190 c8000190 c8000190 c8025590 .* + 1010 6bf56630 6ff0fff0 cc000210 c8000210 .* + 1020 c8000210 c8400610 cc000150 c8000150 .* + 1030 c8000150 c8405550 cffffd90 cbfffd90 .* + 1040 cbfffd90 cbff3590 6bf56630 cc0002b0 .* + 1050 c80002b0 c80002b0 c84502b0 cc000350 .* + 1060 c8000350 c8000350 c844e350 cc000040 .* + 1070 c8000040 c8000040 c8451040 cc000190 .* + 1080 c8000190 c8000190 c8006590 6bf56650 .* + 1090 cc000190 c8000190 c8000190 c8002590 .* + 10a0 6bf56410 6ff0fff0 6ff0fff0 .* +Contents of section \.data: + 1130 0000113c 00001015 000010a5 00001130 .* + 1140 00001130 00001015 .* +Contents of section \.stack: + 80000 deaddead .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/abi64.xd b/binutils-2.21/ld/testsuite/ld-sh/sh64/abi64.xd new file mode 100644 index 0000000..9af5b47 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/abi64.xd @@ -0,0 +1,44 @@ +.*: file format .*-sh64 +.* +architecture: sh5, flags 0x00000112: +EXEC_P, HAS_SYMS, D_PAGED +start address 0x0000000000001019 + +Program Header: + LOAD off 0x0000000000000100 vaddr 0x0000000000001000 paddr 0x0000000000001000 align 2\*\*7 + filesz 0x00000000000000ac memsz 0x00000000000000ac flags r-x + LOAD off 0x00000000000001b0 vaddr 0x0000000000001130 paddr 0x0000000000001130 align 2\*\*7 + filesz 0x0000000000000018 memsz 0x0000000000000018 flags rw- + LOAD off 0x0000000000000200 vaddr 0x0000000000080000 paddr 0x0000000000080000 align 2\*\*7 + filesz 0x0000000000000004 memsz 0x0000000000000004 flags rw- + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 000000ac 0000000000001000 0000000000001000 00000100 2\*\*0 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 \.data 00000018 0000000000001130 0000000000001130 000001b0 2\*\*2 + CONTENTS, ALLOC, LOAD, DATA + 2 \.stack 00000004 0000000000080000 0000000000080000 00000200 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA +SYMBOL TABLE: +0000000000001000 l d \.text 0000000000000000 (|\.text) +0000000000001130 l d \.data 0000000000000000 (|\.data) +0000000000080000 l d \.stack 0000000000000000 (|\.stack) +000000000000113c l \.data 0000000000000000 foobar +0000000000001144 l \.data 0000000000000000 foobar2 +00000000000010a8 l \.text 0000000000000000 0x04 plugh +0000000000001140 g \.data 0000000000000000 foobar +0000000000001130 g \.data 0000000000000000 baz +0000000000001130 g .* 0000000000000000 ___dtors +00000000000010a4 g \.text 0000000000000000 0x04 xyzzy +0000000000001148 g \*ABS\* 0000000000000000 __bss_start +0000000000001130 g .* 0000000000000000 ___ctors_end +0000000000001138 g \.data 0000000000000000 baz2 +0000000000001130 g .* 0000000000000000 ___ctors +0000000000001000 g \.text 0000000000000000 0x04 foo +0000000000001148 g \*ABS\* 0000000000000000 _edata +0000000000001148 g \*ABS\* 0000000000000000 _end +0000000000001018 g \.text 0000000000000000 0x04 start +0000000000001014 g \.text 0000000000000000 0x04 bar +0000000000080000 g \.stack 0000000000000000 _stack +0000000000001130 g .* 0000000000000000 ___dtors_end diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/abixx-noexp.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/abixx-noexp.sd new file mode 100644 index 0000000..ce11156 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/abixx-noexp.sd @@ -0,0 +1,12 @@ + +.*: file format .*-sh64 + +Contents of section \.text: + 1000 e8002a30 6ff0fff0 cc400610 cc401550 .* + 1010 ebfff630 cc4302b0 cc42e350 cc431040 .* + 1020 e8000a50 e8000810 6ff0fff0 6ff0fff0 .* +Contents of section \.data: + 10b0 000010bc 00001005 00001029 000010b0 .* + 10c0 000010b0 00001005 .* +Contents of section \.stack: + 80000 deaddead .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/cmpct1.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/cmpct1.sd new file mode 100644 index 0000000..1f7e8a1 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/cmpct1.sd @@ -0,0 +1,9 @@ + +.*: file format elf32-sh64 + +Contents of section \.text: + 1000 c7000009 0009ea2a .* +Contents of section \.rodata: + 1008 00001000 0000100c 00001004 .* +Contents of section \.stack: + 80000 deaddead .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/cmpct1.xd b/binutils-2.21/ld/testsuite/ld-sh/sh64/cmpct1.xd new file mode 100644 index 0000000..41f898e --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/cmpct1.xd @@ -0,0 +1,36 @@ + +.*: file format .*-sh64 +.* +architecture: sh5, flags 0x00000112: +EXEC_P, HAS_SYMS, D_PAGED +start address 0x0+1000 + +Program Header: + LOAD off 0x0+80 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7 + filesz 0x0+14 memsz 0x0+14 flags r-x + LOAD off 0x0+100 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7 + filesz 0x00000004 memsz 0x00000004 flags rw- + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 00000008 0+1000 0+1000 00000080 2\*\*0 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 \.rodata 0000000c 0+1008 0+1008 00000088 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 2 \.stack 00000004 0+80000 0+80000 00000100 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA +SYMBOL TABLE: +0+1000 l d \.text 0+ (|\.text) +0+1008 l d \.rodata 0+ (|\.rodata) +0+80000 l d \.stack 0+ (|\.stack) +0+1004 l \.text 0+ next +0+100c l \.rodata 0+ here +0+1098 g .* 0+ ___dtors +0+1098 g \*ABS\* 0+ __bss_start +0+1098 g .* 0+ ___ctors_end +0+1098 g .* 0+ ___ctors +0+1098 g \*ABS\* 0+ _edata +0+1098 g \*ABS\* 0+ _end +0+1000 g \.text 0+ start +0+80000 g \.stack 0+ _stack +0+1098 g .* 0+ ___dtors_end diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-1.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-1.s new file mode 100644 index 0000000..5dfae88 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-1.s @@ -0,0 +1,8 @@ +! Support file for .cranges tests to resolve all references for +! non-partial-link tests. + .section .init,"ax" + .mode SHmedia + .global start + .align 2 +start: + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2a.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2a.s new file mode 100644 index 0000000..9af6bbe --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2a.s @@ -0,0 +1,22 @@ +! Simple example with assembler-generated .cranges that do not need more +! .cranges added by the linker: A single section with SHmedia, constants +! and SHcompact. + .section .text.mixed,"ax" + .align 2 +! Make sure this symbol does not have the expected type. + .mode SHcompact + .global diversion2 +diversion2: + + .mode SHmedia +start2: + nop + nop + nop + + .long 42 + .long 43 + + .mode SHcompact + nop + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2b.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2b.s new file mode 100644 index 0000000..670a448 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2b.s @@ -0,0 +1,39 @@ +! Initially three separate sections, one with SHmedia and constants, one with +! SHcompact, and yet another with SHmedia. Two .cranges sections +! generated by the assembler; two more needed at link time, as they will be +! consolidated into the same section, and mixed with a file with +! assembler-generated .cranges only and one without any .cranges. + + .section .text.shmedia,"ax" + .mode SHmedia + .align 2 +sec1: + nop + nop + nop + nop +sec2: + .long 41 + .long 43 + .long 42 + .long 43 + .long 42 + + .section .text.shcompact,"ax" + .align 1 + .mode SHcompact +sec3: + nop + nop + nop + + .section .text.shmedia2,"ax" + .align 2 +sec4: + .mode SHmedia + nop + nop + nop + nop + nop + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2c.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2c.s new file mode 100644 index 0000000..fcc350d --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2c.s @@ -0,0 +1,16 @@ +! First part of crange-2b.s, but in section .text.mixed. + + .section .text.mixed,"ax" + .mode SHmedia + .align 2 +sec1: + nop + nop + nop + nop +sec2: + .long 41 + .long 43 + .long 42 + .long 43 + .long 42 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2d.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2d.s new file mode 100644 index 0000000..11f3d5b --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2d.s @@ -0,0 +1,9 @@ +! Second part of crange-2b.s, but in section .text.mixed. + + .section .text.mixed,"ax" + .align 1 + .mode SHcompact +sec3: + nop + nop + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2e.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2e.s new file mode 100644 index 0000000..3d7c997 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2e.s @@ -0,0 +1,12 @@ +! Third part of crange-2b.s, but in section .text.mixed. + + .section .text.mixed,"ax" + .align 2 +sec4: + .mode SHmedia + nop + nop + nop + nop + nop + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2f.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2f.s new file mode 100644 index 0000000..a8479c9 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2f.s @@ -0,0 +1,21 @@ +! Section with SHmedia in unique section. Note the absence of a symbol to +! key an ISA type. + + .section .text.2f,"ax" + .align 2 + + .mode SHmedia + movi 0x2f,r20 + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + movi 0x2f,r21 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2g.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2g.s new file mode 100644 index 0000000..ac7aacb --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2g.s @@ -0,0 +1,26 @@ +! Section with SHmedia in unique section, similar to crange-2f.s + + .section .text.2g,"ax" + .align 2 + + .mode SHmedia + movi 0x21,r12 + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + movi 0x21,r13 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2h.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2h.s new file mode 100644 index 0000000..99c6146 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2h.s @@ -0,0 +1,17 @@ +! SHcompact in .text, similar to crange-2f.s and crange-2g.s + .section .text,"ax" + .align 2 + + .mode SHcompact + mov #0xf,r1 + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + mov #0xe,r1 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2i.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2i.s new file mode 100644 index 0000000..78c1ce9 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange-2i.s @@ -0,0 +1,8 @@ +! If this file comes before a file with a SHcompact .text section but with +! no symbols, we will have a symbol of the "wrong kind" before the +! SHcompact insns. + .section .text,"ax" + .mode SHmedia + .align 2 + .global diversion +diversion: diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange1.rd b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange1.rd new file mode 100644 index 0000000..2d2e69c --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange1.rd @@ -0,0 +1,46 @@ +.* + +Section Headers: + +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al + +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0 + +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4 + +\[ 2\] \.text +PROGBITS +00001004 000084 000018 00 AXp +0 +0 +4 + +\[ 3\] \.stack +PROGBITS +00080000 000100 000004 00 +WA +0 +0 +1 + +\[ 4\] \.cranges +LOUSER\+1 +00000000 000104 00001e 00 +W +0 +0 +1 + +\[ 5\] \.shstrtab +STRTAB +.* + +\[ 6\] \.symtab +SYMTAB +.* + +\[ 7\] \.strtab +STRTAB +.* +Key to Flags: +#... + +There are no relocations in this file\. + +Symbol table '\.symtab' contains [0-9]+ entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name +.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND +.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1 +.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2 +.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3 +.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4 +.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2 +.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors +.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start +.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end +.*: 00001004 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2 +.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors +.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata +.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end +.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start +.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack +.*: 000010a0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end + +Hex dump of section '\.init': + 0x00001000 6ff0fff0 .* + +Hex dump of section '\.text': + 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .* + 0x00001014 0000002b 00090009 .* + +Hex dump of section '\.cranges': + 0x00000000 00001004 0000000c 00030000 10100000 .* + 0x00000010 00080001 00001018 00000004 0002 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange2.rd b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange2.rd new file mode 100644 index 0000000..3ee4dbb --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange2.rd @@ -0,0 +1,54 @@ +.* + +Section Headers: + +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al + +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0 + +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4 + +\[ 2\] \.text +PROGBITS +00001004 000084 00005c 00 AXp +0 +0 +4 + +\[ 3\] \.stack +PROGBITS +00080000 000100 000004 00 +WA +0 +0 +1 + +\[ 4\] \.cranges +LOUSER\+1 +00000000 000104 000046 00 +W +0 +0 +1 + +\[ 5\] \.shstrtab +STRTAB +.* + +\[ 6\] \.symtab +SYMTAB +.* + +\[ 7\] \.strtab +STRTAB +.* +Key to Flags: +#... + +There are no relocations in this file\. + +Symbol table '\.symtab' contains [0-9]+ entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name +.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND +.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1 +.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2 +.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3 +.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4 +.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2 +.*: 0000101c +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 sec1 +.*: 0000102c +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 sec2 +.*: 00001040 +0 +NOTYPE +LOCAL +DEFAULT +2 sec3 +.*: 00001048 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4 +.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors +.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start +.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end +.*: 00001004 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2 +.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors +.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata +.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end +.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start +.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack +.*: 000010e0 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end + +Hex dump of section '\.text': + 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .* + 0x00001014 0000002b 00090009 6ff0fff0 6ff0fff0 .* + 0x00001024 6ff0fff0 6ff0fff0 00000029 0000002b .* + 0x00001034 0000002a 0000002b 0000002a 00090009 .* + 0x00001044 00090000 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001054 6ff0fff0 6ff0fff0 6ff0fff0 .* + +Hex dump of section '\.cranges': + 0x00000000 00001004 0000000c 00030000 10100000 .* + 0x00000010 00080001 00001018 00000004 00020000 .* + 0x00000020 101c0000 00100003 0000102c 00000014 .* + 0x00000030 00010000 10400000 00060002 00001048 .* + 0x00000040 00000018 0003 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd new file mode 100644 index 0000000..21f5ec2 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3-cmpct.rd @@ -0,0 +1,77 @@ +ELF Header: + +Magic: +7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 + +Class: +ELF32 + +Data: +2's complement, big endian + +Version: +1 \(current\) + +OS/ABI: +UNIX - System V + +ABI Version: +0 + +Type: +EXEC \(Executable file\) + +Machine: +Renesas / SuperH SH + +Version: +0x1 + +Entry point address: +0x10c4 + +Start of program headers: +52 \(bytes into file\) + +Start of section headers: +504 \(bytes into file\) + +Flags: +0xa, sh5 + +Size of this header: +52 \(bytes\) + +Size of program headers: +32 \(bytes\) + +Number of program headers: +2 + +Size of section headers: +40 \(bytes\) + +Number of section headers: +8 + +Section header string table index: 5 + +Section Headers: + +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al + +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0 + +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4 + +\[ 2\] \.text +PROGBITS +00001004 000084 0000d8 00 AXp +0 +0 +4 + +\[ 3\] \.stack +PROGBITS +00080000 000180 000004 00 +WA +0 +0 +1 + +\[ 4\] \.cranges +LOUSER\+1 +00000000 000184 00003c 00 +W +0 +0 +1 + +\[ 5\] \.shstrtab +STRTAB +.* + +\[ 6\] \.symtab +SYMTAB +.* + +\[ 7\] \.strtab +STRTAB +.* +Key to Flags: +#... + +Symbol table '\.symtab' contains [0-9]+ entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name +.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND +.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1 +.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2 +.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3 +.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4 +.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4 +.*: 000010a4 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2 +.*: 000010bc +0 +NOTYPE +LOCAL +DEFAULT +2 sec3 +.*: 000010c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +2 diversion +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end +.*: 000010a4 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2 +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end +.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start +.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end + +Hex dump of section '\.text': + 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001014 6ff0fff0 6ff0fff0 cc00bd40 6ff0fff0 .* + 0x00001024 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001034 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001044 6ff0fff0 6ff0fff0 6ff0fff0 cc00bd50 .* + 0x00001054 cc0084c0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001064 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001074 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001084 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001094 6ff0fff0 6ff0fff0 6ff0fff0 cc0084d0 .* + 0x000010a4 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .* + 0x000010b4 0000002b 00090009 00090009 00090000 .* + 0x000010c4 e10f0009 00090009 00090009 00090009 .* + 0x000010d4 00090009 0009e10e .* + +Hex dump of section '\.cranges': + 0x00000000 00001004 000000a0 00030000 10a40000 .* + 0x00000010 000c0003 000010b0 00000008 00010000 .* + 0x00000020 10b80000 00040002 000010bc 00000006 .* + 0x00000030 00020000 10c40000 00180002 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3-media.rd b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3-media.rd new file mode 100644 index 0000000..18ce30e --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3-media.rd @@ -0,0 +1,77 @@ +ELF Header: + +Magic: +7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 + +Class: +ELF32 + +Data: +2's complement, big endian + +Version: +1 \(current\) + +OS/ABI: +UNIX - System V + +ABI Version: +0 + +Type: +EXEC \(Executable file\) + +Machine: +Renesas / SuperH SH + +Version: +0x1 + +Entry point address: +0x10a5 + +Start of program headers: +52 \(bytes into file\) + +Start of section headers: +504 \(bytes into file\) + +Flags: +0xa, sh5 + +Size of this header: +52 \(bytes\) + +Size of program headers: +32 \(bytes\) + +Number of program headers: +2 + +Size of section headers: +40 \(bytes\) + +Number of section headers: +8 + +Section header string table index: 5 + +Section Headers: + +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al + +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0 + +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4 + +\[ 2\] \.text +PROGBITS +00001004 000084 0000d8 00 AXp +0 +0 +4 + +\[ 3\] \.stack +PROGBITS +00080000 000180 000004 00 +WA +0 +0 +1 + +\[ 4\] \.cranges +LOUSER\+1 +00000000 000184 00003c 00 +W +0 +0 +1 + +\[ 5\] \.shstrtab +STRTAB +.* + +\[ 6\] \.symtab +SYMTAB +.* + +\[ 7\] \.strtab +STRTAB +.* +Key to Flags: +#... + +Symbol table '\.symtab' contains [0-9]+ entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name +.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND +.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1 +.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2 +.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3 +.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4 +.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4 +.*: 000010a4 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2 +.*: 000010bc +0 +NOTYPE +LOCAL +DEFAULT +2 sec3 +.*: 000010c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +2 diversion +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end +.*: 000010a4 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2 +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end +.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start +.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end + +Hex dump of section '\.text': + 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001014 6ff0fff0 6ff0fff0 cc00bd40 6ff0fff0 .* + 0x00001024 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001034 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001044 6ff0fff0 6ff0fff0 6ff0fff0 cc00bd50 .* + 0x00001054 cc0084c0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001064 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001074 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001084 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001094 6ff0fff0 6ff0fff0 6ff0fff0 cc0084d0 .* + 0x000010a4 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .* + 0x000010b4 0000002b 00090009 00090009 00090000 .* + 0x000010c4 e10f0009 00090009 00090009 00090009 .* + 0x000010d4 00090009 0009e10e .* + +Hex dump of section '\.cranges': + 0x00000000 00001004 000000a0 00030000 10a40000 .* + 0x00000010 000c0003 000010b0 00000008 00010000 .* + 0x00000020 10b80000 00040002 000010bc 00000006 .* + 0x00000030 00020000 10c40000 00180002 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3.dd b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3.dd new file mode 100644 index 0000000..135f1c9 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3.dd @@ -0,0 +1,80 @@ + +.*: file format elf32-sh64 + +Disassembly of section .init: + +00001000 <start>: + 1000: 6ff0fff0 nop +Disassembly of section .text: + +00001004 <sec4>: + 1004: 6ff0fff0 nop + 1008: 6ff0fff0 nop + 100c: 6ff0fff0 nop + 1010: 6ff0fff0 nop + 1014: 6ff0fff0 nop + 1018: 6ff0fff0 nop + 101c: cc00bd40 movi 47,r20 + 1020: 6ff0fff0 nop + 1024: 6ff0fff0 nop + 1028: 6ff0fff0 nop + 102c: 6ff0fff0 nop + 1030: 6ff0fff0 nop + 1034: 6ff0fff0 nop + 1038: 6ff0fff0 nop + 103c: 6ff0fff0 nop + 1040: 6ff0fff0 nop + 1044: 6ff0fff0 nop + 1048: 6ff0fff0 nop + 104c: 6ff0fff0 nop + 1050: cc00bd50 movi 47,r21 + 1054: cc0084c0 movi 33,r12 + 1058: 6ff0fff0 nop + 105c: 6ff0fff0 nop + 1060: 6ff0fff0 nop + 1064: 6ff0fff0 nop + 1068: 6ff0fff0 nop + 106c: 6ff0fff0 nop + 1070: 6ff0fff0 nop + 1074: 6ff0fff0 nop + 1078: 6ff0fff0 nop + 107c: 6ff0fff0 nop + 1080: 6ff0fff0 nop + 1084: 6ff0fff0 nop + 1088: 6ff0fff0 nop + 108c: 6ff0fff0 nop + 1090: 6ff0fff0 nop + 1094: 6ff0fff0 nop + 1098: 6ff0fff0 nop + 109c: 6ff0fff0 nop + 10a0: cc0084d0 movi 33,r13 + +000010a4 <diversion2>: + 10a4: 6ff0fff0 nop + 10a8: 6ff0fff0 nop + 10ac: 6ff0fff0 nop + 10b0: 00 00 00 2a \.long 0x0000002a + 10b4: 00 00 00 2b \.long 0x0000002b + 10b8: 00 09 nop + 10ba: 00 09 nop + +000010bc <sec3>: + 10bc: 00 09 nop + 10be: 00 09 nop + 10c0: 00 09 nop + \.\.\. + +000010c4 <diversion>: + 10c4: e1 0f mov #15,r1 + 10c6: 00 09 nop + 10c8: 00 09 nop + 10ca: 00 09 nop + 10cc: 00 09 nop + 10ce: 00 09 nop + 10d0: 00 09 nop + 10d2: 00 09 nop + 10d4: 00 09 nop + 10d6: 00 09 nop + 10d8: 00 09 nop + 10da: e1 0e mov #14,r1 + diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3.rd b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3.rd new file mode 100644 index 0000000..1a0b7a5 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crange3.rd @@ -0,0 +1,58 @@ +.* + +Section Headers: + +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al + +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0 + +\[ 1\] \.init +PROGBITS +00001000 000080 000004 00 AXp +0 +0 +4 + +\[ 2\] \.text +PROGBITS +00001004 000084 0000d8 00 AXp +0 +0 +4 + +\[ 3\] \.stack +PROGBITS +00080000 000180 000004 00 +WA +0 +0 +1 + +\[ 4\] \.cranges +LOUSER\+1 +00000000 000184 00003c 00 +W +0 +0 +1 + +\[ 5\] \.shstrtab +STRTAB +.* + +\[ 6\] \.symtab +SYMTAB +.* + +\[ 7\] \.strtab +STRTAB +.* +Key to Flags: +#... + +Symbol table '\.symtab' contains [0-9]+ entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name +.*: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND +.*: 00001000 +0 +SECTION +LOCAL +DEFAULT +1 +.*: 00001004 +0 +SECTION +LOCAL +DEFAULT +2 +.*: 00080000 +0 +SECTION +LOCAL +DEFAULT +3 +.*: 00000000 +0 +SECTION +LOCAL +DEFAULT +4 +.*: 00001004 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4 +.*: 000010a4 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2 +.*: 000010bc +0 +NOTYPE +LOCAL +DEFAULT +2 sec3 +.*: 000010c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +2 diversion +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors_end +.*: 000010a4 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2 +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___ctors +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end +.*: 00001000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start +.*: 00080000 +0 +NOTYPE +GLOBAL +DEFAULT +3 _stack +.*: 00001160 +0 +NOTYPE +GLOBAL +DEFAULT +.* ___dtors_end + +Hex dump of section '\.text': + 0x00001004 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001014 6ff0fff0 6ff0fff0 cc00bd40 6ff0fff0 .* + 0x00001024 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001034 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001044 6ff0fff0 6ff0fff0 6ff0fff0 cc00bd50 .* + 0x00001054 cc0084c0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001064 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001074 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001084 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00001094 6ff0fff0 6ff0fff0 6ff0fff0 cc0084d0 .* + 0x000010a4 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .* + 0x000010b4 0000002b 00090009 00090009 00090000 .* + 0x000010c4 e10f0009 00090009 00090009 00090009 .* + 0x000010d4 00090009 0009e10e .* + +Hex dump of section '\.cranges': + 0x00000000 00001004 000000a0 00030000 10a40000 .* + 0x00000010 000c0003 000010b0 00000008 00010000 .* + 0x00000020 10b80000 00040002 000010bc 00000006 .* + 0x00000030 00020000 10c40000 00180002 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crangerel1.rd b/binutils-2.21/ld/testsuite/ld-sh/sh64/crangerel1.rd new file mode 100644 index 0000000..0100b10 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crangerel1.rd @@ -0,0 +1,44 @@ +There are 11 section headers, starting at offset 0xbc: + +Section Headers: + +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al + +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0 + +\[ 1\] \.text +PROGBITS +00000000 000034 000000 00 +AX +0 +0 +1 + +\[ 2\] \.text\.mixed +PROGBITS +00000000 000034 000018 00 AXp +0 +0 +4 + +\[ 3\] \.data +PROGBITS +00000000 00004c 000000 00 +WA +0 +0 +1 + +\[ 4\] \.bss +NOBITS +00000000 00004c 000000 00 +WA +0 +0 +1 + +\[ 5\] \.stack +PROGBITS +00000000 00004c 000004 00 +WA +0 +0 +1 + +\[ 6\] \.cranges +PROGBITS +00000000 000050 00001e 00 +W +0 +0 +1 + +\[ 7\] \.rela\.cranges +RELA +00000000 000274 000024 0c +9 +6 +4 + +\[ 8\] \.shstrtab +STRTAB +00000000 00006e 00004d 00 +0 +0 +1 + +\[ 9\] \.symtab +SYMTAB +00000000 000298 000090 10 +10 +8 +4 + +\[10\] \.strtab +STRTAB +00000000 000328 000013 00 +0 +0 +1 +Key to Flags: +#... + +Relocation section '\.rela\.cranges' at offset 0x[0-9a-f]+ contains 3 entries: +.* +0*00000000 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 +0*0000000a +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 +0*00000014 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 + +Symbol table '\.symtab' contains 9 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +0: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +1: 00000000 +0 +SECTION +LOCAL +DEFAULT +1 + +2: 00000000 +0 +SECTION +LOCAL +DEFAULT +2 + +3: 00000000 +0 +SECTION +LOCAL +DEFAULT +3 + +4: 00000000 +0 +SECTION +LOCAL +DEFAULT +4 + +5: 00000000 +0 +SECTION +LOCAL +DEFAULT +5 + +6: 00000000 +0 +SECTION +LOCAL +DEFAULT +6 + +7: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2 + +8: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2 + +Hex dump of section '\.text\.mixed': + 0x00000000 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .* + 0x00000010 0000002b 00090009 .* + +Hex dump of section '\.cranges': +.* + 0x00000000 00000000 0000000c 00030000 000c0000 .* + 0x00000010 00080001 00000014 00000004 0002 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/crangerel2.rd b/binutils-2.21/ld/testsuite/ld-sh/sh64/crangerel2.rd new file mode 100644 index 0000000..4f8a9cd --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/crangerel2.rd @@ -0,0 +1,59 @@ +There are 11 section headers, starting at offset 0x128: + +Section Headers: + +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al + +\[ 0\] +NULL +00000000 000000 000000 00 +0 +0 +0 + +\[ 1\] \.text +PROGBITS +00000000 000034 000000 00 +AX +0 +0 +1 + +\[ 2\] \.text\.mixed +PROGBITS +00000000 000034 00005c 00 AXp +0 +0 +4 + +\[ 3\] \.data +PROGBITS +00000000 000090 000000 00 +WA +0 +0 +1 + +\[ 4\] \.bss +NOBITS +00000000 000090 000000 00 +WA +0 +0 +1 + +\[ 5\] \.stack +PROGBITS +00000000 000090 000004 00 +WA +0 +0 +1 + +\[ 6\] \.cranges +PROGBITS +00000000 000094 000046 00 +W +0 +0 +1 + +\[ 7\] \.rela\.cranges +RELA +00000000 0002e0 000054 0c +9 +6 +4 + +\[ 8\] \.shstrtab +STRTAB +00000000 0000da 00004d 00 +0 +0 +1 + +\[ 9\] \.symtab +SYMTAB +00000000 000334 0000d0 10 +10 +12 +4 + +\[10\] \.strtab +STRTAB +00000000 000404 000027 00 +0 +0 +1 +Key to Flags: +#... + +Relocation section '\.rela\.cranges' at offset 0x[0-9a-f]+ contains 7 entries: +.* +0*00000000 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 +0*0000000a +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 +0*00000014 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 +0*0000001e +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 +0*00000028 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 +0*00000032 +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 +0*0000003c +0+0201 R_SH_DIR32 +00000000 +\.text\.mixed +\+ 0 + +Symbol table '\.symtab' contains 13 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +0: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +1: 00000000 +0 +SECTION +LOCAL +DEFAULT +1 + +2: 00000000 +0 +SECTION +LOCAL +DEFAULT +2 + +3: 00000000 +0 +SECTION +LOCAL +DEFAULT +3 + +4: 00000000 +0 +SECTION +LOCAL +DEFAULT +4 + +5: 00000000 +0 +SECTION +LOCAL +DEFAULT +5 + +6: 00000000 +0 +SECTION +LOCAL +DEFAULT +6 + +7: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 start2 + +8: 00000018 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 sec1 + +9: 00000028 +0 +NOTYPE +LOCAL +DEFAULT +\[<other>: 4\] +2 sec2 + +10: 0000003c +0 +NOTYPE +LOCAL +DEFAULT +2 sec3 + +11: 00000044 +0 +NOTYPE +LOCAL +DEFAULT +2 sec4 + +12: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +2 diversion2 + +Hex dump of section '\.text\.mixed': + 0x00000000 6ff0fff0 6ff0fff0 6ff0fff0 0000002a .* + 0x00000010 0000002b 00090009 6ff0fff0 6ff0fff0 .* + 0x00000020 6ff0fff0 6ff0fff0 00000029 0000002b .* + 0x00000030 0000002a 0000002b 0000002a 00090009 .* + 0x00000040 00090000 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00000050 6ff0fff0 6ff0fff0 6ff0fff0 .* + +Hex dump of section '\.cranges': +.* + 0x00000000 00000000 0000000c 00030000 000c0000 .* + 0x00000010 00080001 00000014 00000004 00020000 .* + 0x00000020 00180000 00100003 00000028 00000014 .* + 0x00000030 00010000 003c0000 00060002 00000044 .* + 0x00000040 00000018 0003 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/dlsection-1.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/dlsection-1.s new file mode 100644 index 0000000..d83e6e1 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/dlsection-1.s @@ -0,0 +1,17 @@ +! Test gc-sections and datalabel references. +! +! Datalabel reference to symbol in section .text2 should +! prevent .text2 from being discarded. +! Section .spurious can be discarded. + .mode SHmedia + + .text + .global start + .global foo +start: .long datalabel foo + + .section .text2,"ax" +foo: .long 23 + + .section .spurious,"ax" + .long 17 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/dlsection.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/dlsection.sd new file mode 100644 index 0000000..58bf965 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/dlsection.sd @@ -0,0 +1,9 @@ + +.*: file format elf.*-sh64 + +Contents of section \.text: + 1000 00001004 .* +Contents of section \.text2: + 1004 00000017 .* +Contents of section \.stack: + 80000 deaddead .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.dbd b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.dbd new file mode 100644 index 0000000..0369cbc --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.dbd @@ -0,0 +1,11 @@ + +.*:[ ]*file[ ]*format[ ]*elf64-sh64 + +Disassembly[ ]*of[ ]*section[ ]*.text: + +0000000000000000[ ]*<start>: +[ ]*0:[ ]*cc48d000[ ]*movi[ ]*4660,r0 +[ ]*4:[ ]*12345678[ ]*.long[ ]*0x12345678 +[ ]*8:[ ]*12340000[ ]*.long[ ]*0x12340000 +[ ]*c:[ ]*12345678[ ]*.long[ ]*0x12345678 + diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.dld b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.dld new file mode 100644 index 0000000..f3c5bd5 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.dld @@ -0,0 +1,11 @@ + +.*:[ ]*file[ ]*format[ ]*elf64-sh64l + +Disassembly[ ]*of[ ]*section[ ]*.text: + +0000000000000000[ ]*<start>: +[ ]*0:[ ]*cc48d000[ ]*movi[ ]*4660,r0 +[ ]*4:[ ]*12345678[ ]*.long[ ]*0x12345678 +[ ]*8:[ ]*00001234[ ]*.long[ ]*0x00001234 +[ ]*c:[ ]*12345678[ ]*.long[ ]*0x12345678 + diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.ld b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.ld new file mode 100644 index 0000000..e9635e1 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.ld @@ -0,0 +1,6 @@ +SECTIONS { + .text : { + *(.text) + LONG(0x12345678); + } +} diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.s new file mode 100644 index 0000000..79bc9e4 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.s @@ -0,0 +1,7 @@ + .text + .mode shmedia +start: + + movi 0x1234,r0 + .long 0x12345678 + .word 0x1234, 0 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.sbd b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.sbd new file mode 100644 index 0000000..462f66d --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.sbd @@ -0,0 +1,5 @@ + +.*: file format elf64-sh64 + +Contents of section .text: + 0000 cc48d000 12345678 12340000 12345678.* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.sld b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.sld new file mode 100644 index 0000000..00975cb --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/endian.sld @@ -0,0 +1,6 @@ + +.*: file format elf64-sh64l + +Contents of section .text: + 0000 00d048cc 78563412 34120000 78563412.* + diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/gotplt.d b/binutils-2.21/ld/testsuite/ld-sh/sh64/gotplt.d new file mode 100644 index 0000000..5822326 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/gotplt.d @@ -0,0 +1,12 @@ +#source: gotplt.s +#as: --abi=32 --isa=SHmedia +#ld: -shared -mshelf32 --version-script=$srcdir/$subdir/gotplt.map +#readelf: -r +#target: sh64-*-elf + +# Make sure that gotplt relocations of forced local symbols +# use the GOT. + +Relocation section '\.rela\.dyn' at offset .* contains 1 entries: + Offset Info Type Sym\.Value Sym\. Name \+ Addend +[0-9a-f ]+R_SH_RELATIVE[0-9a-f ]+ diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/gotplt.map b/binutils-2.21/ld/testsuite/ld-sh/sh64/gotplt.map new file mode 100644 index 0000000..a27c22c --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/gotplt.map @@ -0,0 +1,4 @@ +GLIBC_2.2 { + local: + xxx; +}; diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/gotplt.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/gotplt.s new file mode 100644 index 0000000..45ed0b2 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/gotplt.s @@ -0,0 +1,8 @@ + .text + .global xxx +xxx: + ptabs r18, tr0 + blink tr0, r63 + .global yyy +yyy: + movi ((xxx@GOTPLT) & 65535), r1 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/init-cmpct.d b/binutils-2.21/ld/testsuite/ld-sh/sh64/init-cmpct.d new file mode 100644 index 0000000..6f64bc4 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/init-cmpct.d @@ -0,0 +1,14 @@ +#source: init.s +#as: --abi=32 --isa=SHcompact +#ld: -shared -mshelf32 +#readelf: -d +#target: sh64-*-elf + +# Make sure that the lsb of DT_INIT and DT_FINI entries is not set +# when _init and _fini are SHcompact code. + +Dynamic section at offset .* contains 8 entries: + Tag Type Name/Value + 0x0000000c \(INIT\) .*[02468ace] + 0x0000000d \(FINI\) .*[02468ace] +#pass diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/init-media.d b/binutils-2.21/ld/testsuite/ld-sh/sh64/init-media.d new file mode 100644 index 0000000..56c6c19 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/init-media.d @@ -0,0 +1,14 @@ +#source: init.s +#as: --abi=32 --isa=SHmedia +#ld: -shared -mshelf32 +#readelf: -d +#target: sh64-*-elf + +# Make sure that the lsb of DT_INIT and DT_FINI entries is set +# when _init and _fini are SHmedia code. + +.* + Tag Type Name/Value + 0x0000000c \(INIT\) .*[13579bdf] + 0x0000000d \(FINI\) .*[13579bdf] +#pass diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/init.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/init.s new file mode 100644 index 0000000..900e764 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/init.s @@ -0,0 +1,18 @@ + .section .text,"ax" + .global _init + .type _init,@function + .align 1 +_init: + nop + nop + nop + nop + + .global _fini + .type _fini,@function + .align 1 +_fini: + nop + nop + nop + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/init64.d b/binutils-2.21/ld/testsuite/ld-sh/sh64/init64.d new file mode 100644 index 0000000..01c8e97 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/init64.d @@ -0,0 +1,14 @@ +#source: init.s +#as: --abi=64 +#ld: -shared -mshelf64 +#readelf: -d +#target: sh64-*-elf + +# Make sure that the lsb of DT_INIT and DT_FINI entries is set +# when _init and _fini are SHmedia code. + +.* + Tag Type Name/Value + 0x000000000000000c \(INIT\) .*[13579bdf] + 0x000000000000000d \(FINI\) .*[13579bdf] +#pass diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/mix1-noexp.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix1-noexp.sd new file mode 100644 index 0000000..fe73136 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix1-noexp.sd @@ -0,0 +1,14 @@ + +.*: file format .*-sh64 + +Contents of section \.text: + 1000 8902c700 00090009 00090009 0000100c .* + 1010 00001004 00001021 effff240 efffea50 .* + 1020 cc401360 cc4086d0 ebfffa70 6ff0fff0 .* +Contents of section \.data: + 10b0 000010b0 00001004 00001021 .* +Contents of section \.stack: + 80000 deaddead .* +Contents of section \.cranges: + 0000 00001000 00000018 00020000 10180000 .* + 0010 00180003 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/mix1.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix1.sd new file mode 100644 index 0000000..c5cc4b1 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix1.sd @@ -0,0 +1,16 @@ + +.*: file format .*-sh64 + +Contents of section \.text: + 1000 8902c700 00090009 00090009 0000100c .* + 1010 00001004 00001031 cffffd90 cbffa190 .* + 1020 6bf56640 cffffd90 cbff6190 6bf56650 .* + 1030 cc000360 c8401360 cc0002d0 c840c6d0 .* + 1040 ebfff270 6ff0fff0 .* +Contents of section \.data: + 10c8 000010c8 00001004 00001031 .* +Contents of section \.stack: + 80000 deaddead .* +Contents of section \.cranges: + 0000 00001000 00000018 00020000 10180000 .* + 0010 00300003 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/mix1.xd b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix1.xd new file mode 100644 index 0000000..de72ce0 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix1.xd @@ -0,0 +1,42 @@ + +.*: file format .*-sh64 +.* +architecture: sh5, flags 0x00000112: +EXEC_P, HAS_SYMS, D_PAGED +start address 0x0+1000 + +Program Header: + LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7 + filesz 0x0+48 memsz 0x0+48 flags r-x + LOAD off 0x0+148 vaddr 0x0+10c8 paddr 0x0+10c8 align 2\*\*7 + filesz 0x0+c memsz 0x0+c flags rw- + LOAD off 0x0+180 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7 + filesz 0x0+4 memsz 0x0+4 flags rw- +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 00000048 0+1000 0+1000 00000100 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 \.data 0000000c 0+10c8 0+10c8 00000148 2\*\*2 + CONTENTS, ALLOC, LOAD, DATA + 2 \.stack 00000004 0+80000 0+80000 00000180 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA + 3 \.cranges 00000014 0+ 0+ 00000184 2\*\*0 + CONTENTS, DEBUGGING, SORT_ENTRIES +SYMBOL TABLE: +0+1000 l d \.text 0+ (|\.text) +0+10c8 l d \.data 0+ (|\.data) +0+80000 l d \.stack 0+ (|\.stack) +0+ l d \.cranges 0+ (|\.cranges) +0+1008 l \.text 0+ forw +0+1004 l \.text 0+ start2 +0+1030 l \.text 0+ 0x04 mediacode2 +0+1018 l \.text 0+ 0x04 mediacode +0+10c8 g .* 0+ ___dtors +0+10d8 g \*ABS\* 0+ __bss_start +0+10c8 g .* 0+ ___ctors_end +0+10c8 g .* 0+ ___ctors +0+10d8 g \*ABS\* 0+ _edata +0+10d8 g \*ABS\* 0+ _end +0+1000 g \.text 0+ start +0+80000 g \.stack 0+ _stack +0+10c8 g .* 0+ ___dtors_end diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/mix2-noexp.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix2-noexp.sd new file mode 100644 index 0000000..9112cfc --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix2-noexp.sd @@ -0,0 +1,16 @@ + +.*: file format .*-sh64 + +Contents of section \.text: + 1000 cc4048e0 cc40c0e0 ec000e60 6ff0fff0 .* + 1010 0009c700 c7000009 00090009 00001009 .* + 1020 000010bc .* +Contents of section \.rodata: + 1024 00001018 000010c4 0000100d 00001028 .* +Contents of section \.data: + 10b8 00000000 00001014 00000000 000010bc .* +Contents of section \.stack: + 80000 deaddead .* +Contents of section \.cranges: + 0000 00001000 00000010 00030000 10100000 .* + 0010 00140002 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/mix2.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix2.sd new file mode 100644 index 0000000..122a472 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix2.sd @@ -0,0 +1,17 @@ + +.*: file format .*-sh64 + +Contents of section \.text: + 1000 cc0000e0 c84088e0 cc0000e0 c84100e0 .* + 1010 cc000190 c8003190 6bf56660 6ff0fff0 .* + 1020 0009c700 c7000009 00090009 00001011 .* + 1030 000010cc .* +Contents of section \.rodata: + 1034 00001028 000010d4 0000101d 00001038 .* +Contents of section \.data: + 10c8 00000000 00001024 00000000 000010cc .* +Contents of section \.stack: + 80000 deaddead .* +Contents of section \.cranges: + 0000 00001000 00000020 00030000 10200000 .* + 0010 00140002 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/mix2.xd b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix2.xd new file mode 100644 index 0000000..5c72763 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/mix2.xd @@ -0,0 +1,52 @@ + +.*: file format .*-sh64 +.* +architecture: sh5, flags 0x00000112: +EXEC_P, HAS_SYMS, D_PAGED +start address 0x0+1001 + +Program Header: + LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7 + filesz 0x0+44 memsz 0x0+44 flags r-x + LOAD off 0x0+148 vaddr 0x0+10c8 paddr 0x0+10c8 align 2\*\*7 + filesz 0x0+10 memsz 0x0+10 flags rw- + LOAD off 0x0+180 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7 + filesz 0x0+4 memsz 0x0+4 flags rw- + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 00000034 0+1000 0+1000 00000100 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 \.rodata 00000010 0+1034 0+1034 00000134 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 2 \.data 00000010 0+10c8 0+10c8 00000148 2\*\*2 + CONTENTS, ALLOC, LOAD, DATA + 3 \.stack 00000004 0+80000 0+80000 00000180 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA + 4 \.cranges 00000014 0+ 0+ 00000184 2\*\*0 + CONTENTS, DEBUGGING, SORT_ENTRIES +SYMBOL TABLE: +0+1000 l d \.text 0+ (|\.text) +0+1034 l d \.rodata 0+ (|\.rodata) +0+10c8 l d \.data 0+ (|\.data) +0+80000 l d \.stack 0+ (|\.stack) +0+ l d \.cranges 0+ (|\.cranges) +0+1020 l \.text 0+ locallabel +0+1040 g \.rodata 0+ compactlabel4 +0+101c g \.text 0+ 0x04 medialabel2 +0+1038 g \.rodata 0+ medialabel3 +0+1022 g \.text 0+ compactlabel1 +0+1024 g \.text 0+ compactlabel2 +0+1028 g \.text 0+ compactlabel3 +0+1010 g \.text 0+ 0x04 medialabel1 +0+10c8 g .* 0+ ___dtors +0+10cc g \.data 0+ medialabel4 +0+10d8 g \*ABS\* 0+ __bss_start +0+10c8 g .* 0+ ___ctors_end +0+10d4 g \.data 0+ compactlabel5 +0+10c8 g .* 0+ ___ctors +0+10d8 g \*ABS\* 0+ _edata +0+10d8 g \*ABS\* 0+ _end +0+1000 g \.text 0+ 0x04 start +0+80000 g \.stack 0+ _stack +0+10c8 g .* 0+ ___dtors_end diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/rd-sh64.exp b/binutils-2.21/ld/testsuite/ld-sh/sh64/rd-sh64.exp new file mode 100644 index 0000000..ebeed0a --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/rd-sh64.exp @@ -0,0 +1,44 @@ +# Expect script for run_dump_test based ld-sh/sh64 tests. +# Copyright 2002, 2003, 2005, 2007 Free Software Foundation, Inc. +# +# This file is part of the GNU Binutils. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# Written by Stephen Clarke (stephen.clarke@superh.com) +# + +if ![istarget sh64-*-*] { + return +} + +set rd_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] +foreach sh64test $rd_test_list { + # We need to strip the ".d", but can leave the dirname. + verbose [file rootname $sh64test] + run_dump_test [file rootname $sh64test] + if [string match $srcdir/$subdir/*-dso.d $sh64test] { + # Copy the output of the DSO-createing test to .so file. + # Notice that a DSO-creating test must preceed the tests + # which need that DSO in sort-order by name. + set cmd "cp tmpdir/dump \ + tmpdir/[file rootname [file tail $sh64test]].so" + send_log "$cmd\n" + set cmdret [catch "exec $cmd" comp_output] + send_log "$comp_output\n" + # FIXME: What if it fails? Need we do something? + } +} diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/rel-1.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/rel-1.s new file mode 100644 index 0000000..6cf18ca --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/rel-1.s @@ -0,0 +1,48 @@ +! Relative linking, simple files with global symbols but nothing really +! strange. Reference from same and other file to .text and .data in +! different combinations. + +! fileFsectionN, with F in rel-F.s, and N in: +! 1 - Same file and section. +! 2 - Same file, different section. +! 3 - Other file, same section. +! 4 - Other file, other section. + + .mode SHmedia + .text + .global start +start: + nop + .global file1text1 +file1text1: + nop + movi file1text1 & 65535,r10 + .global file1text2 +file1text2: + movi file1data2 & 65535,r20 + .global file1text3 +file1text3: + movi file2text3 & 65535,r20 + .global file1text4 +file1text4: + movi file2data4 & 65535,r20 + movi unresolved1 & 65535,r40 + movi unresolved6 & 65535,r30 + + .data + .long 0 + .global file1data1 +file1data1: + .long 0 + .long file1data1 + .global file1data2 +file1data2: + .long file1text2 + .global file1data3 +file1data3: + .long file2data3 + .global file1data4 +file1data4: + .long file2text4 + .long unresolved2 + .long unresolved5 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/rel-2.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/rel-2.s new file mode 100644 index 0000000..b1931b5 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/rel-2.s @@ -0,0 +1,46 @@ +! Relative linking, second file. + +! fileFsectionN, with F in rel-F.s, and N in: +! 1 - Same file and section. +! 2 - Same file, different section. +! 3 - Other file, same section. +! 4 - Other file, other section. + + .mode SHmedia + .text + .global start2 +start2: + nop + .global file2text1 +file2text1: + nop + movi file2text1 & 65535,r10 + .global file2text2 +file2text2: + movi file2data2 & 65535,r20 + .global file2text3 +file2text3: + movi file1text3 & 65535,r20 + .global file2text4 +file2text4: + movi file1data4 & 65535,r20 + movi unresolved1 & 65535,r30 + movi unresolved3 & 65535,r30 + + .data + .long 0 + .global file2data1 +file2data1: + .long 0 + .long file2data1 + .global file2data2 +file2data2: + .long file2text2 + .global file2data3 +file2data3: + .long file1data3 + .global file2data4 +file2data4: + .long file1text4 + .long unresolved2 + .long unresolved4 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/rel32.xd b/binutils-2.21/ld/testsuite/ld-sh/sh64/rel32.xd new file mode 100644 index 0000000..65c00ac --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/rel32.xd @@ -0,0 +1,92 @@ + +.*: file format .*-sh64 +.* +architecture: sh5, flags 0x0+11: +HAS_RELOC, HAS_SYMS +start address 0x0+ + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+40 0+ 0+ 0+34 2\*\*0 + CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE + 1 \.data 0+40 0+ 0+ 0+74 2\*\*2 + CONTENTS, ALLOC, LOAD, RELOC, DATA + 2 \.bss 0+ 0+ 0+ 0+b4 2\*\*0 + ALLOC + 3 \.stack 0+4 0+ 0+ 0+b4 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA +SYMBOL TABLE: +0+ l d \.text 0+ (|.text) +0+ l d \.data 0+ (|.data) +0+ l d \.bss 0+ (|.bss) +0+ l d \.stack 0+ (|.stack) +0+ \*UND\* 0+ unresolved5 +0+c g \.text 0+ 0x04 file1text2 +0+24 g \.text 0+ 0x04 file2text1 +0+4 g \.data 0+ file1data1 +0+34 g \.data 0+ file2data4 +0+10 g \.text 0+ 0x04 file1text3 +0+2c g \.data 0+ file2data2 +0+c g \.data 0+ file1data2 +0+30 g \.text 0+ 0x04 file2text3 +0+20 g \.text 0+ 0x04 start2 +0+ \*UND\* 0+ unresolved1 +0+ \*UND\* 0+ unresolved6 +0+4 g \.text 0+ 0x04 file1text1 +0+2c g \.text 0+ 0x04 file2text2 +0+ \*UND\* 0+ unresolved3 +0+34 g \.text 0+ 0x04 file2text4 +0+ \*UND\* 0+ unresolved2 +0+ g \.text 0+ 0x04 start +0+14 g \.text 0+ 0x04 file1text4 +0+30 g \.data 0+ file2data3 +0+ \*UND\* 0+ unresolved4 +0+24 g \.data 0+ file2data1 +0+10 g \.data 0+ file1data3 +0+14 g \.data 0+ file1data4 + + +RELOCATION RECORDS FOR \[\.text\]: +OFFSET *TYPE *VALUE +0+8 R_SH_IMM_LOW16 file1text1 +0+c R_SH_IMM_LOW16 file1data2 +0+10 R_SH_IMM_LOW16 file2text3 +0+14 R_SH_IMM_LOW16 file2data4 +0+18 R_SH_IMM_LOW16 unresolved1 +0+1c R_SH_IMM_LOW16 unresolved6 +0+28 R_SH_IMM_LOW16 file2text1 +0+2c R_SH_IMM_LOW16 file2data2 +0+30 R_SH_IMM_LOW16 file1text3 +0+34 R_SH_IMM_LOW16 file1data4 +0+38 R_SH_IMM_LOW16 unresolved1 +0+3c R_SH_IMM_LOW16 unresolved3 + + +RELOCATION RECORDS FOR \[\.data\]: +OFFSET *TYPE *VALUE +0+8 R_SH_DIR32 file1data1 +0+c R_SH_DIR32 file1text2 +0+10 R_SH_DIR32 file2data3 +0+14 R_SH_DIR32 file2text4 +0+18 R_SH_DIR32 unresolved2 +0+1c R_SH_DIR32 unresolved5 +0+28 R_SH_DIR32 file2data1 +0+2c R_SH_DIR32 file2text2 +0+30 R_SH_DIR32 file1data3 +0+34 R_SH_DIR32 file1text4 +0+38 R_SH_DIR32 unresolved2 +0+3c R_SH_DIR32 unresolved4 + + +Contents of section \.text: + 0000 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .* + 0010 cc000140 cc000140 cc000280 cc0001e0 .* + 0020 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .* + 0030 cc000140 cc000140 cc0001e0 cc0001e0 .* +Contents of section \.data: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 00000000 00000000 .* + 0020 00000000 00000000 00000000 00000000 .* + 0030 00000000 00000000 00000000 00000000 .* +Contents of section .stack: + 0000 deaddead .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/rel64.xd b/binutils-2.21/ld/testsuite/ld-sh/sh64/rel64.xd new file mode 100644 index 0000000..986e013 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/rel64.xd @@ -0,0 +1,92 @@ + +.*: file format .*-sh64 +.* +architecture: sh5, flags 0x0+11: +HAS_RELOC, HAS_SYMS +start address 0x0+ + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+40 0+ 0+ 0+40 2\*\*0 + CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE + 1 \.data 0+40 0+ 0+ 0+80 2\*\*2 + CONTENTS, ALLOC, LOAD, RELOC, DATA + 2 \.bss 0+ 0+ 0+ 0+c0 2\*\*0 + ALLOC + 3 \.stack 0+4 0+ 0+ 0+c0 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA +SYMBOL TABLE: +0+ l d \.text 0+ (|.text) +0+ l d \.data 0+ (|.data) +0+ l d \.bss 0+ (|.bss) +0+ l d \.stack 0+ (|.stack) +0+ \*UND\* 0+ unresolved5 +0+c g \.text 0+ 0x04 file1text2 +0+24 g \.text 0+ 0x04 file2text1 +0+4 g \.data 0+ file1data1 +0+34 g \.data 0+ file2data4 +0+10 g \.text 0+ 0x04 file1text3 +0+2c g \.data 0+ file2data2 +0+c g \.data 0+ file1data2 +0+30 g \.text 0+ 0x04 file2text3 +0+20 g \.text 0+ 0x04 start2 +0+ \*UND\* 0+ unresolved1 +0+ \*UND\* 0+ unresolved6 +0+4 g \.text 0+ 0x04 file1text1 +0+2c g \.text 0+ 0x04 file2text2 +0+ \*UND\* 0+ unresolved3 +0+34 g \.text 0+ 0x04 file2text4 +0+ \*UND\* 0+ unresolved2 +0+ g \.text 0+ 0x04 start +0+14 g \.text 0+ 0x04 file1text4 +0+30 g \.data 0+ file2data3 +0+ \*UND\* 0+ unresolved4 +0+24 g \.data 0+ file2data1 +0+10 g \.data 0+ file1data3 +0+14 g \.data 0+ file1data4 + + +RELOCATION RECORDS FOR \[\.text\]: +OFFSET TYPE VALUE +0+8 R_SH_IMM_LOW16 file1text1 +0+c R_SH_IMM_LOW16 file1data2 +0+10 R_SH_IMM_LOW16 file2text3 +0+14 R_SH_IMM_LOW16 file2data4 +0+18 R_SH_IMM_LOW16 unresolved1 +0+1c R_SH_IMM_LOW16 unresolved6 +0+28 R_SH_IMM_LOW16 file2text1 +0+2c R_SH_IMM_LOW16 file2data2 +0+30 R_SH_IMM_LOW16 file1text3 +0+34 R_SH_IMM_LOW16 file1data4 +0+38 R_SH_IMM_LOW16 unresolved1 +0+3c R_SH_IMM_LOW16 unresolved3 + + +RELOCATION RECORDS FOR \[\.data\]: +OFFSET TYPE VALUE +0+8 R_SH_DIR32 file1data1 +0+c R_SH_DIR32 file1text2 +0+10 R_SH_DIR32 file2data3 +0+14 R_SH_DIR32 file2text4 +0+18 R_SH_DIR32 unresolved2 +0+1c R_SH_DIR32 unresolved5 +0+28 R_SH_DIR32 file2data1 +0+2c R_SH_DIR32 file2text2 +0+30 R_SH_DIR32 file1data3 +0+34 R_SH_DIR32 file1text4 +0+38 R_SH_DIR32 unresolved2 +0+3c R_SH_DIR32 unresolved4 + + +Contents of section \.text: + 0000 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .* + 0010 cc000140 cc000140 cc000280 cc0001e0 .* + 0020 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .* + 0030 cc000140 cc000140 cc0001e0 cc0001e0 .* +Contents of section \.data: + 0000 00000000 00000000 00000000 00000000 .* + 0010 00000000 00000000 00000000 00000000 .* + 0020 00000000 00000000 00000000 00000000 .* + 0030 00000000 00000000 00000000 00000000 .* +Contents of section .stack: + 0000 deaddead .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/relax.exp b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax.exp new file mode 100644 index 0000000..bb05e43 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax.exp @@ -0,0 +1,155 @@ +# Expect script for ld-sh tests +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation +# +# This file is part of the GNU Binutils. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +# Test SH relaxing - that is, that it's disabled when SHmedia sections +# are present. + +if ![istarget sh64-*-*] { + return +} + +# There are four source files: the first is SHcompact only, the second +# is SHmedia only, the third has both, and the fourth has only a +# .cranges section. The table below has: +# Title +# as flags for first source (else "n/a" to skip) +# ditto, other three files +# ld flags +# 1/0 whether relaxing should have been done or not, or -1 if we expect +# the linker to not produce an output file. + +if [istarget sh64*-*-linux*] { + set emul32 "shlelf32_linux" +} elseif { [istarget sh64*-*-netbsd*] || [istarget sh5*-*-netbsd*] } { + set emul32 "shelf32_nbsd" +} else { + set emul32 "shelf32" +} + +set sh64relaxtests { + {"SH64 not relaxing, shcompact" + {"-relax -isa shcompact" "n/a" "n/a" "n/a"} "-m$emul32" 0} + {"SH64 relaxing, shcompact" + {"-relax -isa shcompact" "n/a" "n/a" "n/a"} "-relax -m$emul32" 1} + {"SH64 relaxing, shcompacts" + {"-relax -isa shcompact" "-isa shcompact" "n/a" "n/a"} "-relax -m$emul32" 1} + {"SH64 relaxing disabled, shmedia" + {"-relax -isa shcompact" "-isa shmedia -no-mix" "n/a" "n/a"} "-relax -m$emul32" 0} + {"SH64 relaxing disabled, mixed" + {"-relax -isa shcompact" "n/a" "-isa shcompact" "n/a"} "-relax -m$emul32" 0} + {"SH64 relaxing disabled, cranges" + {"-relax -isa shcompact" "n/a" "n/a" ""} "-relax -m$emul32" 0} +} + +proc run_sh64relaxtest {sh64relaxtests} { + global ld + global as + global nm + global objdump + global readelf + global srcdir + global subdir + global emul32 + + set testindex 0 + + set sh64relaxfiles { + "relax1.s" "relax2.s" "relax3.s" "relax4.s" + } + + foreach testentry $sh64relaxtests { + set testname [lindex $testentry 0] + set as_options [lindex $testentry 1] + set ld_options [subst [lindex $testentry 2]] + set expect_relaxed [lindex $testentry 3] + + set is_unresolved 0 + set objfiles {} + + incr testindex + + # Assemble each file in the test. + for {set i 0} {$i < 4} {incr i} { + set as_file [lindex $sh64relaxfiles $i] + set as_opt [lindex $as_options $i] + if { [string compare $as_opt "n/a"] != 0 } { + set objfile "tmpdir/[file rootname $as_file]-$testindex.o" + lappend objfiles $objfile + + if ![ld_assemble $as "$as_opt $srcdir/$subdir/$as_file" $objfile] { + set is_unresolved 1 + break + } + } + } + + # Catch assembler errors. + if { $is_unresolved != 0 } { + unresolved $testname + continue + } + + set binfile "tmpdir/relax-$testindex.x" + + # We're not interested in the pass/fail of the linker as much + # as we're interested in whether or not relaxing got properly + # disabled. Hence the lax checking here. + + file delete $binfile + set result [ld_simple_link $ld $binfile " --no-warn-mismatch $ld_options $objfiles"] + if ![file exists $binfile] { + + if {$expect_relaxed == -1} { + pass $testname + continue + } + + verbose "$testname: file $binfile doesn't exist" 1 + fail $testname + continue + } + + catch "exec $objdump -d $binfile" objdump_output + + regexp "\[ \t](jsr|bsr)\[ \t]" $objdump_output ignore calltype + + if [string match $calltype "bsr"] { + set relaxed 1 + } elseif [string match $calltype "jsr"] { + set relaxed 0 + } else { + verbose "$testname: neither jsr nor bsr found" 1 + verbose $objdump_output 2 + fail $testname + continue + } + + if {$relaxed != $expect_relaxed} { + verbose $objdump_output 2 + fail $testname + exit + } else { + pass $testname + } + } +} + +run_sh64relaxtest $sh64relaxtests diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/relax1.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax1.s new file mode 100644 index 0000000..873954b --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax1.s @@ -0,0 +1,12 @@ + .globl start +start: +.L3: + mov.l .L4,r1 + .uses .L3 + jsr @r1 + nop + nop +.L4: + .long .L5 +.L5: + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/relax2.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax2.s new file mode 100644 index 0000000..9bf0802 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax2.s @@ -0,0 +1,3 @@ + .text +foo1: + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/relax3.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax3.s new file mode 100644 index 0000000..964bacd --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax3.s @@ -0,0 +1,8 @@ + .text + .mode shmedia +foo1: + nop + + .mode shcompact +foo2: + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/relax4.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax4.s new file mode 100644 index 0000000..904df7c --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/relax4.s @@ -0,0 +1,2 @@ + .section .cranges + .word 0 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl-1.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl-1.s new file mode 100644 index 0000000..0aeb332 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl-1.s @@ -0,0 +1,171 @@ +! Relative linking. Like the simple test, but mixing in use of +! "datalabel" and offsets to the global symbols into the previous +! combinations. +! +! More systematic testing datalabel references, +! igoring section difference, symbol definition type and offset presence: +! Datalabel reference plus: +! (datalabel other file, other file, same file, none) +! = (1, 2, 3, 4, 12, 13, 23, 123) +! +! Definition: +! (none, same file, other file) = (a, b, c) +! +! Combined: +! = (a1, a2, a3, a4, a12, a13, a23, a123, b1, b2, b3, b4, b12, +! b13, b23, b123, c1, c2, c3, c4, c12, c13, c23, c123) + + .mode SHmedia + .text + .global start +start: + nop + .global file1text1 +file1text1: + nop + movi file1text1 & 65535,r10 + .global file1text2 +file1text2: + movi (datalabel file1data2) & 65535,r20 + .global file1text3 +file1text3: + movi file2text3 & 65535,r20 + .global file1text4 +file1text4: + movi file2data4 & 65535,r20 + .global file1text5 +file1text5: + movi unresolved1 & 65535,r40 + .global b1 +b1: + movi unresolved6 & 65535,r30 + .global b2 +b2: + movi (datalabel file1text1) & 65535,r10 + .global b3 +b3: + movi (datalabel file1text1 + 24) & 65535,r10 + .global b4 +b4: + movi (datalabel file1text5 + 8) & 65535, r40 + .global b12 +b12: + movi (datalabel file1data2 + 48) & 65535,r20 + .global b13 +b13: + movi file1data2 & 65535,r20 + .global b23 +b23: + movi (datalabel file2data4 + 16),r50 + .global b123 +b123: + movi (datalabel unresolved7) & 65535,r60 + .global oc1 +oc1: + movi (datalabel unresolved1) & 65535,r60 + .global oc2 +oc2: + nop + .global oc3 +oc3: + nop + .global oc4 +oc4: + nop + .global oc12 +oc12: + nop + .global oc13 +oc13: + nop + .global oc23 +oc23: + nop + .global oc123 +oc123: + nop + + .data + .long 0 + .global file1data1 +file1data1: + .long 0 + .long datalabel file1data1 + 8 + .global file1data2 +file1data2: + .long file1text2 + .global file1data3 +file1data3: + .long file2data3 + .global file1data4 +file1data4: + .long file2text4 + .global file1data5 +file1data5: + .long unresolved2 + .long unresolved5 + .long datalabel unresolved6 + 40 + .long unresolved9 + + .long datalabel a1 + .long a23 + .long b123 + .long c3 + .long c13 + .long datalabel a2 + .long datalabel a3 + .long datalabel a4 + .long datalabel a12 + .long datalabel a13 + .long datalabel a23 + .long datalabel a123 + .long datalabel b1 + .long datalabel b2 + .long a3 + .long a13 + .long datalabel b3 + .long datalabel b4 + .long datalabel b12 + .long datalabel b13 + .long a123 + .long b3 + .long b13 + .long b23 + .long datalabel b23 + .long datalabel b123 + .long datalabel c1 + .long datalabel c2 + .long datalabel c3 + .long c23 + .long c123 + .long datalabel c4 + .long datalabel c12 + .long datalabel c13 + .long datalabel c23 + .long datalabel c123 + + + .long datalabel oa1 + .long datalabel ob1 + .long ob123 + .long datalabel oc1 + .long oa2 + .long ob2 + .long oc2 + .long oa12 + .long datalabel oa12 + .long datalabel ob12 + .long ob12 + .long datalabel oc12 + .long oc12 + .long oa23 + .long datalabel oa13 + .long oc123 + .long datalabel ob13 + .long datalabel oc13 + .long ob23 + .long oc23 + .long oa123 + .long datalabel oa123 + .long datalabel ob123 + .long datalabel oc123 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl-2.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl-2.s new file mode 100644 index 0000000..d632021 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl-2.s @@ -0,0 +1,156 @@ +! Relative linking with datalabel use, second file. Much like rel-2.s + + .mode SHmedia + .text + .global start2 +start2: + nop + .global file2text1 +file2text1: + nop + movi file2text1 & 65535,r10 + .global file2text2 +file2text2: + movi file2data2 & 65535,r20 + .global file2text3 +file2text3: + movi file1text3 & 65535,r20 + .global file2text4 +file2text4: + movi file1data4 & 65535,r20 + movi unresolved1 & 65535,r30 + movi unresolved3 & 65535,r30 + movi datalabel unresolved8 & 65535,r50 + movi datalabel unresolved9 & 65535,r50 + movi datalabel file1text1 & 65535,r40 + movi datalabel file1data2 & 65535,r40 + movi datalabel file1data3 & 65535,r40 + .global c1 +c1: + nop + .global c2 +c2: + nop + .global c3 +c3: + nop + .global c4 +c4: + nop + .global c12 +c12: + nop + .global c13 +c13: + nop + .global c23 +c23: + nop + .global c123 +c123: + nop + + .global ob1 +ob1: + nop + .global ob2 +ob2: + nop + .global ob3 +ob3: + nop + .global ob4 +ob4: + nop + .global ob12 +ob12: + nop + .global ob13 +ob13: + nop + .global ob23 +ob23: + nop + .global ob123 +ob123: + nop + + .data + .long 0 + .global file2data1 +file2data1: + .long 0 + .long file2data1 + .global file2data2 +file2data2: + .long file2text2 + .global file2data3 +file2data3: + .long file1data3 + .global file2data4 +file2data4: + .long file1text4 + .long unresolved2 + .long unresolved4 + + .long datalabel oa1 + .long datalabel oa2 + .long datalabel oa3 + .long oa13 + .long oc13 + .long datalabel oa4 + .long datalabel oa12 + .long datalabel oa13 + .long datalabel oa23 + .long oa23 + .long oa123 + .long oc3 + .long datalabel oa123 + .long datalabel ob1 + .long datalabel ob2 + .long datalabel ob3 + .long datalabel ob4 + .long oa3 + .long oc23 + .long oc123 + .long datalabel ob12 + .long datalabel ob13 + .long ob13 + .long ob23 + .long datalabel ob23 + .long datalabel ob123 + .long datalabel oc1 + .long ob3 + .long ob123 + .long datalabel oc2 + .long datalabel oc3 + .long datalabel oc4 + .long datalabel oc12 + .long datalabel oc13 + .long datalabel oc23 + .long datalabel oc123 + + .long datalabel a1 + .long c2 + .long b23 + .long datalabel b1 + .long datalabel c1 + .long datalabel a12 + .long a2 + .long b2 + .long datalabel b12 + .long datalabel c12 + .long b123 + .long c123 + .long datalabel a13 + .long datalabel b13 + .long c23 + .long a123 + .long datalabel c13 + .long datalabel a123 + .long c12 + .long a23 + .long datalabel b123 + .long a12 + .long b12 + .long datalabel c123 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl32.rd b/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl32.rd new file mode 100644 index 0000000..400e2af --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl32.rd @@ -0,0 +1,358 @@ + +Relocation section '\.rela\.text' at offset 0x[0-9a-f]+ contains 26 entries: +.* +00000008 +0+5bf6 R_SH_IMM_LOW16 +00000004 +file1text1 +\+ 0 +0000000c +0+2df6 R_SH_IMM_LOW16 +0000000c +file1data2 +\+ 0 +00000010 +0+30f6 R_SH_IMM_LOW16 +00000070 +file2text3 +\+ 0 +00000014 +0+0ff6 R_SH_IMM_LOW16 +0000012c +file2data4 +\+ 0 +00000018 +0+4cf6 R_SH_IMM_LOW16 +00000000 +unresolved1 +\+ 0 +0000001c +0+51f6 R_SH_IMM_LOW16 +00000000 +unresolved6 +\+ 0 +00000020 +0+5df6 R_SH_IMM_LOW16 +00000000 +file1text1 +\+ 0 +00000024 +0+5df6 R_SH_IMM_LOW16 +00000000 +file1text1 +\+ 18 +00000028 +0+21f6 R_SH_IMM_LOW16 +00000000 +file1text5 +\+ 8 +0000002c +0+2df6 R_SH_IMM_LOW16 +0000000c +file1data2 +\+ 30 +00000030 +0+2df6 R_SH_IMM_LOW16 +0000000c +file1data2 +\+ 0 +0000003c +0+42f6 R_SH_IMM_LOW16 +00000000 +unresolved7 +\+ 0 +00000040 +0+27f6 R_SH_IMM_LOW16 +00000000 +unresolved1 +\+ 0 +00000034 +0+35f8 R_SH_IMM_MEDLOW16 +00000000 +file2data4 +\+ 10 +00000038 +0+35f6 R_SH_IMM_LOW16 +00000000 +file2data4 +\+ 10 +00000068 +0+08f6 R_SH_IMM_LOW16 +00000064 +file2text1 +\+ 0 +0000006c +0+24f6 R_SH_IMM_LOW16 +00000124 +file2data2 +\+ 0 +00000070 +0+23f6 R_SH_IMM_LOW16 +00000010 +file1text3 +\+ 0 +00000074 +0+81f6 R_SH_IMM_LOW16 +00000014 +file1data4 +\+ 0 +00000078 +0+4cf6 R_SH_IMM_LOW16 +00000000 +unresolved1 +\+ 0 +0000007c +0+64f6 R_SH_IMM_LOW16 +00000000 +unresolved3 +\+ 0 +00000080 +0+85f6 R_SH_IMM_LOW16 +00000000 +unresolved8 +\+ 0 +00000084 +0+32f6 R_SH_IMM_LOW16 +00000000 +unresolved9 +\+ 0 +00000088 +0+5df6 R_SH_IMM_LOW16 +00000000 +file1text1 +\+ 0 +0000008c +0+4bf6 R_SH_IMM_LOW16 +00000000 +file1data2 +\+ 0 +00000090 +0+28f6 R_SH_IMM_LOW16 +00000000 +file1data3 +\+ 0 + +Relocation section '\.rela\.data' at offset 0x[0-9a-f]+ contains 134 entries: +.* +00000008 +0+0b01 R_SH_DIR32 +00000004 +file1data1 +\+ 0 +0000000c +0+0701 R_SH_DIR32 +0000000c +file1text2 +\+ 0 +00000010 +0+7801 R_SH_DIR32 +00000128 +file2data3 +\+ 0 +00000014 +0+6701 R_SH_DIR32 +00000074 +file2text4 +\+ 0 +00000018 +0+7401 R_SH_DIR32 +00000000 +unresolved2 +\+ 0 +0000001c +0+0501 R_SH_DIR32 +00000000 +unresolved5 +\+ 0 +00000020 +0+6c01 R_SH_DIR32 +00000000 +unresolved6 +\+ 0 +00000024 +0+0601 R_SH_DIR32 +00000000 +unresolved9 +\+ 0 +00000028 +0+7a01 R_SH_DIR32 +00000000 +a1 +\+ 0 +0000002c +0+7001 R_SH_DIR32 +00000000 +a23 +\+ 0 +00000030 +0+5401 R_SH_DIR32 +0000003c +b123 +\+ 0 +00000034 +0+6a01 R_SH_DIR32 +0000009c +c3 +\+ 0 +00000038 +0+3c01 R_SH_DIR32 +000000a8 +c13 +\+ 0 +0000003c +0+2601 R_SH_DIR32 +00000000 +a2 +\+ 0 +00000040 +0+4e01 R_SH_DIR32 +00000000 +a3 +\+ 0 +00000044 +0+2501 R_SH_DIR32 +00000000 +a4 +\+ 0 +00000048 +0+6901 R_SH_DIR32 +00000000 +a12 +\+ 0 +0000004c +0+1501 R_SH_DIR32 +00000000 +a13 +\+ 0 +00000050 +0+7601 R_SH_DIR32 +00000000 +a23 +\+ 0 +00000054 +0+6201 R_SH_DIR32 +00000000 +a123 +\+ 0 +00000058 +0+3d01 R_SH_DIR32 +00000000 +b1 +\+ 0 +0000005c +0+7101 R_SH_DIR32 +00000000 +b2 +\+ 0 +00000060 +0+2f01 R_SH_DIR32 +00000000 +a3 +\+ 0 +00000064 +0+7f01 R_SH_DIR32 +00000000 +a13 +\+ 0 +00000068 +0+2e01 R_SH_DIR32 +00000000 +b3 +\+ 0 +0000006c +0+6801 R_SH_DIR32 +00000000 +b4 +\+ 0 +00000070 +0+5201 R_SH_DIR32 +00000000 +b12 +\+ 0 +00000074 +0+2901 R_SH_DIR32 +00000000 +b13 +\+ 0 +00000078 +0+3e01 R_SH_DIR32 +00000000 +a123 +\+ 0 +0000007c +0+6501 R_SH_DIR32 +00000024 +b3 +\+ 0 +00000080 +0+3b01 R_SH_DIR32 +00000030 +b13 +\+ 0 +00000084 +0+6f01 R_SH_DIR32 +00000034 +b23 +\+ 0 +00000088 +0+7d01 R_SH_DIR32 +00000000 +b23 +\+ 0 +0000008c +0+0c01 R_SH_DIR32 +00000000 +b123 +\+ 0 +00000090 +0+8301 R_SH_DIR32 +00000000 +c1 +\+ 0 +00000094 +0+2c01 R_SH_DIR32 +00000000 +c2 +\+ 0 +00000098 +0+6301 R_SH_DIR32 +00000000 +c3 +\+ 0 +0000009c +0+3901 R_SH_DIR32 +000000ac +c23 +\+ 0 +000000a0 +0+7e01 R_SH_DIR32 +000000b0 +c123 +\+ 0 +000000a4 +0+0e01 R_SH_DIR32 +00000000 +c4 +\+ 0 +000000a8 +0+2001 R_SH_DIR32 +00000000 +c12 +\+ 0 +000000ac +0+3101 R_SH_DIR32 +00000000 +c13 +\+ 0 +000000b0 +0+3601 R_SH_DIR32 +00000000 +c23 +\+ 0 +000000b4 +0+3a01 R_SH_DIR32 +00000000 +c123 +\+ 0 +000000b8 +0+4801 R_SH_DIR32 +00000000 +oa1 +\+ 0 +000000bc +0+1401 R_SH_DIR32 +00000000 +ob1 +\+ 0 +000000c0 +0+4401 R_SH_DIR32 +000000d0 +ob123 +\+ 0 +000000c4 +0+5901 R_SH_DIR32 +00000000 +oc1 +\+ 0 +000000c8 +0+7901 R_SH_DIR32 +00000000 +oa2 +\+ 0 +000000cc +0+6101 R_SH_DIR32 +000000b8 +ob2 +\+ 0 +000000d0 +0+7201 R_SH_DIR32 +00000044 +oc2 +\+ 0 +000000d4 +0+4901 R_SH_DIR32 +00000000 +oa12 +\+ 0 +000000d8 +0+1b01 R_SH_DIR32 +00000000 +oa12 +\+ 0 +000000dc +0+6001 R_SH_DIR32 +00000000 +ob12 +\+ 0 +000000e0 +0+4a01 R_SH_DIR32 +000000c4 +ob12 +\+ 0 +000000e4 +0+5a01 R_SH_DIR32 +00000000 +oc12 +\+ 0 +000000e8 +0+1201 R_SH_DIR32 +00000050 +oc12 +\+ 0 +000000ec +0+3f01 R_SH_DIR32 +00000000 +oa23 +\+ 0 +000000f0 +0+4501 R_SH_DIR32 +00000000 +oa13 +\+ 0 +000000f4 +0+0a01 R_SH_DIR32 +0000005c +oc123 +\+ 0 +000000f8 +0+5501 R_SH_DIR32 +00000000 +ob13 +\+ 0 +000000fc +0+5c01 R_SH_DIR32 +00000000 +oc13 +\+ 0 +00000100 +0+8201 R_SH_DIR32 +000000cc +ob23 +\+ 0 +00000104 +0+2b01 R_SH_DIR32 +00000058 +oc23 +\+ 0 +00000108 +0+5701 R_SH_DIR32 +00000000 +oa123 +\+ 0 +0000010c +0+5001 R_SH_DIR32 +00000000 +oa123 +\+ 0 +00000110 +0+6601 R_SH_DIR32 +00000000 +ob123 +\+ 0 +00000114 +0+3301 R_SH_DIR32 +00000000 +oc123 +\+ 0 +00000120 +0+7c01 R_SH_DIR32 +0000011c +file2data1 +\+ 0 +00000124 +0+5e01 R_SH_DIR32 +0000006c +file2text2 +\+ 0 +00000128 +0+8001 R_SH_DIR32 +00000010 +file1data3 +\+ 0 +0000012c +0+7701 R_SH_DIR32 +00000014 +file1text4 +\+ 0 +00000130 +0+7401 R_SH_DIR32 +00000000 +unresolved2 +\+ 0 +00000134 +0+7b01 R_SH_DIR32 +00000000 +unresolved4 +\+ 0 +00000138 +0+4801 R_SH_DIR32 +00000000 +oa1 +\+ 0 +0000013c +0+1701 R_SH_DIR32 +00000000 +oa2 +\+ 0 +00000140 +0+6d01 R_SH_DIR32 +00000000 +oa3 +\+ 0 +00000144 +0+1c01 R_SH_DIR32 +00000000 +oa13 +\+ 0 +00000148 +0+1901 R_SH_DIR32 +00000054 +oc13 +\+ 0 +0000014c +0+1001 R_SH_DIR32 +00000000 +oa4 +\+ 0 +00000150 +0+1b01 R_SH_DIR32 +00000000 +oa12 +\+ 0 +00000154 +0+4501 R_SH_DIR32 +00000000 +oa13 +\+ 0 +00000158 +0+3801 R_SH_DIR32 +00000000 +oa23 +\+ 0 +0000015c +0+3f01 R_SH_DIR32 +00000000 +oa23 +\+ 0 +00000160 +0+5701 R_SH_DIR32 +00000000 +oa123 +\+ 0 +00000164 +0+1601 R_SH_DIR32 +00000048 +oc3 +\+ 0 +00000168 +0+5001 R_SH_DIR32 +00000000 +oa123 +\+ 0 +0000016c +0+1401 R_SH_DIR32 +00000000 +ob1 +\+ 0 +00000170 +0+2201 R_SH_DIR32 +00000000 +ob2 +\+ 0 +00000174 +0+5f01 R_SH_DIR32 +00000000 +ob3 +\+ 0 +00000178 +0+1301 R_SH_DIR32 +00000000 +ob4 +\+ 0 +0000017c +0+8401 R_SH_DIR32 +00000000 +oa3 +\+ 0 +00000180 +0+2b01 R_SH_DIR32 +00000058 +oc23 +\+ 0 +00000184 +0+0a01 R_SH_DIR32 +0000005c +oc123 +\+ 0 +00000188 +0+6001 R_SH_DIR32 +00000000 +ob12 +\+ 0 +0000018c +0+5501 R_SH_DIR32 +00000000 +ob13 +\+ 0 +00000190 +0+4d01 R_SH_DIR32 +000000c8 +ob13 +\+ 0 +00000194 +0+8201 R_SH_DIR32 +000000cc +ob23 +\+ 0 +00000198 +0+5801 R_SH_DIR32 +00000000 +ob23 +\+ 0 +0000019c +0+6601 R_SH_DIR32 +00000000 +ob123 +\+ 0 +000001a0 +0+5901 R_SH_DIR32 +00000000 +oc1 +\+ 0 +000001a4 +0+1101 R_SH_DIR32 +000000bc +ob3 +\+ 0 +000001a8 +0+4401 R_SH_DIR32 +000000d0 +ob123 +\+ 0 +000001ac +0+0901 R_SH_DIR32 +00000000 +oc2 +\+ 0 +000001b0 +0+3701 R_SH_DIR32 +00000000 +oc3 +\+ 0 +000001b4 +0+5301 R_SH_DIR32 +00000000 +oc4 +\+ 0 +000001b8 +0+5a01 R_SH_DIR32 +00000000 +oc12 +\+ 0 +000001bc +0+5c01 R_SH_DIR32 +00000000 +oc13 +\+ 0 +000001c0 +0+2a01 R_SH_DIR32 +00000000 +oc23 +\+ 0 +000001c4 +0+3301 R_SH_DIR32 +00000000 +oc123 +\+ 0 +000001c8 +0+7a01 R_SH_DIR32 +00000000 +a1 +\+ 0 +000001cc +0+1a01 R_SH_DIR32 +00000098 +c2 +\+ 0 +000001d0 +0+6f01 R_SH_DIR32 +00000034 +b23 +\+ 0 +000001d4 +0+3d01 R_SH_DIR32 +00000000 +b1 +\+ 0 +000001d8 +0+8301 R_SH_DIR32 +00000000 +c1 +\+ 0 +000001dc +0+6901 R_SH_DIR32 +00000000 +a12 +\+ 0 +000001e0 +0+5601 R_SH_DIR32 +00000000 +a2 +\+ 0 +000001e4 +0+0d01 R_SH_DIR32 +00000020 +b2 +\+ 0 +000001e8 +0+5201 R_SH_DIR32 +00000000 +b12 +\+ 0 +000001ec +0+2001 R_SH_DIR32 +00000000 +c12 +\+ 0 +000001f0 +0+5401 R_SH_DIR32 +0000003c +b123 +\+ 0 +000001f4 +0+7e01 R_SH_DIR32 +000000b0 +c123 +\+ 0 +000001f8 +0+1501 R_SH_DIR32 +00000000 +a13 +\+ 0 +000001fc +0+2901 R_SH_DIR32 +00000000 +b13 +\+ 0 +00000200 +0+3901 R_SH_DIR32 +000000ac +c23 +\+ 0 +00000204 +0+3e01 R_SH_DIR32 +00000000 +a123 +\+ 0 +00000208 +0+3101 R_SH_DIR32 +00000000 +c13 +\+ 0 +0000020c +0+6201 R_SH_DIR32 +00000000 +a123 +\+ 0 +00000210 +0+6e01 R_SH_DIR32 +000000a4 +c12 +\+ 0 +00000214 +0+7001 R_SH_DIR32 +00000000 +a23 +\+ 0 +00000218 +0+0c01 R_SH_DIR32 +00000000 +b123 +\+ 0 +0000021c +0+4001 R_SH_DIR32 +00000000 +a12 +\+ 0 +00000220 +0+7301 R_SH_DIR32 +0000002c +b12 +\+ 0 +00000224 +0+3a01 R_SH_DIR32 +00000000 +c123 +\+ 0 + +Symbol table '\.symtab' contains 134 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +0: 00000000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +1: 00000000 +0 +SECTION +LOCAL +DEFAULT +1 + +2: 00000000 +0 +SECTION +LOCAL +DEFAULT +3 + +3: 00000000 +0 +SECTION +LOCAL +DEFAULT +5 + +4: 00000000 +0 +SECTION +LOCAL +DEFAULT +6 + +5: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved5 + +6: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved9 + +7: 0000000c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text2 + +8: 00000064 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text1 + +9: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc2 + +10: 0000005c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc123 + +11: 00000004 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data1 + +12: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b123 + +13: 00000020 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b2 + +14: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c4 + +15: 0000012c +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data4 + +16: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa4 + +17: 000000bc +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob3 + +18: 00000050 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc12 + +19: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob4 + +20: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob1 + +21: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a13 + +22: 00000048 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc3 + +23: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa2 + +24: 000000a0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c4 + +25: 00000054 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc13 + +26: 00000098 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c2 + +27: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa12 + +28: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa13 + +29: 000000c0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob4 + +30: 0000001c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b1 + +31: 00000018 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text5 + +32: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c12 + +33: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1text5 + +34: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob2 + +35: 00000010 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text3 + +36: 00000124 +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data2 + +37: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a4 + +38: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a2 + +39: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved1 + +40: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1data3 + +41: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b13 + +42: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc23 + +43: 00000058 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc23 + +44: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c2 + +45: 0000000c +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data2 + +46: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b3 + +47: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a3 + +48: 00000070 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text3 + +49: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c13 + +50: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved9 + +51: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc123 + +52: 00000028 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b4 + +53: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file2data4 + +54: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c23 + +55: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc3 + +56: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa23 + +57: 000000ac +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c23 + +58: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c123 + +59: 00000030 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b13 + +60: 000000a8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c13 + +61: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b1 + +62: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a123 + +63: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa23 + +64: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a12 + +65: 000000b4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob1 + +66: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved7 + +67: 00000060 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start2 + +68: 000000d0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob123 + +69: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa13 + +70: 00000094 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c1 + +71: 0000004c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc4 + +72: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa1 + +73: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa12 + +74: 000000c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob12 + +75: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1data2 + +76: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved1 + +77: 000000c8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob13 + +78: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a3 + +79: 00000018 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data5 + +80: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa123 + +81: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved6 + +82: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b12 + +83: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc4 + +84: 0000003c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b123 + +85: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob13 + +86: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a2 + +87: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa123 + +88: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob23 + +89: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc1 + +90: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc12 + +91: 00000004 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text1 + +92: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc13 + +93: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1text1 + +94: 0000006c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text2 + +95: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob3 + +96: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob12 + +97: 000000b8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob2 + +98: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a123 + +99: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c3 + +100: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved3 + +101: 00000024 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b3 + +102: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob123 + +103: 00000074 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text4 + +104: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b4 + +105: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a12 + +106: 0000009c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c3 + +107: 00000040 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc1 + +108: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved6 + +109: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa3 + +110: 000000a4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c12 + +111: 00000034 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b23 + +112: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a23 + +113: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b2 + +114: 00000044 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc2 + +115: 0000002c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b12 + +116: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved2 + +117: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start + +118: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a23 + +119: 00000014 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text4 + +120: 00000128 +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data3 + +121: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa2 + +122: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a1 + +123: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved4 + +124: 0000011c +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data1 + +125: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b23 + +126: 000000b0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c123 + +127: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a13 + +128: 00000010 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data3 + +129: 00000014 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data4 + +130: 000000cc +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob23 + +131: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c1 + +132: 00000000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa3 + +133: 00000000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved8 + +Hex dump of section '\.text': +.* + 0x00000000 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .* + 0x00000010 cc000140 cc000140 cc000280 cc0001e0 .* + 0x00000020 cc0000a0 cc0000a0 cc000280 cc000140 .* + 0x00000030 cc000140 cc000320 c8000320 cc0003c0 .* + 0x00000040 cc0003c0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00000050 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00000060 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .* + 0x00000070 cc000140 cc000140 cc0001e0 cc0001e0 .* + 0x00000080 cc000320 cc000320 cc000280 cc000280 .* + 0x00000090 cc000280 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x000000a0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x000000b0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x000000c0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x000000d0 6ff0fff0 .* + +Hex dump of section '\.data': +.* + 0x00000000 00000000 00000000 00000008 00000000 .* + 0x00000010 00000000 00000000 00000000 00000000 .* + 0x00000020 00000028 00000000 00000000 00000000 .* + 0x00000030 00000000 00000000 00000000 00000000 .* + 0x00000040 00000000 00000000 00000000 00000000 .* + 0x00000050 00000000 00000000 00000000 00000000 .* + 0x00000060 00000000 00000000 00000000 00000000 .* + 0x00000070 00000000 00000000 00000000 00000000 .* + 0x00000080 00000000 00000000 00000000 00000000 .* + 0x00000090 00000000 00000000 00000000 00000000 .* + 0x000000a0 00000000 00000000 00000000 00000000 .* + 0x000000b0 00000000 00000000 00000000 00000000 .* + 0x000000c0 00000000 00000000 00000000 00000000 .* + 0x000000d0 00000000 00000000 00000000 00000000 .* + 0x000000e0 00000000 00000000 00000000 00000000 .* + 0x000000f0 00000000 00000000 00000000 00000000 .* + 0x00000100 00000000 00000000 00000000 00000000 .* + 0x00000110 00000000 00000000 00000000 00000000 .* + 0x00000120 00000000 00000000 00000000 00000000 .* + 0x00000130 00000000 00000000 00000000 00000000 .* + 0x00000140 00000000 00000000 00000000 00000000 .* + 0x00000150 00000000 00000000 00000000 00000000 .* + 0x00000160 00000000 00000000 00000000 00000000 .* + 0x00000170 00000000 00000000 00000000 00000000 .* + 0x00000180 00000000 00000000 00000000 00000000 .* + 0x00000190 00000000 00000000 00000000 00000000 .* + 0x000001a0 00000000 00000000 00000000 00000000 .* + 0x000001b0 00000000 00000000 00000000 00000000 .* + 0x000001c0 00000000 00000000 00000000 00000000 .* + 0x000001d0 00000000 00000000 00000000 00000000 .* + 0x000001e0 00000000 00000000 00000000 00000000 .* + 0x000001f0 00000000 00000000 00000000 00000000 .* + 0x00000200 00000000 00000000 00000000 00000000 .* + 0x00000210 00000000 00000000 00000000 00000000 .* + 0x00000220 00000000 00000000 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl64.rd b/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl64.rd new file mode 100644 index 0000000..8bd5502 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/reldl64.rd @@ -0,0 +1,360 @@ + +Relocation section '\.rela\.text' at offset 0x[0-9a-f]+ contains 28 entries: +.* +0+8 +0+5b000000f6 R_SH_IMM_LOW16[ ]+0+4 +file1text1[ ]+\+ 0 +0+c +0+2d000000f6 R_SH_IMM_LOW16[ ]+0+c +file1data2[ ]+\+ 0 +0+10 +0+30000000f6 R_SH_IMM_LOW16[ ]+0+78 +file2text3[ ]+\+ 0 +0+14 +0+0f000000f6 R_SH_IMM_LOW16[ ]+0+12c +file2data4[ ]+\+ 0 +0+18 +0+4c000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved1[ ]+\+ 0 +0+1c +0+51000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved6[ ]+\+ 0 +0+20 +0+5d000000f6 R_SH_IMM_LOW16[ ]+0+ +file1text1[ ]+\+ 0 +0+24 +0+5d000000f6 R_SH_IMM_LOW16[ ]+0+ +file1text1[ ]+\+ 18 +0+28 +0+21000000f6 R_SH_IMM_LOW16[ ]+0+ +file1text5[ ]+\+ 8 +0+2c +0+2d000000f6 R_SH_IMM_LOW16[ ]+0+c +file1data2[ ]+\+ 30 +0+30 +0+2d000000f6 R_SH_IMM_LOW16[ ]+0+c +file1data2[ ]+\+ 0 +0+44 +0+42000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved7[ ]+\+ 0 +0+48 +0+27000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved1[ ]+\+ 0 +0+34 +0+35000000fc R_SH_IMM_HI16[ ]+0+ +file2data4[ ]+\+ 10 +0+38 +0+35000000fa R_SH_IMM_MEDHI16[ ]+0+ +file2data4[ ]+\+ 10 +0+3c +0+35000000f8 R_SH_IMM_MEDLOW16[ ]+0+ +file2data4[ ]+\+ 10 +0+40 +0+35000000f6 R_SH_IMM_LOW16[ ]+0+ +file2data4[ ]+\+ 10 +0+70 +0+08000000f6 R_SH_IMM_LOW16[ ]+0+6c +file2text1[ ]+\+ 0 +0+74 +0+24000000f6 R_SH_IMM_LOW16[ ]+0+124 +file2data2[ ]+\+ 0 +0+78 +0+23000000f6 R_SH_IMM_LOW16[ ]+0+10 +file1text3[ ]+\+ 0 +0+7c +0+81000000f6 R_SH_IMM_LOW16[ ]+0+14 +file1data4[ ]+\+ 0 +0+80 +0+4c000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved1[ ]+\+ 0 +0+84 +0+64000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved3[ ]+\+ 0 +0+88 +0+85000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved8[ ]+\+ 0 +0+8c +0+32000000f6 R_SH_IMM_LOW16[ ]+0+ +unresolved9[ ]+\+ 0 +0+90 +0+5d000000f6 R_SH_IMM_LOW16[ ]+0+ +file1text1[ ]+\+ 0 +0+94 +0+4b000000f6 R_SH_IMM_LOW16[ ]+0+ +file1data2[ ]+\+ 0 +0+98 +0+28000000f6 R_SH_IMM_LOW16[ ]+0+ +file1data3[ ]+\+ 0 + +Relocation section '\.rela\.data' at offset 0x[0-9a-f]+ contains 134 entries: +.* +0+8 +0+0b00000001 R_SH_DIR32[ ]+0+4 +file1data1[ ]+\+ 0 +0+c +0+700000001 R_SH_DIR32[ ]+0+c +file1text2[ ]+\+ 0 +0+10 +0+7800000001 R_SH_DIR32[ ]+0+128 +file2data3[ ]+\+ 0 +0+14 +0+6700000001 R_SH_DIR32[ ]+0+7c +file2text4[ ]+\+ 0 +0+18 +0+7400000001 R_SH_DIR32[ ]+0+ +unresolved2[ ]+\+ 0 +0+1c +0+0500000001 R_SH_DIR32[ ]+0+ +unresolved5[ ]+\+ 0 +0+20 +0+6c00000001 R_SH_DIR32[ ]+0+ +unresolved6[ ]+\+ 0 +0+24 +0+0600000001 R_SH_DIR32[ ]+0+ +unresolved9[ ]+\+ 0 +0+28 +0+7a00000001 R_SH_DIR32[ ]+0+ +a1[ ]+\+ 0 +0+2c +0+7000000001 R_SH_DIR32[ ]+0+ +a23[ ]+\+ 0 +0+30 +0+5400000001 R_SH_DIR32[ ]+0+44 +b123[ ]+\+ 0 +0+34 +0+6a00000001 R_SH_DIR32[ ]+0+a4 +c3[ ]+\+ 0 +0+38 +0+3c00000001 R_SH_DIR32[ ]+0+b0 +c13[ ]+\+ 0 +0+3c +0+2600000001 R_SH_DIR32[ ]+0+ +a2[ ]+\+ 0 +0+40 +0+4e00000001 R_SH_DIR32[ ]+0+ +a3[ ]+\+ 0 +0+44 +0+2500000001 R_SH_DIR32[ ]+0+ +a4[ ]+\+ 0 +0+48 +0+6900000001 R_SH_DIR32[ ]+0+ +a12[ ]+\+ 0 +0+4c +0+1500000001 R_SH_DIR32[ ]+0+ +a13[ ]+\+ 0 +0+50 +0+7600000001 R_SH_DIR32[ ]+0+ +a23[ ]+\+ 0 +0+54 +0+6200000001 R_SH_DIR32[ ]+0+ +a123[ ]+\+ 0 +0+58 +0+3d00000001 R_SH_DIR32[ ]+0+ +b1[ ]+\+ 0 +0+5c +0+7100000001 R_SH_DIR32[ ]+0+ +b2[ ]+\+ 0 +0+60 +0+2f00000001 R_SH_DIR32[ ]+0+ +a3[ ]+\+ 0 +0+64 +0+7f00000001 R_SH_DIR32[ ]+0+ +a13[ ]+\+ 0 +0+68 +0+2e00000001 R_SH_DIR32[ ]+0+ +b3[ ]+\+ 0 +0+6c +0+6800000001 R_SH_DIR32[ ]+0+ +b4[ ]+\+ 0 +0+70 +0+5200000001 R_SH_DIR32[ ]+0+ +b12[ ]+\+ 0 +0+74 +0+2900000001 R_SH_DIR32[ ]+0+ +b13[ ]+\+ 0 +0+78 +0+3e00000001 R_SH_DIR32[ ]+0+ +a123[ ]+\+ 0 +0+7c +0+6500000001 R_SH_DIR32[ ]+0+24 +b3[ ]+\+ 0 +0+80 +0+3b00000001 R_SH_DIR32[ ]+0+30 +b13[ ]+\+ 0 +0+84 +0+6f00000001 R_SH_DIR32[ ]+0+34 +b23[ ]+\+ 0 +0+88 +0+7d00000001 R_SH_DIR32[ ]+0+ +b23[ ]+\+ 0 +0+8c +0+0c00000001 R_SH_DIR32[ ]+0+ +b123[ ]+\+ 0 +0+90 +0+8300000001 R_SH_DIR32[ ]+0+ +c1[ ]+\+ 0 +0+94 +0+2c00000001 R_SH_DIR32[ ]+0+ +c2[ ]+\+ 0 +0+98 +0+6300000001 R_SH_DIR32[ ]+0+ +c3[ ]+\+ 0 +0+9c +0+3900000001 R_SH_DIR32[ ]+0+b4 +c23[ ]+\+ 0 +0+a0 +0+7e00000001 R_SH_DIR32[ ]+0+b8 +c123[ ]+\+ 0 +0+a4 +0+0e00000001 R_SH_DIR32[ ]+0+ +c4[ ]+\+ 0 +0+a8 +0+2000000001 R_SH_DIR32[ ]+0+ +c12[ ]+\+ 0 +0+ac +0+3100000001 R_SH_DIR32[ ]+0+ +c13[ ]+\+ 0 +0+b0 +0+3600000001 R_SH_DIR32[ ]+0+ +c23[ ]+\+ 0 +0+b4 +0+3a00000001 R_SH_DIR32[ ]+0+ +c123[ ]+\+ 0 +0+b8 +0+4800000001 R_SH_DIR32[ ]+0+ +oa1[ ]+\+ 0 +0+bc +0+1400000001 R_SH_DIR32[ ]+0+ +ob1[ ]+\+ 0 +0+c0 +0+4400000001 R_SH_DIR32[ ]+0+d8 +ob123[ ]+\+ 0 +0+c4 +0+5900000001 R_SH_DIR32[ ]+0+ +oc1[ ]+\+ 0 +0+c8 +0+7900000001 R_SH_DIR32[ ]+0+ +oa2[ ]+\+ 0 +0+cc +0+6100000001 R_SH_DIR32[ ]+0+c0 +ob2[ ]+\+ 0 +0+d0 +0+7200000001 R_SH_DIR32[ ]+0+4c +oc2[ ]+\+ 0 +0+d4 +0+4900000001 R_SH_DIR32[ ]+0+ +oa12[ ]+\+ 0 +0+d8 +0+1b00000001 R_SH_DIR32[ ]+0+ +oa12[ ]+\+ 0 +0+dc +0+6000000001 R_SH_DIR32[ ]+0+ +ob12[ ]+\+ 0 +0+e0 +0+4a00000001 R_SH_DIR32[ ]+0+cc +ob12[ ]+\+ 0 +0+e4 +0+5a00000001 R_SH_DIR32[ ]+0+ +oc12[ ]+\+ 0 +0+e8 +0+1200000001 R_SH_DIR32[ ]+0+58 +oc12[ ]+\+ 0 +0+ec +0+3f00000001 R_SH_DIR32[ ]+0+ +oa23[ ]+\+ 0 +0+f0 +0+4500000001 R_SH_DIR32[ ]+0+ +oa13[ ]+\+ 0 +0+f4 +0+0a00000001 R_SH_DIR32[ ]+0+64 +oc123[ ]+\+ 0 +0+f8 +0+5500000001 R_SH_DIR32[ ]+0+ +ob13[ ]+\+ 0 +0+fc +0+5c00000001 R_SH_DIR32[ ]+0+ +oc13[ ]+\+ 0 +0+100 +0+8200000001 R_SH_DIR32[ ]+0+d4 +ob23[ ]+\+ 0 +0+104 +0+2b00000001 R_SH_DIR32[ ]+0+60 +oc23[ ]+\+ 0 +0+108 +0+5700000001 R_SH_DIR32[ ]+0+ +oa123[ ]+\+ 0 +0+10c +0+5000000001 R_SH_DIR32[ ]+0+ +oa123[ ]+\+ 0 +0+110 +0+6600000001 R_SH_DIR32[ ]+0+ +ob123[ ]+\+ 0 +0+114 +0+3300000001 R_SH_DIR32[ ]+0+ +oc123[ ]+\+ 0 +0+120 +0+7c00000001 R_SH_DIR32[ ]+0+11c +file2data1[ ]+\+ 0 +0+124 +0+5e00000001 R_SH_DIR32[ ]+0+74 +file2text2[ ]+\+ 0 +0+128 +0+8000000001 R_SH_DIR32[ ]+0+10 +file1data3[ ]+\+ 0 +0+12c +0+7700000001 R_SH_DIR32[ ]+0+14 +file1text4[ ]+\+ 0 +0+130 +0+7400000001 R_SH_DIR32[ ]+0+ +unresolved2[ ]+\+ 0 +0+134 +0+7b00000001 R_SH_DIR32[ ]+0+ +unresolved4[ ]+\+ 0 +0+138 +0+4800000001 R_SH_DIR32[ ]+0+ +oa1[ ]+\+ 0 +0+13c +0+1700000001 R_SH_DIR32[ ]+0+ +oa2[ ]+\+ 0 +0+140 +0+6d00000001 R_SH_DIR32[ ]+0+ +oa3[ ]+\+ 0 +0+144 +0+1c00000001 R_SH_DIR32[ ]+0+ +oa13[ ]+\+ 0 +0+148 +0+1900000001 R_SH_DIR32[ ]+0+5c +oc13[ ]+\+ 0 +0+14c +0+1000000001 R_SH_DIR32[ ]+0+ +oa4[ ]+\+ 0 +0+150 +0+1b00000001 R_SH_DIR32[ ]+0+ +oa12[ ]+\+ 0 +0+154 +0+4500000001 R_SH_DIR32[ ]+0+ +oa13[ ]+\+ 0 +0+158 +0+3800000001 R_SH_DIR32[ ]+0+ +oa23[ ]+\+ 0 +0+15c +0+3f00000001 R_SH_DIR32[ ]+0+ +oa23[ ]+\+ 0 +0+160 +0+5700000001 R_SH_DIR32[ ]+0+ +oa123[ ]+\+ 0 +0+164 +0+1600000001 R_SH_DIR32[ ]+0+50 +oc3[ ]+\+ 0 +0+168 +0+5000000001 R_SH_DIR32[ ]+0+ +oa123[ ]+\+ 0 +0+16c +0+1400000001 R_SH_DIR32[ ]+0+ +ob1[ ]+\+ 0 +0+170 +0+2200000001 R_SH_DIR32[ ]+0+ +ob2[ ]+\+ 0 +0+174 +0+5f00000001 R_SH_DIR32[ ]+0+ +ob3[ ]+\+ 0 +0+178 +0+1300000001 R_SH_DIR32[ ]+0+ +ob4[ ]+\+ 0 +0+17c +0+8400000001 R_SH_DIR32[ ]+0+ +oa3[ ]+\+ 0 +0+180 +0+2b00000001 R_SH_DIR32[ ]+0+60 +oc23[ ]+\+ 0 +0+184 +0+0a00000001 R_SH_DIR32[ ]+0+64 +oc123[ ]+\+ 0 +0+188 +0+6000000001 R_SH_DIR32[ ]+0+ +ob12[ ]+\+ 0 +0+18c +0+5500000001 R_SH_DIR32[ ]+0+ +ob13[ ]+\+ 0 +0+190 +0+4d00000001 R_SH_DIR32[ ]+0+d0 +ob13[ ]+\+ 0 +0+194 +0+8200000001 R_SH_DIR32[ ]+0+d4 +ob23[ ]+\+ 0 +0+198 +0+5800000001 R_SH_DIR32[ ]+0+ +ob23[ ]+\+ 0 +0+19c +0+6600000001 R_SH_DIR32[ ]+0+ +ob123[ ]+\+ 0 +0+1a0 +0+5900000001 R_SH_DIR32[ ]+0+ +oc1[ ]+\+ 0 +0+1a4 +0+1100000001 R_SH_DIR32[ ]+0+c4 +ob3[ ]+\+ 0 +0+1a8 +0+4400000001 R_SH_DIR32[ ]+0+d8 +ob123[ ]+\+ 0 +0+1ac +0+0900000001 R_SH_DIR32[ ]+0+ +oc2[ ]+\+ 0 +0+1b0 +0+3700000001 R_SH_DIR32[ ]+0+ +oc3[ ]+\+ 0 +0+1b4 +0+5300000001 R_SH_DIR32[ ]+0+ +oc4[ ]+\+ 0 +0+1b8 +0+5a00000001 R_SH_DIR32[ ]+0+ +oc12[ ]+\+ 0 +0+1bc +0+5c00000001 R_SH_DIR32[ ]+0+ +oc13[ ]+\+ 0 +0+1c0 +0+2a00000001 R_SH_DIR32[ ]+0+ +oc23[ ]+\+ 0 +0+1c4 +0+3300000001 R_SH_DIR32[ ]+0+ +oc123[ ]+\+ 0 +0+1c8 +0+7a00000001 R_SH_DIR32[ ]+0+ +a1[ ]+\+ 0 +0+1cc +0+1a00000001 R_SH_DIR32[ ]+0+a0 +c2[ ]+\+ 0 +0+1d0 +0+6f00000001 R_SH_DIR32[ ]+0+34 +b23[ ]+\+ 0 +0+1d4 +0+3d00000001 R_SH_DIR32[ ]+0+ +b1[ ]+\+ 0 +0+1d8 +0+8300000001 R_SH_DIR32[ ]+0+ +c1[ ]+\+ 0 +0+1dc +0+6900000001 R_SH_DIR32[ ]+0+ +a12[ ]+\+ 0 +0+1e0 +0+5600000001 R_SH_DIR32[ ]+0+ +a2[ ]+\+ 0 +0+1e4 +0+0d00000001 R_SH_DIR32[ ]+0+20 +b2[ ]+\+ 0 +0+1e8 +0+5200000001 R_SH_DIR32[ ]+0+ +b12[ ]+\+ 0 +0+1ec +0+2000000001 R_SH_DIR32[ ]+0+ +c12[ ]+\+ 0 +0+1f0 +0+5400000001 R_SH_DIR32[ ]+0+44 +b123[ ]+\+ 0 +0+1f4 +0+7e00000001 R_SH_DIR32[ ]+0+b8 +c123[ ]+\+ 0 +0+1f8 +0+1500000001 R_SH_DIR32[ ]+0+ +a13[ ]+\+ 0 +0+1fc +0+2900000001 R_SH_DIR32[ ]+0+ +b13[ ]+\+ 0 +0+200 +0+3900000001 R_SH_DIR32[ ]+0+b4 +c23[ ]+\+ 0 +0+204 +0+3e00000001 R_SH_DIR32[ ]+0+ +a123[ ]+\+ 0 +0+208 +0+3100000001 R_SH_DIR32[ ]+0+ +c13[ ]+\+ 0 +0+20c +0+6200000001 R_SH_DIR32[ ]+0+ +a123[ ]+\+ 0 +0+210 +0+6e00000001 R_SH_DIR32[ ]+0+ac +c12[ ]+\+ 0 +0+214 +0+7000000001 R_SH_DIR32[ ]+0+ +a23[ ]+\+ 0 +0+218 +0+0c00000001 R_SH_DIR32[ ]+0+ +b123[ ]+\+ 0 +0+21c +0+4000000001 R_SH_DIR32[ ]+0+ +a12[ ]+\+ 0 +0+220 +0+7300000001 R_SH_DIR32[ ]+0+2c +b12[ ]+\+ 0 +0+224 +0+3a00000001 R_SH_DIR32[ ]+0+ +c123[ ]+\+ 0 + +Symbol table '\.symtab' contains 134 entries: + +Num: +Value +Size +Type +Bind +Vis +Ndx +Name + +0: 0+0000 +0 +NOTYPE +LOCAL +DEFAULT +UND + +1: 0+0000 +0 +SECTION +LOCAL +DEFAULT +1 + +2: 0+0000 +0 +SECTION +LOCAL +DEFAULT +3 + +3: 0+0000 +0 +SECTION +LOCAL +DEFAULT +5 + +4: 0+0000 +0 +SECTION +LOCAL +DEFAULT +6 + +5: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved5 + +6: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved9 + +7: 0+000c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text2 + +8: 0+006c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text1 + +9: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc2 + +10: 0+0064 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc123 + +11: 0+0004 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data1 + +12: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b123 + +13: 0+0020 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b2 + +14: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c4 + +15: 0+012c +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data4 + +16: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa4 + +17: 0+00c4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob3 + +18: 0+0058 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc12 + +19: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob4 + +20: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob1 + +21: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a13 + +22: 0+0050 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc3 + +23: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa2 + +24: 0+00a8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c4 + +25: 0+005c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc13 + +26: 0+00a0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c2 + +27: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa12 + +28: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa13 + +29: 0+00c8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob4 + +30: 0+001c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b1 + +31: 0+0018 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text5 + +32: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c12 + +33: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1text5 + +34: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob2 + +35: 0+0010 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text3 + +36: 0+0124 +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data2 + +37: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a4 + +38: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a2 + +39: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved1 + +40: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1data3 + +41: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b13 + +42: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc23 + +43: 0+0060 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc23 + +44: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c2 + +45: 0+000c +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data2 + +46: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b3 + +47: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a3 + +48: 0+0078 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text3 + +49: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c13 + +50: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved9 + +51: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc123 + +52: 0+0028 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b4 + +53: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file2data4 + +54: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c23 + +55: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc3 + +56: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa23 + +57: 0+00b4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c23 + +58: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c123 + +59: 0+0030 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b13 + +60: 0+00b0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c13 + +61: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b1 + +62: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a123 + +63: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa23 + +64: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a12 + +65: 0+00bc +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob1 + +66: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved7 + +67: 0+0068 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start2 + +68: 0+00d8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob123 + +69: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa13 + +70: 0+009c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c1 + +71: 0+0054 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc4 + +72: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa1 + +73: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa12 + +74: 0+00cc +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob12 + +75: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1data2 + +76: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved1 + +77: 0+00d0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob13 + +78: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a3 + +79: 0+0018 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data5 + +80: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa123 + +81: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved6 + +82: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b12 + +83: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc4 + +84: 0+0044 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b123 + +85: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob13 + +86: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a2 + +87: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa123 + +88: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob23 + +89: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc1 + +90: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc12 + +91: 0+0004 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text1 + +92: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oc13 + +93: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND file1text1 + +94: 0+0074 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text2 + +95: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob3 + +96: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob12 + +97: 0+00c0 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 ob2 + +98: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a123 + +99: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c3 + +100: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved3 + +101: 0+0024 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b3 + +102: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND ob123 + +103: 0+007c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file2text4 + +104: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b4 + +105: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a12 + +106: 0+00a4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c3 + +107: 0+0048 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc1 + +108: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved6 + +109: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND oa3 + +110: 0+00ac +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c12 + +111: 0+0034 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b23 + +112: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a23 + +113: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b2 + +114: 0+004c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 oc2 + +115: 0+002c +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 b12 + +116: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved2 + +117: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 start + +118: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a23 + +119: 0+0014 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 file1text4 + +120: 0+0128 +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data3 + +121: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa2 + +122: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND a1 + +123: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND unresolved4 + +124: 0+011c +0 +NOTYPE +GLOBAL +DEFAULT +3 file2data1 + +125: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND b23 + +126: 0+00b8 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4\] +1 c123 + +127: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND a13 + +128: 0+0010 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data3 + +129: 0+0014 +0 +NOTYPE +GLOBAL +DEFAULT +3 file1data4 + +130: 0+00d4 +0 +NOTYPE +GLOBAL +DEFAULT +\[<other>: 4] +1 ob23 + +131: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND c1 + +132: 0+0000 +0 +NOTYPE +GLOBAL +DEFAULT +UND oa3 + +133: 0+0000 +0 +<processor specific>: 13 +GLOBAL +DEFAULT +UND unresolved8 + +Hex dump of section '\.text': +.* + 0x00000000 6ff0fff0 6ff0fff0 cc0000a0 cc000140 .* + 0x00000010 cc000140 cc000140 cc000280 cc0001e0 .* + 0x00000020 cc0000a0 cc0000a0 cc000280 cc000140 .* + 0x00000030 cc000140 cc000320 c8000320 c8000320 .* + 0x00000040 c8000320 cc0003c0 cc0003c0 6ff0fff0 .* + 0x00000050 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00000060 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x00000070 cc0000a0 cc000140 cc000140 cc000140 .* + 0x00000080 cc0001e0 cc0001e0 cc000320 cc000320 .* + 0x00000090 cc000280 cc000280 cc000280 6ff0fff0 .* + 0x000000a0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x000000b0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x000000c0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 0x000000d0 6ff0fff0 6ff0fff0 6ff0fff0 .* + +Hex dump of section '\.data': +.* + 0x00000000 00000000 00000000 00000008 00000000 .* + 0x00000010 00000000 00000000 00000000 00000000 .* + 0x00000020 00000028 00000000 00000000 00000000 .* + 0x00000030 00000000 00000000 00000000 00000000 .* + 0x00000040 00000000 00000000 00000000 00000000 .* + 0x00000050 00000000 00000000 00000000 00000000 .* + 0x00000060 00000000 00000000 00000000 00000000 .* + 0x00000070 00000000 00000000 00000000 00000000 .* + 0x00000080 00000000 00000000 00000000 00000000 .* + 0x00000090 00000000 00000000 00000000 00000000 .* + 0x000000a0 00000000 00000000 00000000 00000000 .* + 0x000000b0 00000000 00000000 00000000 00000000 .* + 0x000000c0 00000000 00000000 00000000 00000000 .* + 0x000000d0 00000000 00000000 00000000 00000000 .* + 0x000000e0 00000000 00000000 00000000 00000000 .* + 0x000000f0 00000000 00000000 00000000 00000000 .* + 0x00000100 00000000 00000000 00000000 00000000 .* + 0x00000110 00000000 00000000 00000000 00000000 .* + 0x00000120 00000000 00000000 00000000 00000000 .* + 0x00000130 00000000 00000000 00000000 00000000 .* + 0x00000140 00000000 00000000 00000000 00000000 .* + 0x00000150 00000000 00000000 00000000 00000000 .* + 0x00000160 00000000 00000000 00000000 00000000 .* + 0x00000170 00000000 00000000 00000000 00000000 .* + 0x00000180 00000000 00000000 00000000 00000000 .* + 0x00000190 00000000 00000000 00000000 00000000 .* + 0x000001a0 00000000 00000000 00000000 00000000 .* + 0x000001b0 00000000 00000000 00000000 00000000 .* + 0x000001c0 00000000 00000000 00000000 00000000 .* + 0x000001d0 00000000 00000000 00000000 00000000 .* + 0x000001e0 00000000 00000000 00000000 00000000 .* + 0x000001f0 00000000 00000000 00000000 00000000 .* + 0x00000200 00000000 00000000 00000000 00000000 .* + 0x00000210 00000000 00000000 00000000 00000000 .* + 0x00000220 00000000 00000000 .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/relfail.exp b/binutils-2.21/ld/testsuite/ld-sh/sh64/relfail.exp new file mode 100644 index 0000000..fbdf80a --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/relfail.exp @@ -0,0 +1,219 @@ +# Expect script for ld-sh tests +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation +# +# This file is part of the GNU Binutils. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +# Test SH reloc failures - that is, cases that ld must not allow. + +if ![istarget sh64-*-*] { + return +} + +if [istarget sh64-*-linux*] { + set emul32 "shlelf32_linux" + set oformat32 "elf32-sh64-linux" + set startsym "_start" + set doabi64 0 +} elseif { [istarget sh64*-*-netbsd*] || [istarget sh5*-*-netbsd*] } then { + set emul32 "shelf32_nbsd" + set oformat32 "elf32-sh64-nbsd" + set startsym "__start" + set doabi64 1 + set emul64 "shelf64_nbsd" + set oformat64 "elf64-sh64-nbsd" +} else { + set emul32 "shelf32" + set oformat32 "elf32-sh64" + set startsym "start" + set doabi64 1 + set emul64 "shelf64" + set oformat64 "elf64-sh64" +} + +# opcode, asflags, ldflags, expected or "" for fail +# opcode blank means rebuild relfail.o and set default as/ld options + +set sh64abi32relfailtests { + + { "" "-isa=shcompact -abi=32" "-m $emul32 -Ttext 0x1000 --oformat $oformat32" "" } + { "mov.l lab,r0;.align 3;lab:nop" "" "" "mov.l 1008" } + { "mov.l to0,r0" "" "" "mov.l 1010" } + { "mov.l to1,r0" "" "" "" } + { "mov.l to2,r0" "" "" "" } + { "mov.l to3,r0" "" "" "" } + { "mov.l to4,r0" "" "" "mov.l 1014" } + + { "" "-isa=shmedia -abi=32 -no-expand" "-m $emul32 -Ttext 0x1000 --oformat $oformat32" "" } + { "pta lab,tr0;.align 3;lab:nop" "" "" "pta.*1008" } + + { "ld.q r0,datalabel to0 - 0x1000,r0" "" "" "ld.q.*,16," } + { "ld.q r0,datalabel to1 - 0x1000,r0" "" "" "" } + { "ld.q r0,datalabel to2 - 0x1000,r0" "" "" "" } + { "ld.q r0,datalabel to3 - 0x1000,r0" "" "" "" } + { "ld.q r0,datalabel to4 - 0x1000,r0" "" "" "" } + + { "ld.l r0,datalabel to0 - 0x1000,r0" "" "" "ld.l.*,16," } + { "ld.l r0,datalabel to1 - 0x1000,r0" "" "" "" } + { "ld.l r0,datalabel to2 - 0x1000,r0" "" "" "" } + { "ld.l r0,datalabel to3 - 0x1000,r0" "" "" "" } + { "ld.l r0,datalabel to4 - 0x1000,r0" "" "" "ld.l.*,20," } + + { "ld.w r0,datalabel to0 - 0x1000,r0" "" "" "ld.w.*,16," } + { "ld.w r0,datalabel to1 - 0x1000,r0" "" "" "" } + { "ld.w r0,datalabel to2 - 0x1000,r0" "" "" "ld.w.*,18," } + { "ld.w r0,datalabel to3 - 0x1000,r0" "" "" "" } + { "ld.w r0,datalabel to4 - 0x1000,r0" "" "" "ld.w.*,20," } + +} + +set sh64abi64relfailtests { + + { "" "-isa=shmedia -abi=64 -no-expand" "-m $emul64 -Ttext 0x1000 --oformat $oformat64" "" } + { "pta lab,tr0;.align 3;lab:nop" "" "" "pta.*1008" } + { "pta datalabel to0,tr0" "" "" "pta.*1010" } + { "pta datalabel to1,tr0" "" "" "pta.*1011" } + { "pta datalabel to2,tr0" "" "" "" } + { "pta datalabel to3,tr0" "" "" "" } + { "pta datalabel to4,tr0" "" "" "pta.*1014" } + + { "ld.q r0,datalabel to0 - 0x1000,r0" "" "" "ld.q.*,16," } + { "ld.q r0,datalabel to1 - 0x1000,r0" "" "" "" } + { "ld.q r0,datalabel to2 - 0x1000,r0" "" "" "" } + { "ld.q r0,datalabel to3 - 0x1000,r0" "" "" "" } + { "ld.q r0,datalabel to4 - 0x1000,r0" "" "" "" } + + { "ld.l r0,datalabel to0 - 0x1000,r0" "" "" "ld.l.*,16," } + { "ld.l r0,datalabel to1 - 0x1000,r0" "" "" "" } + { "ld.l r0,datalabel to2 - 0x1000,r0" "" "" "" } + { "ld.l r0,datalabel to3 - 0x1000,r0" "" "" "" } + { "ld.l r0,datalabel to4 - 0x1000,r0" "" "" "ld.l.*,20," } + + { "ld.w r0,datalabel to0 - 0x1000,r0" "" "" "ld.w.*,16," } + { "ld.w r0,datalabel to1 - 0x1000,r0" "" "" "" } + { "ld.w r0,datalabel to2 - 0x1000,r0" "" "" "ld.w.*,18," } + { "ld.w r0,datalabel to3 - 0x1000,r0" "" "" "" } + { "ld.w r0,datalabel to4 - 0x1000,r0" "" "" "ld.w.*,20," } + +} + +proc run_sh64relfailtests {sh64relfailtests} { + global ld + global as + global nm + global objdump + global readelf + global srcdir + global subdir + global emul32 + global emul64 + global oformat32 + global oformat64 + global startsym + + set testindex 0 + set is_unresolved 0 + + foreach testentry $sh64relfailtests { + set opcode [lindex $testentry 0] + set as_options [lindex $testentry 1] + set ld_options [subst [lindex $testentry 2]] + set expect_fail [lindex $testentry 3] + + set testname "SH64 relfail $opcode $as_options $ld_options" + + set objfiles {} + + incr testindex + + if {$opcode == ""} { + set def_as_options $as_options + set def_ld_options $ld_options + set is_unresolved 0 + set baseobj "tmpdir/relfail-$testindex.o" + if ![ld_assemble $as "$as_options $srcdir/$subdir/relfail.s" $baseobj] { + set is_unresolved 1 + } + continue + } + + if {$as_options == ""} { + set as_options $def_as_options + } + if {$ld_options == ""} { + set ld_options $def_ld_options + } + + if { $is_unresolved } { + unresolved $testname + continue + } + + set asm [open "tmpdir/relfail-$testindex.s" "w"] + puts $asm " .text" + puts $asm " .global $startsym" + puts $asm "$startsym:" + puts $asm " $opcode" + close $asm + + if ![ld_assemble $as "$as_options tmpdir/relfail-$testindex.s" "tmpdir/relfail-$testindex.o"] { + unresolved $testname + continue + } + + set binfile "tmpdir/relfail-$testindex.x" + + file delete $binfile + set objects "tmpdir/relfail-$testindex.o $baseobj" + set result [ld_simple_link $ld $binfile "--no-warn-mismatch $ld_options $objects"] + + set exists [file exists $binfile] + if {$exists && $expect_fail == ""} { + verbose "$testname: file $binfile exists when it shouldn't" 1 + catch "exec $objdump -d $binfile" objdump_output + verbose $objdump_output 1 + fail "$testname (file exists)" + continue + } + if {!$exists && $expect_fail != ""} { + verbose "$testname: file $binfile doesn't exist when it should" 1 + fail "$testname (file missing)" + continue + } + + if {$exists} { + catch "exec $objdump -d $binfile" objdump_output + regsub -all {[ ][ ]*} $objdump_output " " objdump_short + if ![regexp $expect_fail $objdump_short junk] { + verbose $objdump_output 1 + fail "$testname (incorrect reloc)" + continue + } + } + + file delete "tmpdir/relfail-$testindex.s" + file delete "tmpdir/relfail-$testindex.o" + file delete $binfile + pass $testname + } +} + +run_sh64relfailtests $sh64abi32relfailtests +if {$doabi64} { + run_sh64relfailtests $sh64abi64relfailtests +} diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/relfail.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/relfail.s new file mode 100644 index 0000000..5f5d171 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/relfail.s @@ -0,0 +1,36 @@ + .text + .align 4 + .global to0 +to0: + .byte 0 + .global to1 +to1: + .byte 0 + .global to2 +to2: + .byte 0 + .global to3 +to3: + .byte 0 + .global to4 +to4: + .byte 0 + .byte 0 + + .data + .align 4 + .global do0 +do0: + .byte 0 + .global do1 +do1: + .byte 0 + .global do2 +do2: + .byte 0 + .global do3 +do3: + .byte 0 + .global do4 +do4: + .byte 0 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/sh64-1.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/sh64-1.s new file mode 100644 index 0000000..3e488db --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/sh64-1.s @@ -0,0 +1,20 @@ +! Test that all common kinds of relocs get right for simple use. +! Auxiliary part. + .text + .mode SHmedia + .global foo + .global bar +foo: + pt/l xyzzy,tr3 +bar: + nop + + .data + .global baz +baz: + .long foobar + .long bar + .global baz2 +baz2: + .long xyzzy +foobar: .long baz diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/sh64-2.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/sh64-2.s new file mode 100644 index 0000000..8ca24c0 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/sh64-2.s @@ -0,0 +1,27 @@ +! Test that all common kinds of relocs get right for simple cases. +! Main part. + .text + .global start + .mode SHmedia +start: + movi foo,r33 + movi bar,r21 + pt/l bar,tr3 + movi foobar,r43 + movi baz2,r53 + movi foobar2,r4 + pta xyzzy,tr5 + pt/u plugh,tr1 + + .data + .global foobar +foobar: .long baz +foobar2: + .long bar + + .section .text.other,"ax" + .global xyzzy +xyzzy: + nop +plugh: + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/sh64.exp b/binutils-2.21/ld/testsuite/ld-sh/sh64/sh64.exp new file mode 100644 index 0000000..af6cbfe --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/sh64.exp @@ -0,0 +1,137 @@ +# Expect script for ld-sh tests +# Copyright (C) 2000, 2001, 2002, 2003, 2005, 2007 Free Software Foundation +# +# This file is part of the GNU Binutils. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +# Test SH linking; all types of relocs. This tests the assembler and +# tools like objdump as well as the linker. + +if ![istarget sh64-*-*] { + return +} + +if [istarget sh64*-*-linux*] { + return +} + +if { [istarget sh64*-*-netbsd*] || [istarget sh5*-*-netbsd*] } then { + return +} + +# List contains test-items with 3 items followed by 2 lists: +# 0:name 1:ld options 2:assembler options +# 3:filenames of assembler files 4: action and options. 5: name of output file + +# Actions: +# objdump: Apply objdump options on result. Compare with regex (last arg). +# nm: Apply nm options on result. Compare with regex (last arg). +# readelf: Apply readelf options on result. Compare with regex (last arg). + +# Note that the contents dump is the same for "inter-file datalabel +# references, 64-bit ABI" as for 32-bit ABI and ELF so we re-use it. + +set sh64tests { + {"SH64 linking, 64-bit ABI" "-mshelf64" + "--abi=64" {sh64-1.s sh64-2.s} + {{objdump -sr abi64.sd} {objdump -x abi64.xd}} "abi64.bin" } + {"SH64 linking, 64-bit ABI, -no-expand" "-mshelf64" + "--abi=64 -no-expand" {sh64-1.s sh64-2.s} + {{objdump -sr abixx-noexp.sd}} "abi64-noexp.bin" } + {"SH64 linking, 32-bit ABI" "-mshelf32" + "--abi=32" {sh64-1.s sh64-2.s} + {{objdump -sr abi32.sd} {objdump -x abi32.xd}} "abi32.bin" } + {"SH64 linking, 32-bit ABI, -no-expand" "-mshelf32" + "--abi=32 -no-expand" {sh64-1.s sh64-2.s} + {{objdump -sr abixx-noexp.sd}} "abi32-noexp.bin" } + {"SH64 linking, single multi-ISA object" "-mshelf32" + "--abi=32" {shmix-1.s} + {{objdump -sr mix1.sd} {objdump -x mix1.xd}} "mix1.bin" } + {"SH64 linking, single multi-ISA object, -no-expand" "-mshelf32" + "--abi=32 -no-expand" {shmix-1.s} + {{objdump -sr mix1-noexp.sd}} "mix1-noexp.bin" } + {"SH64 linking, two different-ISA objects" "-mshelf32" + "--abi=32" {shmix-2.s shmix-3.s} + {{objdump -sr mix2.sd} {objdump -x mix2.xd}} "mix2.bin" } + {"SH64 linking, two different-ISA objects, -no-expand" "-mshelf32" + "--abi=32 -no-expand" {shmix-2.s shmix-3.s} + {{objdump -sr mix2-noexp.sd}} "mix2-noexp.bin" } + {"SH64 linking, single SHcompact" "-mshelf32" + "--isa=SHcompact" {shcmp-1.s} + {{objdump -sr cmpct1.sd} {objdump -x cmpct1.xd}} "cmpct1.bin" } + {"SH64 inter-file datalabel references, 64-bit ABI" "-mshelf64" + "--abi=64" {shdl-1.s shdl-2.s} + {{objdump -sr shdl64.sd} {objdump -x shdl64.xd}} "shdl64.bin" } + {"SH64 inter-file datalabel references, 32-bit ABI" "-mshelf32" + "--abi=32" {shdl-1.s shdl-2.s} + {{objdump -sr shdl64.sd} {objdump -x shdl32.xd}} "shdl32.bin" } + {"SH64 inter-file datalabel references and gc-sections, 32-bit ABI" "-mshelf32 --gc-sections" + "--abi=32" {dlsection-1.s } + {{objdump -sr dlsection.sd}} "dlsection32.bin" } + {"SH64 inter-file datalabel references and gc-sections, 64-bit ABI" "-mshelf64 --gc-sections" + "--abi=64" {dlsection-1.s } + {{objdump -sr dlsection.sd}} "dlsection64.bin" } + {"SH64 simple partial linking, 32-bit ABI" "-mshelf32 -r" + "--abi=32" {rel-1.s rel-2.s} + {{objdump -sx rel32.xd}} "rel32.bin" } + {"SH64 simple partial linking, 64-bit ABI" "-mshelf64 -r" + "--abi=64" {rel-1.s rel-2.s} + {{objdump -sx rel64.xd}} "rel64.bin" } + {"SH64 partial linking with datalabel references, 32-bit ABI" "-mshelf32 -r" + "--abi=32" {reldl-1.s reldl-2.s} + {{readelf {-s -r -x 1 -x 3} reldl32.rd}} "reldl32.bin" } + {"SH64 partial linking with datalabel references, 64-bit ABI" "-mshelf64 -r" + "--abi=64" {reldl-1.s reldl-2.s} + {{readelf {-s -r -x 1 -x 3} reldl64.rd}} "reldl64.bin" } + {"Handling SH64 assembler-generated .cranges" "-mshelf32" + "--abi=32" {crange-2a.s crange-1.s} + {{readelf {-S -s -r -x 1 -x 2 -x 4} crange1.rd}} "crange1.bin" } + {"Handling SH64 assembler-generated .cranges, partial linking" "-mshelf32 -r" + "--abi=32" {crange-2a.s} + {{readelf {-S -s -r -x 2 -x 6} crangerel1.rd}} "crangerel1.bin" } + {"Mixing SH64 assembler-generated with linker-generated .cranges" "-mshelf32" + "--abi=32" {crange-2a.s crange-2b.s crange-1.s} + {{readelf {-S -s -r -x 2 -x 4} crange2.rd}} "crange2.bin" } + {"Mixing SH64 assembler-generated with linker-generated .cranges, partial linking" + "-mshelf32 -r" + "--abi=32" {crange-2a.s crange-2c.s crange-2d.s crange-2e.s} + {{readelf {-S -s -r -x 2 -x 6} crangerel2.rd}} "crangerel2.bin" } + {"Merge and use of SH64 .cranges, some not originally in order" "-mshelf32" + "--abi=32" + {crange-2e.s crange-2f.s crange-2g.s crange-2a.s crange-2d.s crange-2i.s + crange-2h.s crange-1.s} + {{readelf {-S -s -x 2 -x 4} crange3.rd} {objdump -d crange3.dd}} "crange3.bin" } + {"Sorted SH64 .cranges, entry at SHcompact code" "-mshelf32 --entry diversion" + "--abi=32" + {crange-2e.s crange-2f.s crange-2g.s crange-2a.s crange-2d.s crange-2i.s + crange-2h.s crange-1.s} + {{readelf {-h -S -s -x 2 -x 4} crange3-cmpct.rd}} "crange3-cmpct.bin" } + {"Sorted SH64 .cranges, entry at SHmedia code" "-mshelf32 --entry diversion2" + "--abi=32" + {crange-2e.s crange-2f.s crange-2g.s crange-2a.s crange-2d.s crange-2i.s + crange-2h.s crange-1.s} + {{readelf {-h -S -s -x 2 -x 4} crange3-media.rd}} "crange3-media.bin" } + {"SH64 Big Endianness" "-mshelf64 -Tendian.ld" + "--abi=64" {endian.s} + {{objdump -s endian.sbd} {objdump -d endian.dbd}} "endianb.bin" } + {"SH64 Little Endianness" "-mshlelf64 -Tendian.ld" + "--abi=64 --little" {endian.s} + {{objdump -s endian.sld} {objdump -d endian.dld}} "endinanl.bin" } +} + +run_ld_link_tests $sh64tests diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/shcmp-1.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/shcmp-1.s new file mode 100644 index 0000000..f915af4 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/shcmp-1.s @@ -0,0 +1,15 @@ +! A single SHcompact file, that should link correctly. + .text + .global start +start: + mova next,r0 + nop +next: + nop + mov #42,r10 + + .section .rodata + .long start +here: + .long here + .long next diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl-1.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl-1.s new file mode 100644 index 0000000..0f2803c --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl-1.s @@ -0,0 +1,359 @@ +! Test inter-file DataLabel support. +! +! We need to test symbols that are: +! * Global, defined in this file, with/without/both-with-without datalabel +! references. +! * The above in combinations where the reference is/is not from within +! the same section. The implementation is currently indifferent to that +! fact, but it seems likely to be something that can change. +! * Extern with/without/both-with-without datalabel-qualified references. +! * The above with reference from same *and* other file. +! * The above in combinations for where the symbol is/is not a +! STO_SH5_ISA32-marked symbol. + +! There will be omissions and overlap in combinations. Add spotted +! omissions with complementary tests in other files. + + .text + .mode SHmedia + +! For good measure, we start with a nop to get a non-zero offset within +! the .text section. + + .global start +start: + nop + +! Referenced from the same file, same section, is ISA32, only referenced +! with datalabel qualifier. + .global foo +foo: + nop + movi (datalabel foo + 8) & 65535,r30 + +! Referenced from same file, same section, both with and without +! datalabel qualifier, is ISA32. + .global fooboth +fooboth: + nop + movi (datalabel fooboth + 16) & 65535,r40 + movi (fooboth + 12) & 65535,r40 + +! Same as above, but in different order. + .global fooboth2 +fooboth2: + nop + movi (fooboth2 + 12) & 65535,r40 + movi (datalabel fooboth2 + 16) & 65535,r40 + +! Referenced from this file and another, same section, is ISA32. + .global foowithout +foowithout: + nop + movi (foowithout + 24) & 65535,r30 + +! Same as above, different section than definition. + + .global foo_other +foo_other: + nop + .global foo_otherboth +foo_otherboth: + nop + .global foo_otherboth2 +foo_otherboth2: + nop + .global foo_otherwithout +foo_otherwithout: + nop + + .section .rodata + .long datalabel foo_other + 4 + .long datalabel foo_otherboth + 40 + .long foo_otherboth + 24 + .long foo_otherboth2 + 24 + .long datalabel foo_otherboth2 + 40 + .long foo_otherwithout + + .text + +! Same as above, mixing references from same and other section. + .global foo_mix +foo_mix: + nop + movi (datalabel foo_mix + 8) & 65535,r30 + .global foo_mix2 +foo_mix2: + nop + movi (foo_mix2 + 8) & 65535,r30 + .global foo_mixboth +foo_mixboth: + nop + movi (datalabel foo_mixboth + 80) & 65535,r30 + movi (foo_mixboth + 80) & 65535,r30 + .global foo_mixboth2 +foo_mixboth2: + nop + movi (foo_mixboth2 + 64) & 65535,r30 + movi (datalabel foo_mixboth2 + 64) & 65535,r30 + .global foo_mixwithout +foo_mixwithout: + nop + movi (foo_mixwithout + 42) & 65535,r30 + .global foo_mixwithout2 +foo_mixwithout2: + nop + movi (foo_mixwithout2 + 24) & 65535,r30 + + .section .rodata + .long foo_mix + 4 + .long datalabel foo_mix2 + 48 + .long datalabel foo_mixboth + 400 + .long foo_mixboth + 420 + .long foo_mixboth2 + 248 + .long datalabel foo_mixboth2 + 240 + .long foo_mixwithout + +! Same as above, referencing symbol in other file (reference only from +! this to other file). + + .text + nop + movi (datalabel bar + 8) & 65535,r30 + + movi (datalabel barboth + 16) & 65535,r40 + movi (barboth + 12) & 65535,r40 + + movi (barboth2 + 12) & 65535,r40 + movi (datalabel barboth2 + 16) & 65535,r40 + + movi (barwithout + 24) & 65535,r30 + + .section .rodata + .long datalabel bar_other + 4 + .long datalabel bar_otherboth + 40 + .long bar_otherboth + 24 + .long bar_otherboth2 + 24 + .long datalabel bar_otherboth2 + 40 + .long bar_otherwithout + + .text + movi (datalabel bar_mix + 8) & 65535,r30 + movi (bar_mix2 + 8) & 65535,r30 + movi (datalabel bar_mixboth + 80) & 65535,r30 + movi (bar_mixboth + 80) & 65535,r30 + movi (bar_mixboth2 + 64) & 65535,r30 + movi (datalabel bar_mixboth2 + 64) & 65535,r30 + movi (bar_mixwithout + 42) & 65535,r30 + movi (bar_mixwithout2 + 24) & 65535,r30 + + .section .rodata + .long bar_mix + 4 + .long datalabel bar_mix2 + 48 + .long datalabel bar_mixboth + 400 + .long bar_mixboth + 420 + .long bar_mixboth2 + 248 + .long datalabel bar_mixboth2 + 240 + .long bar_mixwithout + +! Same as above, referencing symbol in other file *and* within that file. + + .text + movi (datalabel baz + 8) & 65535,r30 + + movi (datalabel bazboth + 16) & 65535,r40 + movi (bazboth + 12) & 65535,r40 + + movi (bazboth2 + 12) & 65535,r40 + movi (datalabel bazboth2 + 16) & 65535,r40 + + movi (bazwithout + 24) & 65535,r30 + + .section .rodata + .long datalabel baz_other + 4 + .long datalabel baz_otherboth + 40 + .long baz_otherboth + 24 + .long baz_otherboth2 + 24 + .long datalabel baz_otherboth2 + 40 + .long baz_otherwithout + + .text + movi (datalabel baz_mix + 8) & 65535,r30 + movi (baz_mix2 + 8) & 65535,r30 + movi (datalabel baz_mixboth + 80) & 65535,r30 + movi (baz_mixboth + 80) & 65535,r30 + movi (baz_mixboth2 + 64) & 65535,r30 + movi (datalabel baz_mixboth2 + 64) & 65535,r30 + movi (baz_mixwithout + 42) & 65535,r30 + movi (baz_mixwithout2 + 24) & 65535,r30 + + .section .rodata + .long baz_mix + 4 + .long datalabel baz_mix2 + 48 + .long datalabel baz_mixboth + 400 + .long baz_mixboth + 420 + .long baz_mixboth2 + 248 + .long datalabel baz_mixboth2 + 240 + .long baz_mixwithout + +! Same as all of the above, but where the symbol is not an ISA32 one. + + .data + .global dfoo +dfoo: + .long 0 + .long (datalabel dfoo + 8) + + .global dfooboth +dfooboth: + .long 0 + .long (datalabel dfooboth + 16) + .long (dfooboth + 12) + + .global dfooboth2 +dfooboth2: + .long 0 + .long (dfooboth2 + 12) + .long (datalabel dfooboth2 + 16) + + .global dfoowithout +dfoowithout: + .long 0 + .long (dfoowithout + 24) + + .global dfoo_other +dfoo_other: + .long 0 + .global dfoo_otherboth +dfoo_otherboth: + .long 0 + .global dfoo_otherboth2 +dfoo_otherboth2: + .long 0 + .global dfoo_otherwithout +dfoo_otherwithout: + .long 0 + + .section .rodata + .long datalabel dfoo_other + 4 + .long datalabel dfoo_otherboth + 40 + .long dfoo_otherboth + 24 + .long dfoo_otherboth2 + 24 + .long datalabel dfoo_otherboth2 + 40 + .long dfoo_otherwithout + + .data + +! Same as above, mixing references from same and other section. + .global dfoo_mix +dfoo_mix: + .long 0 + .long (datalabel dfoo_mix + 8) + .global dfoo_mix2 +dfoo_mix2: + .long 0 + .long (dfoo_mix2 + 8) + .global dfoo_mixboth +dfoo_mixboth: + .long 0 + .long (datalabel dfoo_mixboth + 80) + .long (dfoo_mixboth + 80) + .global dfoo_mixboth2 +dfoo_mixboth2: + .long 0 + .long (dfoo_mixboth2 + 64) + .long (datalabel dfoo_mixboth2 + 64) + .global dfoo_mixwithout +dfoo_mixwithout: + .long 0 + .long (dfoo_mixwithout + 42) + .global dfoo_mixwithout2 +dfoo_mixwithout2: + .long 0 + .long (dfoo_mixwithout2 + 24) + + .section .rodata + .long dfoo_mix + 4 + .long datalabel dfoo_mix2 + 48 + .long datalabel dfoo_mixboth + 400 + .long dfoo_mixboth + 420 + .long dfoo_mixboth2 + 248 + .long datalabel dfoo_mixboth2 + 240 + .long dfoo_mixwithout + +! Same as above, referencing symbol in other file (reference only from +! this to other file). + + .text + movi (datalabel dbarboth + 16) & 65535,r40 + movi (dbarboth + 12) & 65535,r40 + movi (dbarboth2 + 12) & 65535,r40 + movi (datalabel dbarboth2 + 16) & 65535,r40 + movi (dbarwithout + 24) & 65535,r30 + + .data + .long (datalabel dbar + 8) + .long datalabel dbar_other + 4 + .long datalabel dbar_otherboth + 40 + .long dbar_otherboth + 24 + .long dbar_otherboth2 + 24 + .long datalabel dbar_otherboth2 + 40 + .long dbar_otherwithout + + .text + movi (datalabel dbar_mix + 8) & 65535,r30 + movi (dbar_mix2 + 8) & 65535,r30 + movi (datalabel dbar_mixboth + 80) & 65535,r30 + movi (dbar_mixboth + 80) & 65535,r30 + movi (dbar_mixboth2 + 64) & 65535,r30 + movi (datalabel dbar_mixboth2 + 64) & 65535,r30 + movi (dbar_mixwithout + 42) & 65535,r30 + movi (dbar_mixwithout2 + 24) & 65535,r30 + + .data + .long dbar_mix + 4 + .long datalabel dbar_mix2 + 48 + .long datalabel dbar_mixboth + 400 + .long dbar_mixboth + 420 + .long dbar_mixboth2 + 248 + .long datalabel dbar_mixboth2 + 240 + .long dbar_mixwithout + +! Same as above, referencing symbol in other file *and* within that file. + + .text + movi (datalabel dbazboth + 16) & 65535,r40 + movi (dbazboth + 12) & 65535,r40 + + movi (dbazboth2 + 12) & 65535,r40 + movi (datalabel dbazboth2 + 16) & 65535,r40 + + movi (dbazwithout + 24) & 65535,r30 + + .data + .long (datalabel dbaz + 8) + .long datalabel dbaz_other + 4 + .long datalabel dbaz_otherboth + 40 + .long dbaz_otherboth + 24 + .long dbaz_otherboth2 + 24 + .long datalabel dbaz_otherboth2 + 40 + .long dbaz_otherwithout + + .text + movi (datalabel dbaz_mix + 8) & 65535,r30 + movi (dbaz_mix2 + 8) & 65535,r30 + movi (datalabel dbaz_mixboth + 80) & 65535,r30 + movi (dbaz_mixboth + 80) & 65535,r30 + movi (dbaz_mixboth2 + 64) & 65535,r30 + movi (datalabel dbaz_mixboth2 + 64) & 65535,r30 + movi (dbaz_mixwithout + 42) & 65535,r30 + movi (dbaz_mixwithout2 + 24) & 65535,r30 + + .data + .long dbaz_mix + 4 + .long datalabel dbaz_mix2 + 48 + .long datalabel dbaz_mixboth + 400 + .long dbaz_mixboth + 420 + .long dbaz_mixboth2 + 248 + .long datalabel dbaz_mixboth2 + 240 + .long dbaz_mixwithout diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl-2.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl-2.s new file mode 100644 index 0000000..a41fd52 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl-2.s @@ -0,0 +1,286 @@ +! Part two of test for inter-file DataLabel support. + + .mode SHmedia + .text +part2: + movi (datalabel foowithout + 16) & 65535, r24 + + .section .rodata + .long datalabel foo_otherwithout + 32 + + .text + movi (datalabel foo_mixwithout + 1024) & 65535, r24 + .section .rodata + .long datalabel foo_mixwithout + 32 + + .text + movi (datalabel foo_mixwithout2 + 1024) & 65535, r24 + .section .rodata + .long foo_mixwithout2 + 32 + + .text + .global bar +bar: + nop + + .global barboth +barboth: + nop + + .global barboth2 +barboth2: + nop + + .global barwithout +barwithout: + nop + + .global bar_other +bar_other: + nop + .global bar_otherboth +bar_otherboth: + nop + .global bar_otherboth2 +bar_otherboth2: + nop + .global bar_otherwithout +bar_otherwithout: + nop + + .text + + .global bar_mix +bar_mix: + nop + .global bar_mix2 +bar_mix2: + nop + .global bar_mixboth +bar_mixboth: + nop + .global bar_mixboth2 +bar_mixboth2: + nop + .global bar_mixwithout +bar_mixwithout: + nop + .global bar_mixwithout2 +bar_mixwithout2: + nop + +! Almost-copy of "foo" in primary file. + + .global baz +baz: + nop + movi (datalabel baz + 8) & 65535,r30 + + .global bazboth +bazboth: + nop + movi (datalabel bazboth + 16) & 65535,r40 + movi (bazboth + 12) & 65535,r40 + + .global bazboth2 +bazboth2: + nop + movi (bazboth2 + 12) & 65535,r40 + movi (datalabel bazboth2 + 16) & 65535,r40 + + .global bazwithout +bazwithout: + nop + movi (datalabel bazwithout + 24) & 65535,r30 + + .global baz_other +baz_other: + nop + .global baz_otherboth +baz_otherboth: + nop + .global baz_otherboth2 +baz_otherboth2: + nop + .global baz_otherwithout +baz_otherwithout: + nop + + .section .rodata + .long datalabel baz_other + 4 + .long datalabel baz_otherboth + 40 + .long baz_otherboth + 24 + .long baz_otherboth2 + 24 + .long datalabel baz_otherboth2 + 40 + .long baz_otherwithout + + .text + + .global baz_mix +baz_mix: + nop + movi (datalabel baz_mix + 8) & 65535,r30 + .global baz_mix2 +baz_mix2: + nop + movi (baz_mix2 + 8) & 65535,r30 + .global baz_mixboth +baz_mixboth: + nop + movi (datalabel baz_mixboth + 80) & 65535,r30 + movi (baz_mixboth + 80) & 65535,r30 + .global baz_mixboth2 +baz_mixboth2: + nop + movi (baz_mixboth2 + 64) & 65535,r30 + movi (datalabel baz_mixboth2 + 64) & 65535,r30 + .global baz_mixwithout +baz_mixwithout: + nop + movi (baz_mixwithout + 42) & 65535,r30 + .global baz_mixwithout2 +baz_mixwithout2: + nop + movi (baz_mixwithout2 + 24) & 65535,r30 + + .section .rodata + .long baz_mix + 4 + .long datalabel baz_mix2 + 48 + .long datalabel baz_mixboth + 400 + .long baz_mixboth + 420 + .long baz_mixboth2 + 248 + .long datalabel baz_mixboth2 + 240 + .long baz_mixwithout + + .data + .long datalabel dfoowithout + 44 + .long datalabel dfoo_mixwithout + 48 + .long datalabel dfoo_mixwithout2 + 84 + + .global dbar +dbar: + .long 0 + .global dbarboth +dbarboth: + .long 0 + .global dbarboth2 +dbarboth2: + .long 0 + .global dbarwithout +dbarwithout: + .long 0 + .global dbar_other +dbar_other: + .long 0 + .global dbar_otherboth +dbar_otherboth: + .long 0 + .global dbar_otherboth2 +dbar_otherboth2: + .long 0 + .global dbar_otherwithout +dbar_otherwithout: + .long 0 + + .global dbar_mix +dbar_mix: + .long 0 + .global dbar_mix2 +dbar_mix2: + .long 0 + .global dbar_mixboth +dbar_mixboth: + .long 0 + .global dbar_mixboth2 +dbar_mixboth2: + .long 0 + .global dbar_mixwithout +dbar_mixwithout: + .long 0 + .global dbar_mixwithout2 +dbar_mixwithout2: + .long 0 + +! Almost-copy of "dfoo" in primary file. + + .data + .global dbaz +dbaz: + .long 0 + .long (datalabel dbaz + 8) + + .global dbazboth +dbazboth: + .long 0 + .long (datalabel dbazboth + 16) + .long (dbazboth + 12) + + .global dbazboth2 +dbazboth2: + .long 0 + .long (dbazboth2 + 12) + .long (datalabel dbazboth2 + 16) + + .global dbazwithout +dbazwithout: + .long 0 + .long (dbazwithout + 24) + + .global dbaz_other +dbaz_other: + .long 0 + .global dbaz_otherboth +dbaz_otherboth: + .long 0 + .global dbaz_otherboth2 +dbaz_otherboth2: + .long 0 + .global dbaz_otherwithout +dbaz_otherwithout: + .long 0 + + .section .rodata + .long datalabel dbaz_other + 4 + .long datalabel dbaz_otherboth + 40 + .long dbaz_otherboth + 24 + .long dbaz_otherboth2 + 24 + .long datalabel dbaz_otherboth2 + 40 + .long dbaz_otherwithout + + .data + + .global dbaz_mix +dbaz_mix: + .long 0 + .long (datalabel dbaz_mix + 8) + .global dbaz_mix2 +dbaz_mix2: + .long 0 + .long (dbaz_mix2 + 8) + .global dbaz_mixboth +dbaz_mixboth: + .long 0 + .long (datalabel dbaz_mixboth + 80) + .long (dbaz_mixboth + 80) + .global dbaz_mixboth2 +dbaz_mixboth2: + .long 0 + .long (dbaz_mixboth2 + 64) + .long (datalabel dbaz_mixboth2 + 64) + .global dbaz_mixwithout +dbaz_mixwithout: + .long 0 + .long (dbaz_mixwithout + 42) + .global dbaz_mixwithout2 +dbaz_mixwithout2: + .long 0 + .long (dbaz_mixwithout2 + 24) + + .section .rodata + .long dbaz_mix + 4 + .long datalabel dbaz_mix2 + 48 + .long datalabel dbaz_mixboth + 400 + .long dbaz_mixboth + 420 + .long dbaz_mixboth2 + 248 + .long datalabel dbaz_mixboth2 + 240 + .long dbaz_mixwithout diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl32.xd b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl32.xd new file mode 100644 index 0000000..56773e3 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl32.xd @@ -0,0 +1,123 @@ +.*: file format .*-sh64 +.* +architecture: sh5, flags 0x0+112: +EXEC_P, HAS_SYMS, D_PAGED +start address 0x0+1001 + +Program Header: + LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7 + filesz 0x0+348 memsz 0x0+348 flags r-x + LOAD off 0x0+448 vaddr 0x0+13c8 paddr 0x0+13c8 align 2\*\*7 + filesz 0x0+194 memsz 0x0+194 flags rw- + LOAD off 0x0+600 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7 + filesz 0x00000004 memsz 0x00000004 flags rw- + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+204 0+1000 0+1000 0+100 2\*\*0 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 \.rodata 0+144 0+1204 0+1204 0+304 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 2 \.data 0+194 0+13c8 0+13c8 0+448 2\*\*2 + CONTENTS, ALLOC, LOAD, DATA + 3 \.stack 0+4 0+80000 0+80000 0+600 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA +SYMBOL TABLE: +0+1000 l d \.text 0+ (|\.text) +0+1204 l d \.rodata 0+ (|\.rodata) +0+13c8 l d \.data 0+ (|\.data) +0+80000 l d \.stack 0+ (|\.stack) +0+1150 l \.text 0+ 0x04 part2 +0+13f8 g \.data 0+ dfoo_otherboth2 +0+1178 g \.text 0+ 0x04 bar_otherwithout +0+11b4 g \.text 0+ 0x04 bazwithout +0+1428 g \.data 0+ dfoo_mixwithout +0+1554 g \.data 0+ dbaz_mixwithout2 +0+11bc g \.text 0+ 0x04 baz_other +0+11cc g \.text 0+ 0x04 baz_mix +0+11c0 g \.text 0+ 0x04 baz_otherboth +0+13e8 g \.data 0+ dfoowithout +0+14b4 g \.data 0+ dbar +0+106c g \.text 0+ 0x04 foo_mixwithout2 +0+11a8 g \.text 0+ 0x04 bazboth2 +0+13fc g \.data 0+ dfoo_otherwithout +0+11c4 g \.text 0+ 0x04 baz_otherboth2 +0+1174 g \.text 0+ 0x04 bar_otherboth2 +0+1194 g \.text 0+ 0x04 baz +0+13c8 g \.data 0+ dfoo +0+14e8 g \.data 0+ dbar_mixwithout2 +0+13dc g \.data 0+ dfooboth2 +0+1408 g \.data 0+ dfoo_mix2 +0+154c g \.data 0+ dbaz_mixwithout +0+1044 g \.text 0+ 0x04 foo_mix2 +0+1018 g \.text 0+ 0x04 fooboth2 +0+14cc g \.data 0+ dbar_otherboth2 +0+117c g \.text 0+ 0x04 bar_mix +0+14d0 g \.data 0+ dbar_otherwithout +0+11dc g \.text 0+ 0x04 baz_mixboth +0+14c8 g \.data 0+ dbar_otherboth +0+150c g \.data 0+ dbazwithout +0+152c g \.data 0+ dbaz_mix2 +0+1184 g \.text 0+ 0x04 bar_mixboth +0+13f4 g \.data 0+ dfoo_otherboth +0+14dc g \.data 0+ dbar_mixboth +0+1024 g \.text 0+ 0x04 foowithout +0+14e4 g \.data 0+ dbar_mixwithout +0+11fc g \.text 0+ 0x04 baz_mixwithout2 +0+1030 g \.text 0+ 0x04 foo_otherboth +0+1540 g \.data 0+ dbaz_mixboth2 +0+104c g \.text 0+ 0x04 foo_mixboth +0+1534 g \.data 0+ dbaz_mixboth +0+103c g \.text 0+ 0x04 foo_mix +0+1518 g \.data 0+ dbaz_otherboth +0+14e0 g \.data 0+ dbar_mixboth2 +0+14ec g \.data 0+ dbaz +0+1524 g \.data 0+ dbaz_mix +0+13c8 g .* 0+ ___dtors +0+141c g \.data 0+ dfoo_mixboth2 +0+119c g \.text 0+ 0x04 bazboth +0+13f0 g \.data 0+ dfoo_other +0+11e8 g \.text 0+ 0x04 baz_mixboth2 +0+1514 g \.data 0+ dbaz_other +0+1164 g \.text 0+ 0x04 barboth2 +0+1168 g \.text 0+ 0x04 barwithout +0+14d8 g \.data 0+ dbar_mix2 +0+1560 g \*ABS\* 0+ __bss_start +0+1410 g \.data 0+ dfoo_mixboth +0+14c4 g \.data 0+ dbar_other +0+1180 g \.text 0+ 0x04 bar_mix2 +0+14f4 g \.data 0+ dbazboth +0+1038 g \.text 0+ 0x04 foo_otherwithout +0+1190 g \.text 0+ 0x04 bar_mixwithout2 +0+13c8 g .* 0+ ___ctors_end +0+1064 g \.text 0+ 0x04 foo_mixwithout +0+116c g \.text 0+ 0x04 bar_other +0+13d0 g \.data 0+ dfooboth +0+1034 g \.text 0+ 0x04 foo_otherboth2 +0+1400 g \.data 0+ dfoo_mix +0+13c8 g .* 0+ ___ctors +0+14d4 g \.data 0+ dbar_mix +0+100c g \.text 0+ 0x04 fooboth +0+1170 g \.text 0+ 0x04 bar_otherboth +0+14c0 g \.data 0+ dbarwithout +0+1004 g \.text 0+ 0x04 foo +0+102c g \.text 0+ 0x04 foo_other +0+1560 g \*ABS\* 0+ _edata +0+1560 g \*ABS\* 0+ _end +0+1430 g \.data 0+ dfoo_mixwithout2 +0+1058 g \.text 0+ 0x04 foo_mixboth2 +0+11d4 g \.text 0+ 0x04 baz_mix2 +0+11c8 g \.text 0+ 0x04 baz_otherwithout +0+1000 g \.text 0+ 0x04 start +0+14bc g \.data 0+ dbarboth2 +0+118c g \.text 0+ 0x04 bar_mixwithout +0+115c g \.text 0+ 0x04 bar +0+80000 g \.stack 0+ _stack +0+1520 g \.data 0+ dbaz_otherwithout +0+11f4 g \.text 0+ 0x04 baz_mixwithout +0+1160 g \.text 0+ 0x04 barboth +0+14b8 g \.data 0+ dbarboth +0+1188 g \.text 0+ 0x04 bar_mixboth2 +0+13c8 g .* 0+ ___dtors_end +0+151c g \.data 0+ dbaz_otherboth2 +0+1500 g \.data 0+ dbazboth2 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl64.sd b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl64.sd new file mode 100644 index 0000000..abe257a --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl64.sd @@ -0,0 +1,87 @@ +.*: file format .*-sh64 + +Contents of section \.text: + 1000 6ff0fff0 6ff0fff0 cc4031e0 6ff0fff0 .* + 1010 cc407280 cc406680 6ff0fff0 cc409680 .* + 1020 cc40a280 6ff0fff0 cc40f5e0 6ff0fff0 .* + 1030 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 1040 cc4111e0 6ff0fff0 cc4135e0 6ff0fff0 .* + 1050 cc4271e0 cc4275e0 6ff0fff0 cc4265e0 .* + 1060 cc4261e0 6ff0fff0 cc423de0 6ff0fff0 .* + 1070 cc4215e0 6ff0fff0 cc4591e0 cc45c280 .* + 1080 cc45b680 cc45c680 cc45d280 cc4605e0 .* + 1090 cc4611e0 cc4625e0 cc4751e0 cc4755e0 .* + 10a0 cc4725e0 cc4721e0 cc46dde0 cc46a5e0 .* + 10b0 cc4671e0 cc46b280 cc46a680 cc46d680 .* + 10c0 cc46e280 cc4735e0 cc4751e0 cc4775e0 .* + 10d0 cc48b1e0 cc48b5e0 cc48a5e0 cc48a1e0 .* + 10e0 cc487de0 cc4855e0 cc532280 cc531280 .* + 10f0 cc532280 cc533280 cc5361e0 cc5371e0 .* + 1100 cc5381e0 cc54b1e0 cc54b1e0 cc5481e0 .* + 1110 cc5481e0 cc5439e0 cc5401e0 cc541280 .* + 1120 cc540280 cc543280 cc544280 cc5491e0 .* + 1130 cc54b1e0 cc54d1e0 cc5611e0 cc5611e0 .* + 1140 cc5601e0 cc5601e0 cc55d9e0 cc55b1e0 .* + 1150 cc40d180 cc519180 cc51b180 6ff0fff0 .* + 1160 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 1170 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 1180 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 1190 6ff0fff0 6ff0fff0 cc4671e0 6ff0fff0 .* + 11a0 cc46b280 cc46a680 6ff0fff0 cc46d680 .* + 11b0 cc46e280 6ff0fff0 cc4731e0 6ff0fff0 .* + 11c0 6ff0fff0 6ff0fff0 6ff0fff0 6ff0fff0 .* + 11d0 cc4751e0 6ff0fff0 cc4775e0 6ff0fff0 .* + 11e0 cc48b1e0 cc48b5e0 6ff0fff0 cc48a5e0 .* + 11f0 cc48a1e0 6ff0fff0 cc487de0 6ff0fff0 .* + 1200 cc4855e0 .* +Contents of section \.rodata: + 1204 00001030 00001058 00001049 0000104d .* + 1214 0000105c 00001039 00001041 00001074 .* + 1224 000011dc 000011f1 00001151 00001148 .* + 1234 00001065 00001170 00001198 00001189 .* + 1244 0000118d 0000119c 00001179 00001181 .* + 1254 000011b0 00001314 00001329 00001281 .* + 1264 00001278 0000118d 000011c0 000011e8 .* + 1274 000011d9 000011dd 000011ec 000011c9 .* + 1284 000011d1 00001204 0000136c 00001381 .* + 1294 000012e1 000012d8 000011f5 000013f4 .* + 12a4 0000141c 0000140c 00001410 00001420 .* + 12b4 000013fc 00001404 00001438 000015a0 .* + 12c4 000015b4 00001514 0000150c 00001428 .* + 12d4 00001058 00001084 0000108d 000011c0 .* + 12e4 000011e8 000011d9 000011dd 000011ec .* + 12f4 000011c9 000011d1 00001204 0000136c .* + 1304 00001381 000012e1 000012d8 000011f5 .* + 1314 00001518 00001540 00001530 00001534 .* + 1324 00001544 00001520 00001528 0000155c .* + 1334 000016c4 000016d8 00001638 00001630 .* + 1344 0000154c .* +Contents of section \.data: + 13c8 00000000 000013d0 00000000 000013e0 .* + 13d8 000013dc 00000000 000013e8 000013ec .* + 13e8 00000000 00001400 00000000 00000000 .* + 13f8 00000000 00000000 00000000 00001408 .* + 1408 00000000 00001410 00000000 00001460 .* + 1418 00001460 00000000 0000145c 0000145c .* + 1428 00000000 00001452 00000000 00001448 .* + 1438 000014bc 000014c8 000014f0 000014e0 .* + 1448 000014e4 000014f4 000014d0 000014d8 .* + 1458 00001508 0000166c 00001680 000015d8 .* + 1468 000015d0 000014e4 000014f4 00001518 .* + 1478 00001540 00001530 00001534 00001544 .* + 1488 00001520 00001528 0000155c 000016c4 .* + 1498 000016d8 00001638 00001630 0000154c .* + 14a8 00001414 00001458 00001484 00000000 .* + 14b8 00000000 00000000 00000000 00000000 .* + 14c8 00000000 00000000 00000000 00000000 .* + 14d8 00000000 00000000 00000000 00000000 .* + 14e8 00000000 00000000 000014f4 00000000 .* + 14f8 00001504 00001500 00000000 0000150c .* + 1508 00001510 00000000 00001524 00000000 .* + 1518 00000000 00000000 00000000 00000000 .* + 1528 0000152c 00000000 00001534 00000000 .* + 1538 00001584 00001584 00000000 00001580 .* + 1548 00001580 00000000 00001576 00000000 .* + 1558 0000156c .* +Contents of section \.stack: + 80000 deaddead .* diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl64.xd b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl64.xd new file mode 100644 index 0000000..142ca96 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/shdl64.xd @@ -0,0 +1,123 @@ +.*: file format .*-sh64 +.* +architecture: sh5, flags 0x0+112: +EXEC_P, HAS_SYMS, D_PAGED +start address 0x0+1001 + +Program Header: + LOAD off 0x0+100 vaddr 0x0+1000 paddr 0x0+1000 align 2\*\*7 + filesz 0x0+348 memsz 0x0+348 flags r-x + LOAD off 0x0+448 vaddr 0x0+13c8 paddr 0x0+13c8 align 2\*\*7 + filesz 0x0+194 memsz 0x0+194 flags rw- + LOAD off 0x0+600 vaddr 0x0+80000 paddr 0x0+80000 align 2\*\*7 + filesz 0x0+4 memsz 0x0+4 flags rw- + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+204 0+1000 0+1000 0+100 2\*\*0 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 \.rodata 0+144 0+1204 0+1204 0+304 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 2 \.data 0+194 0+13c8 0+13c8 0+448 2\*\*2 + CONTENTS, ALLOC, LOAD, DATA + 3 \.stack 0+4 0+80000 0+80000 0+600 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA +SYMBOL TABLE: +0+1000 l d \.text 0+ (|\.text) +0+1204 l d \.rodata 0+ (|\.rodata) +0+13c8 l d \.data 0+ (|\.data) +0+80000 l d \.stack 0+ (|\.stack) +0+1150 l \.text 0+ 0x04 part2 +0+13f8 g \.data 0+ dfoo_otherboth2 +0+1178 g \.text 0+ 0x04 bar_otherwithout +0+11b4 g \.text 0+ 0x04 bazwithout +0+1428 g \.data 0+ dfoo_mixwithout +0+1554 g \.data 0+ dbaz_mixwithout2 +0+11bc g \.text 0+ 0x04 baz_other +0+11cc g \.text 0+ 0x04 baz_mix +0+11c0 g \.text 0+ 0x04 baz_otherboth +0+13e8 g \.data 0+ dfoowithout +0+14b4 g \.data 0+ dbar +0+106c g \.text 0+ 0x04 foo_mixwithout2 +0+11a8 g \.text 0+ 0x04 bazboth2 +0+13fc g \.data 0+ dfoo_otherwithout +0+11c4 g \.text 0+ 0x04 baz_otherboth2 +0+1174 g \.text 0+ 0x04 bar_otherboth2 +0+1194 g \.text 0+ 0x04 baz +0+13c8 g \.data 0+ dfoo +0+14e8 g \.data 0+ dbar_mixwithout2 +0+13dc g \.data 0+ dfooboth2 +0+1408 g \.data 0+ dfoo_mix2 +0+154c g \.data 0+ dbaz_mixwithout +0+1044 g \.text 0+ 0x04 foo_mix2 +0+1018 g \.text 0+ 0x04 fooboth2 +0+14cc g \.data 0+ dbar_otherboth2 +0+117c g \.text 0+ 0x04 bar_mix +0+14d0 g \.data 0+ dbar_otherwithout +0+11dc g \.text 0+ 0x04 baz_mixboth +0+14c8 g \.data 0+ dbar_otherboth +0+150c g \.data 0+ dbazwithout +0+152c g \.data 0+ dbaz_mix2 +0+1184 g \.text 0+ 0x04 bar_mixboth +0+13f4 g \.data 0+ dfoo_otherboth +0+14dc g \.data 0+ dbar_mixboth +0+1024 g \.text 0+ 0x04 foowithout +0+14e4 g \.data 0+ dbar_mixwithout +0+11fc g \.text 0+ 0x04 baz_mixwithout2 +0+1030 g \.text 0+ 0x04 foo_otherboth +0+1540 g \.data 0+ dbaz_mixboth2 +0+104c g \.text 0+ 0x04 foo_mixboth +0+1534 g \.data 0+ dbaz_mixboth +0+103c g \.text 0+ 0x04 foo_mix +0+1518 g \.data 0+ dbaz_otherboth +0+14e0 g \.data 0+ dbar_mixboth2 +0+14ec g \.data 0+ dbaz +0+1524 g \.data 0+ dbaz_mix +0+13c8 g .* 0+ ___dtors +0+141c g \.data 0+ dfoo_mixboth2 +0+119c g \.text 0+ 0x04 bazboth +0+13f0 g \.data 0+ dfoo_other +0+11e8 g \.text 0+ 0x04 baz_mixboth2 +0+1514 g \.data 0+ dbaz_other +0+1164 g \.text 0+ 0x04 barboth2 +0+1168 g \.text 0+ 0x04 barwithout +0+14d8 g \.data 0+ dbar_mix2 +0+1560 g \*ABS\* 0+ __bss_start +0+1410 g \.data 0+ dfoo_mixboth +0+14c4 g \.data 0+ dbar_other +0+1180 g \.text 0+ 0x04 bar_mix2 +0+14f4 g \.data 0+ dbazboth +0+1038 g \.text 0+ 0x04 foo_otherwithout +0+1190 g \.text 0+ 0x04 bar_mixwithout2 +0+13c8 g .* 0+ ___ctors_end +0+1064 g \.text 0+ 0x04 foo_mixwithout +0+116c g \.text 0+ 0x04 bar_other +0+13d0 g \.data 0+ dfooboth +0+1034 g \.text 0+ 0x04 foo_otherboth2 +0+1400 g \.data 0+ dfoo_mix +0+13c8 g .* 0+ ___ctors +0+14d4 g \.data 0+ dbar_mix +0+100c g \.text 0+ 0x04 fooboth +0+1170 g \.text 0+ 0x04 bar_otherboth +0+14c0 g \.data 0+ dbarwithout +0+1004 g \.text 0+ 0x04 foo +0+102c g \.text 0+ 0x04 foo_other +0+1560 g \*ABS\* 0+ _edata +0+1560 g \*ABS\* 0+ _end +0+1430 g \.data 0+ dfoo_mixwithout2 +0+1058 g \.text 0+ 0x04 foo_mixboth2 +0+11d4 g \.text 0+ 0x04 baz_mix2 +0+11c8 g \.text 0+ 0x04 baz_otherwithout +0+1000 g \.text 0+ 0x04 start +0+14bc g \.data 0+ dbarboth2 +0+118c g \.text 0+ 0x04 bar_mixwithout +0+115c g \.text 0+ 0x04 bar +0+80000 g \.stack 0+ _stack +0+1520 g \.data 0+ dbaz_otherwithout +0+11f4 g \.text 0+ 0x04 baz_mixwithout +0+1160 g \.text 0+ 0x04 barboth +0+14b8 g \.data 0+ dbarboth +0+1188 g \.text 0+ 0x04 bar_mixboth2 +0+13c8 g .* 0+ ___dtors_end +0+151c g \.data 0+ dbaz_otherboth2 +0+1500 g \.data 0+ dbazboth2 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/shmix-1.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/shmix-1.s new file mode 100644 index 0000000..e078ac2 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/shmix-1.s @@ -0,0 +1,33 @@ +! Check mixed-mode objects; different sections holding different ISA:s. + .mode SHcompact + .text + .global start +start: + bt forw + mova start2,r0 +start2: + nop + nop +forw: + nop + .align 2 + .long $ + .long start2 + .long mediacode2 + + .data + .long $ + .long start2 + .long mediacode2 + + .section .text.media,"ax" + .mode SHmedia + .align 2 +mediacode: + ptb forw,tr4 + pt start2,tr5 +mediacode2: + movi start2,r54 + movi mediacode2,r45 + pta mediacode2,tr7 + nop diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/shmix-2.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/shmix-2.s new file mode 100644 index 0000000..2ea7344 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/shmix-2.s @@ -0,0 +1,28 @@ +! A SHmedia object, that we will link to a SHcompact object. +! We will be using .text for the SHmedia code and .text.compact for the +! SHcompact code, so we don't get two ISA in the same section. + .text + .mode SHmedia + + .global start + .global medialabel1 + .global medialabel2 + .global medialabel3 +start: + movi compactlabel1,r14 + movi compactlabel4,r14 +medialabel1: + pt compactlabel2,tr6 +medialabel2: + nop + + .section .rodata + .long compactlabel3 +medialabel3: + .long compactlabel5 + + .data + .global medialabel4 + .long 0 +medialabel4: + .long compactlabel2 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/shmix-3.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/shmix-3.s new file mode 100644 index 0000000..42d1212 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/shmix-3.s @@ -0,0 +1,32 @@ +! A SHcompact object, that we will link to a SHmedia object. +! We will be using .text for the SHmedia code and .text.compact for the +! SHcompact code, so we don't get two ISA in the same section. + .section .text.compact,"ax" + .mode SHcompact + .global compactlabel1 + .global compactlabel2 + .global compactlabel3 + .global compactlabel4 + .global compactlabel5 +locallabel: + nop +compactlabel1: + mova compactlabel2,r0 +compactlabel2: + mova compactlabel3,r0 + nop +compactlabel3: + nop + .align 2 + .long medialabel1 + .long medialabel4 + + .section .rodata + .long medialabel2 +compactlabel4: + .long medialabel3 + + .data + .long 0 +compactlabel5: + .long medialabel4 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/stobin-0-dso.d b/binutils-2.21/ld/testsuite/ld-sh/sh64/stobin-0-dso.d new file mode 100644 index 0000000..405c05a --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/stobin-0-dso.d @@ -0,0 +1,9 @@ +#source: stolib.s +#as: --abi=32 --isa=SHmedia +#ld: -shared -mshelf32 +#objdump: -drj.text +#target: sh64-*-elf + +.*: +file format elf32-sh64.* + +#pass diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/stobin-1.d b/binutils-2.21/ld/testsuite/ld-sh/sh64/stobin-1.d new file mode 100644 index 0000000..e0f8b27 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/stobin-1.d @@ -0,0 +1,15 @@ +#source: stobin.s +#as: --abi=32 --isa=SHmedia +#ld: -mshelf32 tmpdir/stobin-0-dso.so +#objdump: -drj.text +#target: sh64-*-elf + +.*: +file format elf32-sh64.* + +Disassembly of section \.text: + +0+[0-9a-f]+ <start>: + [0-9a-f]+: cffffd90 movi -1,r25 + [0-9a-f]+: cbfee590 shori 65465,r25 ! 0xffffffb9 .* + [0-9a-f]+: 6bf56600 ptrel/l r25,tr0 + [0-9a-f]+: 4401fff0 blink tr0,r63 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/stobin.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/stobin.s new file mode 100644 index 0000000..30d3597 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/stobin.s @@ -0,0 +1,5 @@ + .text + .globl start +start: + pt bar, tr0 + blink tr0, r63 diff --git a/binutils-2.21/ld/testsuite/ld-sh/sh64/stolib.s b/binutils-2.21/ld/testsuite/ld-sh/sh64/stolib.s new file mode 100644 index 0000000..587faa6 --- /dev/null +++ b/binutils-2.21/ld/testsuite/ld-sh/sh64/stolib.s @@ -0,0 +1,7 @@ + .text + .globl bar + .type bar,@function +bar: + ptabs r18, tr0 + blink tr0, r63 + .Lfe_bar: .size bar,.Lfe_bar-X |