bfd/
2005-07-18 Jan Beulich <jbeulich@novell.com> * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler for R_386_PC16. * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF. ld/testsuite/ 2005-07-18 Jan Beulich <jbeulich@novell.com> * ld-i386/abs.s, ld-i386/zero.s, ld-i386/abs.d, ld-x86-64/abs.d, ld-i386/pcrel16.s, ld-i386/pcrel16.d, ld-x86-64/pcrel16.d, ld-i386/pcrel8.s, ld-i386/pcrel8.d, ld-x86-64/pcrel8.d: New. * ld-i386/i386.exp, ld-x86-64/x86-64.exp: Run new tests.
This commit is contained in:
parent
2dd88dcacf
commit
ac2aa337d3
16 changed files with 92 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-07-18 Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
* elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
|
||||
for R_386_PC16.
|
||||
* elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
|
||||
handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
|
||||
|
||||
2005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
PR ld/1021
|
||||
|
|
|
@ -95,7 +95,7 @@ static reloc_howto_type elf_howto_table[]=
|
|||
HOWTO(R_386_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc, "R_386_16",
|
||||
TRUE, 0xffff, 0xffff, FALSE),
|
||||
HOWTO(R_386_PC16, 0, 1, 16, TRUE, 0, complain_overflow_bitfield,
|
||||
HOWTO(R_386_PC16, 0, 1, 16, TRUE, 0, complain_overflow_signed,
|
||||
bfd_elf_generic_reloc, "R_386_PC16",
|
||||
TRUE, 0xffff, 0xffff, TRUE),
|
||||
HOWTO(R_386_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
|
||||
|
|
|
@ -73,9 +73,9 @@ static reloc_howto_type x86_64_elf_howto_table[] =
|
|||
FALSE),
|
||||
HOWTO(R_X86_64_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc, "R_X86_64_16", FALSE, 0xffff, 0xffff, FALSE),
|
||||
HOWTO(R_X86_64_PC16,0, 1, 16, TRUE, 0, complain_overflow_bitfield,
|
||||
HOWTO(R_X86_64_PC16,0, 1, 16, TRUE, 0, complain_overflow_signed,
|
||||
bfd_elf_generic_reloc, "R_X86_64_PC16", FALSE, 0xffff, 0xffff, TRUE),
|
||||
HOWTO(R_X86_64_8, 0, 0, 8, FALSE, 0, complain_overflow_signed,
|
||||
HOWTO(R_X86_64_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
|
||||
bfd_elf_generic_reloc, "R_X86_64_8", FALSE, 0xff, 0xff, FALSE),
|
||||
HOWTO(R_X86_64_PC8, 0, 0, 8, TRUE, 0, complain_overflow_signed,
|
||||
bfd_elf_generic_reloc, "R_X86_64_PC8", FALSE, 0xff, 0xff, TRUE),
|
||||
|
@ -94,7 +94,7 @@ static reloc_howto_type x86_64_elf_howto_table[] =
|
|||
HOWTO(R_X86_64_TLSLD, 0, 2, 32, TRUE, 0, complain_overflow_signed,
|
||||
bfd_elf_generic_reloc, "R_X86_64_TLSLD", FALSE, 0xffffffff,
|
||||
0xffffffff, TRUE),
|
||||
HOWTO(R_X86_64_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
|
||||
HOWTO(R_X86_64_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_signed,
|
||||
bfd_elf_generic_reloc, "R_X86_64_DTPOFF32", FALSE, 0xffffffff,
|
||||
0xffffffff, FALSE),
|
||||
HOWTO(R_X86_64_GOTTPOFF, 0, 2, 32, TRUE, 0, complain_overflow_signed,
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2005-07-18 Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
* ld-i386/abs.s, ld-i386/zero.s, ld-i386/abs.d, ld-x86-64/abs.d,
|
||||
ld-i386/pcrel16.s, ld-i386/pcrel16.d, ld-x86-64/pcrel16.d,
|
||||
ld-i386/pcrel8.s, ld-i386/pcrel8.d, ld-x86-64/pcrel8.d: New.
|
||||
* ld-i386/i386.exp, ld-x86-64/x86-64.exp: Run new tests.
|
||||
|
||||
2005-07-14 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* lib/ld-lib.exp (run_ld_link_exec_tests): Ignore assembler
|
||||
|
|
10
ld/testsuite/ld-i386/abs.d
Normal file
10
ld/testsuite/ld-i386/abs.d
Normal file
|
@ -0,0 +1,10 @@
|
|||
#name: Absolute non-overflowing relocs
|
||||
#source: abs.s
|
||||
#source: zero.s
|
||||
#ld:
|
||||
#objdump: -rs
|
||||
|
||||
.*: file format .*
|
||||
|
||||
Contents of section \.text:
|
||||
[ ][0-9a-f]+ c800fff0 c8000110 c9c3.*
|
8
ld/testsuite/ld-i386/abs.s
Normal file
8
ld/testsuite/ld-i386/abs.s
Normal file
|
@ -0,0 +1,8 @@
|
|||
.text
|
||||
.global _start
|
||||
_start:
|
||||
enter $zero + 0xff00, $zero + 0xf0
|
||||
enter $zero - 0xff00, $zero - 0xf0
|
||||
leave
|
||||
ret
|
||||
.p2align 4,0x90
|
|
@ -64,3 +64,7 @@ set i386tests {
|
|||
}
|
||||
|
||||
run_ld_link_tests $i386tests
|
||||
|
||||
run_dump_test "abs"
|
||||
run_dump_test "pcrel8"
|
||||
run_dump_test "pcrel16"
|
||||
|
|
3
ld/testsuite/ld-i386/pcrel16.d
Normal file
3
ld/testsuite/ld-i386/pcrel16.d
Normal file
|
@ -0,0 +1,3 @@
|
|||
#name: PCREL16 overflow
|
||||
#ld:
|
||||
#error: .*relocation truncated to fit: R_386_PC16 .*
|
11
ld/testsuite/ld-i386/pcrel16.s
Normal file
11
ld/testsuite/ld-i386/pcrel16.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.text
|
||||
.code16
|
||||
.global _start, fwd
|
||||
_start:
|
||||
jpo fwd
|
||||
.rept 2500
|
||||
testl $0x12345678, %ss:0x76543210(,%eax,4)
|
||||
.endr
|
||||
fwd:
|
||||
leave
|
||||
ret
|
3
ld/testsuite/ld-i386/pcrel8.d
Normal file
3
ld/testsuite/ld-i386/pcrel8.d
Normal file
|
@ -0,0 +1,3 @@
|
|||
#name: PCREL8 overflow
|
||||
#ld:
|
||||
#error: .*relocation truncated to fit: R_386_PC8 .*
|
11
ld/testsuite/ld-i386/pcrel8.s
Normal file
11
ld/testsuite/ld-i386/pcrel8.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.text
|
||||
.code16
|
||||
.global _start, fwd
|
||||
_start:
|
||||
jcxz fwd
|
||||
.rept 10
|
||||
testl $0x12345678, %ss:0x76543210(,%eax,4)
|
||||
.endr
|
||||
fwd:
|
||||
leave
|
||||
ret
|
2
ld/testsuite/ld-i386/zero.s
Normal file
2
ld/testsuite/ld-i386/zero.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.global zero
|
||||
.equiv zero, 0
|
10
ld/testsuite/ld-x86-64/abs.d
Normal file
10
ld/testsuite/ld-x86-64/abs.d
Normal file
|
@ -0,0 +1,10 @@
|
|||
#name: Absolute non-overflowing relocs
|
||||
#source: ../ld-i386/abs.s
|
||||
#source: ../ld-i386/zero.s
|
||||
#ld:
|
||||
#objdump: -rs
|
||||
|
||||
.*: file format .*
|
||||
|
||||
Contents of section \.text:
|
||||
[ ][0-9a-f]+ c800fff0 c8000110 c9c3.*
|
4
ld/testsuite/ld-x86-64/pcrel16.d
Normal file
4
ld/testsuite/ld-x86-64/pcrel16.d
Normal file
|
@ -0,0 +1,4 @@
|
|||
#name: PCREL16 overflow
|
||||
#source: ../ld-i386/pcrel16.s
|
||||
#ld:
|
||||
#error: .*relocation truncated to fit: R_X86_64_PC16 .*
|
4
ld/testsuite/ld-x86-64/pcrel8.d
Normal file
4
ld/testsuite/ld-x86-64/pcrel8.d
Normal file
|
@ -0,0 +1,4 @@
|
|||
#name: PCREL8 overflow
|
||||
#source: ../ld-i386/pcrel8.s
|
||||
#ld:
|
||||
#error: .*relocation truncated to fit: R_X86_64_PC8 .*
|
|
@ -52,3 +52,7 @@ set x86_64tests {
|
|||
}
|
||||
|
||||
run_ld_link_tests $x86_64tests
|
||||
|
||||
run_dump_test "abs"
|
||||
run_dump_test "pcrel8"
|
||||
run_dump_test "pcrel16"
|
||||
|
|
Loading…
Reference in a new issue