bfd_put_16 (output_bfd, new_insn,
contents + rel->r_offset - 2);
r_type = R_390_PC32DBL;
+ rel->r_info = ELF32_R_INFO (r_symndx, r_type);
rel->r_addend = 2;
howto = elf_howto_table + r_type;
relocation = h->root.u.def.value
bfd_put_16 (output_bfd, new_insn,
contents + rel->r_offset - 2);
r_type = R_390_PC32DBL;
+ rel->r_info = ELF64_R_INFO (r_symndx, r_type);
rel->r_addend = 2;
howto = elf_howto_table + r_type;
relocation = h->root.u.def.value
/* larl rX,<weak sym> -> lay rX,0(0) */
bfd_put_16 (output_bfd, 0xe300 | reg, insn_start);
bfd_put_32 (output_bfd, 0x71, insn_start + 2);
+ rel->r_info = ELF64_R_INFO (0, R_390_NONE);
+ rel->r_addend = 0;
continue;
}
/* Replace branch relative and save long (brasl) with a trap. */
/* brasl rX,<weak sym> -> jg .+2 (6-byte trap) */
bfd_put_16 (output_bfd, 0xc0f4, insn_start);
bfd_put_32 (output_bfd, 0x1, insn_start + 2);
+ rel->r_info = ELF64_R_INFO (0, R_390_NONE);
+ rel->r_addend = 0;
continue;
}
}
/* larl rX,<weak sym> -> lay rX,0(0) */
bfd_put_16 (output_bfd, 0xe300 | reg, insn_start);
bfd_put_32 (output_bfd, 0x71, insn_start + 2);
+ rel->r_info = ELF64_R_INFO (0, R_390_NONE);
+ rel->r_addend = 0;
continue;
}
/* Replace prefetch data relative long (pfdrl) with a NOP */
/* Emit a 6-byte NOP: jgnop . */
bfd_put_16 (output_bfd, 0xc004, insn_start);
bfd_put_32 (output_bfd, 0x0, insn_start + 2);
+ rel->r_info = ELF64_R_INFO (0, R_390_NONE);
+ rel->r_addend = 0;
continue;
}
/* Replace the following instructions with a trap:
/* Emit a 6-byte trap: jg .+2 */
bfd_put_16 (output_bfd, 0xc0f4, insn_start);
bfd_put_32 (output_bfd, 0x1, insn_start + 2);
+ rel->r_info = ELF64_R_INFO (0, R_390_NONE);
+ rel->r_addend = 0;
continue;
}
}
.* <foo>:
.*: c4 18 00 00 08 56 [ ]*lgrl %r1,11b4 <_GLOBAL_OFFSET_TABLE_\+0x14>
+[ ]*.*: R_390_GOTENT bar\+0x2
.*: e3 10 c0 14 00 04 [ ]*lg %r1,20\(%r12\)
+[ ]*.*: R_390_GOT20 bar
.*: c0 10 00 00 08 52 [ ]*larl %r1,11b8 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: 58 10 c0 14 [ ]*l %r1,20\(%r12\)
+[ ]*.*: R_390_GOT12 bar
.*: c0 10 00 00 08 4d [ ]*larl %r1,11b8 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: c4 18 00 00 08 46 [ ]*lgrl %r1,11b0 <_GLOBAL_OFFSET_TABLE_\+0x10>
+[ ]*.*: R_390_GOTENT _GLOBAL_OFFSET_TABLE_\+0x2
.*: c4 18 00 00 08 41 [ ]*lgrl %r1,11ac <_GLOBAL_OFFSET_TABLE_\+0xc>
+[ ]*.*: R_390_GOTENT misaligned_sym\+0x2
.* <foo>:
.*: c4 18 00 00 08 1e [ ]*lgrl %r1,4010b0 <_GLOBAL_OFFSET_TABLE_\+0x14>
+[ ]*.*: R_390_GOTENT bar\+0x2
.*: e3 10 c0 14 00 04 [ ]*lg %r1,20\(%r12\)
+[ ]*.*: R_390_GOT20 bar
.*: c0 10 00 00 08 1a [ ]*larl %r1,4010b4 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: 58 10 c0 14 [ ]*l %r1,20\(%r12\)
+[ ]*.*: R_390_GOT12 bar
.*: c0 10 00 00 08 15 [ ]*larl %r1,4010b4 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: c4 18 00 00 08 0e [ ]*lgrl %r1,4010ac <_GLOBAL_OFFSET_TABLE_\+0x10>
+[ ]*.*: R_390_GOTENT _GLOBAL_OFFSET_TABLE_\+0x2
.*: c4 18 00 00 08 09 [ ]*lgrl %r1,4010a8 <_GLOBAL_OFFSET_TABLE_\+0xc>
+[ ]*.*: R_390_GOTENT misaligned_sym\+0x2
.* <foo>:
.*: c0 10 00 00 08 2c [ ]*larl %r1,1001108 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: c0 10 00 00 08 29 [ ]*larl %r1,1001108 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: c4 1d 00 00 08 22 [ ]*lrl %r1,1001100 <_GLOBAL_OFFSET_TABLE_\+0x28>
+[ ]*.*: R_390_GOTENT bar\+0x2
.*: 58 10 c0 28 [ ]*l %r1,40\(%r12\)
+[ ]*.*: R_390_GOT12 bar
.*: e3 10 c0 28 00 58 [ ]*ly %r1,40\(%r12\)
+[ ]*.*: R_390_GOT20 bar
.*: c4 18 00 00 08 16 [ ]*lgrl %r1,10010f8 <_GLOBAL_OFFSET_TABLE_\+0x20>
+[ ]*.*: R_390_GOTENT _GLOBAL_OFFSET_TABLE_\+0x2
.*: c4 18 00 00 08 0f [ ]*lgrl %r1,10010f0 <_GLOBAL_OFFSET_TABLE_\+0x18>
+[ ]*.*: R_390_GOTENT misaligned_sym\+0x2
.* <foo>:
.*: c0 10 00 00 08 9c [ ]*larl %r1,12e8 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: c0 10 00 00 08 99 [ ]*larl %r1,12e8 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: c4 1d 00 00 08 92 [ ]*lrl %r1,12e0 <_GLOBAL_OFFSET_TABLE_\+0x28>
+[ ]*.*: R_390_GOTENT bar\+0x2
.*: 58 10 c0 28 [ ]*l %r1,40\(%r12\)
+[ ]*.*: R_390_GOT12 bar
.*: e3 10 c0 28 00 58 [ ]*ly %r1,40\(%r12\)
+[ ]*.*: R_390_GOT20 bar
.*: c4 18 00 00 08 86 [ ]*lgrl %r1,12d8 <_GLOBAL_OFFSET_TABLE_\+0x20>
+[ ]*.*: R_390_GOTENT _GLOBAL_OFFSET_TABLE_\+0x2
.*: c4 18 00 00 08 7f [ ]*lgrl %r1,12d0 <_GLOBAL_OFFSET_TABLE_\+0x18>
+[ ]*.*: R_390_GOTENT misaligned_sym\+0x2
.* <foo>:
.*: c0 10 00 00 0f 0c [ ]*larl %r1,2000 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: c0 10 00 00 0f 09 [ ]*larl %r1,2000 <bar>
+[ ]*.*: R_390_PC32DBL bar\+0x2
.*: c4 1d 00 00 0f 02 [ ]*lrl %r1,1ff8 <_GLOBAL_OFFSET_TABLE_\+0x28>
+[ ]*.*: R_390_GOTENT bar\+0x2
.*: 58 10 c0 28 [ ]*l %r1,40\(%r12\)
+[ ]*.*: R_390_GOT12 bar
.*: e3 10 c0 28 00 58 [ ]*ly %r1,40\(%r12\)
+[ ]*.*: R_390_GOT20 bar
.*: c4 18 00 00 0e f6 [ ]*lgrl %r1,1ff0 <_GLOBAL_OFFSET_TABLE_\+0x20>
+[ ]*.*: R_390_GOTENT _GLOBAL_OFFSET_TABLE_\+0x2
.*: c4 18 00 00 0e ef [ ]*lgrl %r1,1fe8 <_GLOBAL_OFFSET_TABLE_\+0x18>
+[ ]*.*: R_390_GOTENT misaligned_sym\+0x2
{objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}}
"tlsbin"}
{"GOT: symbol address load from got to larl"
- "-shared -melf_s390 --hash-style=sysv --version-script=gotreloc-1.ver" ""
+ "-shared -melf_s390 --hash-style=sysv --version-script=gotreloc-1.ver --emit-relocs" ""
"-m31" {gotreloc-1.s}
{{objdump -dzrj.text gotreloc_31-1.dd}}
"gotreloc_31-1"}
{"GOT: no-pie symbol address load from got to larl"
- "-shared -melf_s390 --no-pie --hash-style=sysv --version-script=gotreloc-1.ver" ""
+ "-shared -melf_s390 --no-pie --hash-style=sysv --version-script=gotreloc-1.ver --emit-relocs" ""
"-m31" {gotreloc-1.s}
{{objdump -dzrj.text gotreloc_31-no-pie-1.dd}}
"gotreloc_31-1"}
{objdump -sj.got tlsbin_64.sd} {objdump -sj.tdata tlsbin_64.td}}
"tlsbin_64"}
{"GOT: norelro symbol address load from got to larl"
- "-shared -melf64_s390 -z norelro --hash-style=sysv --version-script=gotreloc-1.ver" ""
+ "-shared -melf64_s390 -z norelro --hash-style=sysv --version-script=gotreloc-1.ver --emit-relocs" ""
"-m64" {gotreloc-1.s}
{{objdump -dzrj.text gotreloc_64-norelro-1.dd}}
"gotreloc_64-1"}
{"GOT: relro symbol address load from got to larl"
- "-shared -melf64_s390 -z relro --hash-style=sysv --version-script=gotreloc-1.ver" ""
+ "-shared -melf64_s390 -z relro --hash-style=sysv --version-script=gotreloc-1.ver --emit-relocs" ""
"-m64" {gotreloc-1.s}
{{objdump -dzrj.text gotreloc_64-relro-1.dd}}
"gotreloc_64-1"}
{"GOT: no-pie symbol address load from got to larl"
- "-shared -melf64_s390 --no-pie --hash-style=sysv --version-script=gotreloc-1.ver" ""
+ "-shared -melf64_s390 --no-pie --hash-style=sysv --version-script=gotreloc-1.ver --emit-relocs" ""
"-m64" {gotreloc-1.s}
{{objdump -dzrj.text gotreloc_64-no-pie-1.dd}}
"gotreloc_64-1"}
{{objdump "-dzrj.text --stop-address=16" pltoffset-1.dd}}
"pltoffset-1"}
{"WEAKUNDEF1: overflow test (PC32DBL)"
- "-m elf64_s390 -dT 8GB.ld --no-error-rwx-segments" "" "-m64" {weakundef-1.s}
+ "-m elf64_s390 -dT 8GB.ld --emit-relocs --no-error-rwx-segments" "" "-m64" {weakundef-1.s}
{{objdump "-dzrj.text" weakundef-1.dd}} "weakundef-1"}
{"WEAKUNDEF2: overflow test (PLT32DBL)"
- "-m elf64_s390 -dT 8GB.ld --no-error-rwx-segments -no-pie" "" "-m64" {weakundef-2.s}
+ "-m elf64_s390 -dT 8GB.ld --emit-relocs --no-error-rwx-segments -no-pie" "" "-m64" {weakundef-2.s}
{{objdump "-dzrj.text" weakundef-2.dd}} "weakundef-2"}
{"Helper shared library (PLT test)"
"-shared -m elf64_s390" "" "-m64" {pltlib.s}
.* <foo>:
.*: c0 10 00 00 00 1c [ ]*larl %r1,200000038 <d>
+[ ]*.*: R_390_PC32DBL \.data\+0x2
.*: c0 10 00 00 00 1d [ ]*larl %r1,200000040 <wd>
+[ ]*.*: R_390_PC32DBL wd\+0x2
.*: e3 10 00 00 00 71 [ ]*lay %r1,0
+[ ]*.*: R_390_NONE \*ABS\*
.*: c0 f4 00 00 00 01 [ ]*jg .*
+[ ]*.*: R_390_NONE \*ABS\*
.*: c0 f4 00 00 00 01 [ ]*jg .*
+[ ]*.*: R_390_NONE \*ABS\*
.*: c0 f4 00 00 00 01 [ ]*jg .*
+[ ]*.*: R_390_NONE \*ABS\*
.*: c0 f4 00 00 00 01 [ ]*jg .*
+[ ]*.*: R_390_NONE \*ABS\*
.*: c0 f4 00 00 00 01 [ ]*jg .*
+[ ]*.*: R_390_NONE \*ABS\*
.*: c0 04 00 00 00 00 [ ]*jgnop .*
+[ ]*.*: R_390_NONE \*ABS\*
.*: 07 07 [ ]*nopr %r7
0+200000000 <foo>:
.*: c0 10 00 00 00 12 [ ]*larl %r1,200000024 <d>
+[ ]*.*: R_390_PLT32DBL d\+0x2
.*: c0 10 00 00 00 10 [ ]*larl %r1,200000026 <wd>
+[ ]*.*: R_390_PLT32DBL wd\+0x2
.*: e3 10 00 00 00 71 [ ]*lay %r1,0
+[ ]*.*: R_390_NONE \*ABS\*
.*: c0 e5 00 00 00 09 [ ]*brasl %r14,200000024 <d>
+[ ]*.*: R_390_PLT32DBL d\+0x2
.*: c0 e5 00 00 00 07 [ ]*brasl %r14,200000026 <wd>
+[ ]*.*: R_390_PLT32DBL wd\+0x2
.*: c0 f4 00 00 00 01 [ ]*jg .*
+[ ]*.*: R_390_NONE \*ABS\*
0+200000024 <d>:
.*: 07 fe [ ]*br %r14