mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
Don't sign-checking 4-byte relocations for x32.
gas/ 2011-02-25 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (reloc): Don't sign-checking 4-byte relocations if 64bit relocations aren't allowed. gas/testsuite/ 2011-02-25 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/ilp32/ilp32.exp: Run reloc64. * gas/i386/ilp32/reloc64.s: Allow TLS relocations with 32bit register destinations. * gas/i386/ilp32/reloc64.d: Updated. * gas/i386/ilp32/reloc64.l: New.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2011-02-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* config/tc-i386.c (reloc): Don't sign-checking 4-byte
|
||||||
|
relocations if 64bit relocations aren't allowed.
|
||||||
|
|
||||||
2011-02-25 Alan Modra <amodra@gmail.com>
|
2011-02-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR gas/12519
|
PR gas/12519
|
||||||
|
@ -2591,7 +2591,7 @@ reloc (unsigned int size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Sign-checking 4-byte relocations in 16-/32-bit code is pointless. */
|
/* Sign-checking 4-byte relocations in 16-/32-bit code is pointless. */
|
||||||
if (size == 4 && flag_code != CODE_64BIT)
|
if (size == 4 && (flag_code != CODE_64BIT || disallow_64bit_reloc))
|
||||||
sign = -1;
|
sign = -1;
|
||||||
|
|
||||||
rel = bfd_reloc_type_lookup (stdoutput, other);
|
rel = bfd_reloc_type_lookup (stdoutput, other);
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
2011-02-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* gas/i386/ilp32/ilp32.exp: Run reloc64.
|
||||||
|
|
||||||
|
* gas/i386/ilp32/reloc64.s: Allow TLS relocations with 32bit
|
||||||
|
register destinations.
|
||||||
|
* gas/i386/ilp32/reloc64.d: Updated.
|
||||||
|
|
||||||
|
* gas/i386/ilp32/reloc64.l: New.
|
||||||
|
|
||||||
2011-02-25 H.J. Lu <hongjiu.lu@intel.com>
|
2011-02-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR gas/12519
|
PR gas/12519
|
||||||
|
@ -22,6 +22,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check] &&
|
|||||||
}
|
}
|
||||||
|
|
||||||
run_list_test "inval" "-al"
|
run_list_test "inval" "-al"
|
||||||
|
run_list_test "reloc64" "--defsym _bad_=1"
|
||||||
|
|
||||||
set ASFLAGS "$old_ASFLAGS"
|
set ASFLAGS "$old_ASFLAGS"
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,10 @@ Disassembly of section \.text:
|
|||||||
.*[ ]+R_X86_64_PC8[ ]+xtrn\+0xf+f
|
.*[ ]+R_X86_64_PC8[ ]+xtrn\+0xf+f
|
||||||
.*[ ]+R_X86_64_GOT32[ ]+xtrn
|
.*[ ]+R_X86_64_GOT32[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_GOT32[ ]+xtrn
|
.*[ ]+R_X86_64_GOT32[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_GOT32[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_GOT32[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn
|
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn
|
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn\+0xf+c
|
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn\+0xf+c
|
||||||
@ -29,18 +33,30 @@ Disassembly of section \.text:
|
|||||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]+R_X86_64_TLSLD[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_TLSLD[ ]+xtrn
|
.*[ ]+R_X86_64_TLSLD[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_TLSLD[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_TLSLD[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_TLSLD[ ]+xtrn\+0xf+c
|
.*[ ]+R_X86_64_TLSLD[ ]+xtrn\+0xf+c
|
||||||
.*[ ]+R_X86_64_DTPOFF32[ ]+xtrn
|
.*[ ]+R_X86_64_DTPOFF32[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_DTPOFF32[ ]+xtrn
|
.*[ ]+R_X86_64_DTPOFF32[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_DTPOFF32[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_DTPOFF32[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
|
||||||
|
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
|
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
|
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
|
||||||
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
|
.*[ ]+R_X86_64_TPOFF32[ ]+xtrn
|
||||||
|
53
gas/testsuite/gas/i386/ilp32/reloc64.l
Normal file
53
gas/testsuite/gas/i386/ilp32/reloc64.l
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
.*: Assembler messages:
|
||||||
|
.*:33: Error: .*
|
||||||
|
.*:34: Error: .*
|
||||||
|
.*:37: Error: .*
|
||||||
|
.*:39: Error: .*
|
||||||
|
.*:40: Error: .*
|
||||||
|
.*:41: Error: .*
|
||||||
|
.*:42: Error: .*
|
||||||
|
.*:43: Error: .*
|
||||||
|
.*:44: Error: .*
|
||||||
|
.*:45: Error: .*
|
||||||
|
.*:47: Error: .*
|
||||||
|
.*:50: Error: .*
|
||||||
|
.*:51: Error: .*
|
||||||
|
.*:69: Error: .*
|
||||||
|
.*:72: Error: .*
|
||||||
|
.*:73: Error: .*
|
||||||
|
.*:77: Error: .*
|
||||||
|
.*:79: Error: .*
|
||||||
|
.*:82: Error: .*
|
||||||
|
.*:83: Error: .*
|
||||||
|
.*:88: Error: .*
|
||||||
|
.*:91: Error: .*
|
||||||
|
.*:92: Error: .*
|
||||||
|
.*:97: Error: .*
|
||||||
|
.*:100: Error: .*
|
||||||
|
.*:101: Error: .*
|
||||||
|
.*:108: Error: .*
|
||||||
|
.*:109: Error: .*
|
||||||
|
.*:112: Error: .*
|
||||||
|
.*:116: Error: .*
|
||||||
|
.*:117: Error: .*
|
||||||
|
.*:120: Error: .*
|
||||||
|
.*:126: Error: .*
|
||||||
|
.*:140: Error: .*
|
||||||
|
.*:153: Error: .*
|
||||||
|
.*:154: Error: .*
|
||||||
|
.*:155: Error: .*
|
||||||
|
.*:158: Error: .*
|
||||||
|
.*:159: Error: .*
|
||||||
|
.*:160: Error: .*
|
||||||
|
.*:161: Error: .*
|
||||||
|
.*:162: Error: .*
|
||||||
|
.*:163: Error: .*
|
||||||
|
.*:167: Error: .*
|
||||||
|
.*:168: Error: .*
|
||||||
|
.*:169: Error: .*
|
||||||
|
.*:172: Error: .*
|
||||||
|
.*:173: Error: .*
|
||||||
|
.*:174: Error: .*
|
||||||
|
.*:175: Error: .*
|
||||||
|
.*:176: Error: .*
|
||||||
|
.*:177: Error: .*
|
@ -29,11 +29,11 @@ ill mov $(xtrn - .), %eax
|
|||||||
jrcxz xtrn
|
jrcxz xtrn
|
||||||
|
|
||||||
add $xtrn@got, %rax
|
add $xtrn@got, %rax
|
||||||
bad mov $xtrn@got, %eax
|
mov $xtrn@got, %eax
|
||||||
bad mov $xtrn@got, %ax
|
bad mov $xtrn@got, %ax
|
||||||
bad mov $xtrn@got, %al
|
bad mov $xtrn@got, %al
|
||||||
mov xtrn@got(%rbx), %eax
|
mov xtrn@got(%rbx), %eax
|
||||||
bad mov xtrn@got(%ebx), %eax
|
mov xtrn@got(%ebx), %eax
|
||||||
bad call xtrn@got
|
bad call xtrn@got
|
||||||
|
|
||||||
bad add $xtrn@gotoff, %rax
|
bad add $xtrn@gotoff, %rax
|
||||||
@ -46,11 +46,11 @@ bad call xtrn@gotoff
|
|||||||
|
|
||||||
bad movabs $xtrn@gotpcrel, %rax
|
bad movabs $xtrn@gotpcrel, %rax
|
||||||
add $xtrn@gotpcrel, %rax
|
add $xtrn@gotpcrel, %rax
|
||||||
bad mov $xtrn@gotpcrel, %eax
|
mov $xtrn@gotpcrel, %eax
|
||||||
bad mov $xtrn@gotpcrel, %ax
|
bad mov $xtrn@gotpcrel, %ax
|
||||||
bad mov $xtrn@gotpcrel, %al
|
bad mov $xtrn@gotpcrel, %al
|
||||||
mov xtrn@gotpcrel(%rbx), %eax
|
mov xtrn@gotpcrel(%rbx), %eax
|
||||||
bad mov xtrn@gotpcrel(%ebx), %eax
|
mov xtrn@gotpcrel(%ebx), %eax
|
||||||
call xtrn@gotpcrel
|
call xtrn@gotpcrel
|
||||||
|
|
||||||
ill movabs $_GLOBAL_OFFSET_TABLE_, %rax
|
ill movabs $_GLOBAL_OFFSET_TABLE_, %rax
|
||||||
@ -68,55 +68,55 @@ ill add $(_GLOBAL_OFFSET_TABLE_ - .), %al
|
|||||||
|
|
||||||
bad movabs $xtrn@plt, %rax
|
bad movabs $xtrn@plt, %rax
|
||||||
add $xtrn@plt, %rax
|
add $xtrn@plt, %rax
|
||||||
bad mov $xtrn@plt, %eax
|
mov $xtrn@plt, %eax
|
||||||
bad mov $xtrn@plt, %ax
|
bad mov $xtrn@plt, %ax
|
||||||
bad mov $xtrn@plt, %al
|
bad mov $xtrn@plt, %al
|
||||||
mov xtrn@plt(%rbx), %eax
|
mov xtrn@plt(%rbx), %eax
|
||||||
bad mov xtrn@plt(%ebx), %eax
|
mov xtrn@plt(%ebx), %eax
|
||||||
call xtrn@plt
|
call xtrn@plt
|
||||||
bad jrcxz xtrn@plt
|
bad jrcxz xtrn@plt
|
||||||
|
|
||||||
bad movabs $xtrn@tlsgd, %rax
|
bad movabs $xtrn@tlsgd, %rax
|
||||||
add $xtrn@tlsgd, %rax
|
add $xtrn@tlsgd, %rax
|
||||||
bad mov $xtrn@tlsgd, %eax
|
mov $xtrn@tlsgd, %eax
|
||||||
bad mov $xtrn@tlsgd, %ax
|
bad mov $xtrn@tlsgd, %ax
|
||||||
bad mov $xtrn@tlsgd, %al
|
bad mov $xtrn@tlsgd, %al
|
||||||
mov xtrn@tlsgd(%rbx), %eax
|
mov xtrn@tlsgd(%rbx), %eax
|
||||||
bad mov xtrn@tlsgd(%ebx), %eax
|
mov xtrn@tlsgd(%ebx), %eax
|
||||||
call xtrn@tlsgd
|
call xtrn@tlsgd
|
||||||
|
|
||||||
bad movabs $xtrn@gottpoff, %rax
|
bad movabs $xtrn@gottpoff, %rax
|
||||||
add $xtrn@gottpoff, %rax
|
add $xtrn@gottpoff, %rax
|
||||||
bad mov $xtrn@gottpoff, %eax
|
mov $xtrn@gottpoff, %eax
|
||||||
bad mov $xtrn@gottpoff, %ax
|
bad mov $xtrn@gottpoff, %ax
|
||||||
bad mov $xtrn@gottpoff, %al
|
bad mov $xtrn@gottpoff, %al
|
||||||
mov xtrn@gottpoff(%rbx), %eax
|
mov xtrn@gottpoff(%rbx), %eax
|
||||||
bad mov xtrn@gottpoff(%ebx), %eax
|
mov xtrn@gottpoff(%ebx), %eax
|
||||||
call xtrn@gottpoff
|
call xtrn@gottpoff
|
||||||
|
|
||||||
bad movabs $xtrn@tlsld, %rax
|
bad movabs $xtrn@tlsld, %rax
|
||||||
add $xtrn@tlsld, %rax
|
add $xtrn@tlsld, %rax
|
||||||
bad mov $xtrn@tlsld, %eax
|
mov $xtrn@tlsld, %eax
|
||||||
bad mov $xtrn@tlsld, %ax
|
bad mov $xtrn@tlsld, %ax
|
||||||
bad mov $xtrn@tlsld, %al
|
bad mov $xtrn@tlsld, %al
|
||||||
mov xtrn@tlsld(%rbx), %eax
|
mov xtrn@tlsld(%rbx), %eax
|
||||||
bad mov xtrn@tlsld(%ebx), %eax
|
mov xtrn@tlsld(%ebx), %eax
|
||||||
call xtrn@tlsld
|
call xtrn@tlsld
|
||||||
|
|
||||||
add $xtrn@dtpoff, %rax
|
add $xtrn@dtpoff, %rax
|
||||||
bad mov $xtrn@dtpoff, %eax
|
mov $xtrn@dtpoff, %eax
|
||||||
bad mov $xtrn@dtpoff, %ax
|
bad mov $xtrn@dtpoff, %ax
|
||||||
bad mov $xtrn@dtpoff, %al
|
bad mov $xtrn@dtpoff, %al
|
||||||
mov xtrn@dtpoff(%rbx), %eax
|
mov xtrn@dtpoff(%rbx), %eax
|
||||||
bad mov xtrn@dtpoff(%ebx), %eax
|
mov xtrn@dtpoff(%ebx), %eax
|
||||||
bad call xtrn@dtpoff
|
bad call xtrn@dtpoff
|
||||||
|
|
||||||
add $xtrn@tpoff, %rax
|
add $xtrn@tpoff, %rax
|
||||||
bad mov $xtrn@tpoff, %eax
|
mov $xtrn@tpoff, %eax
|
||||||
bad mov $xtrn@tpoff, %ax
|
bad mov $xtrn@tpoff, %ax
|
||||||
bad mov $xtrn@tpoff, %al
|
bad mov $xtrn@tpoff, %al
|
||||||
mov xtrn@tpoff(%rbx), %eax
|
mov xtrn@tpoff(%rbx), %eax
|
||||||
bad mov xtrn@tpoff(%ebx), %eax
|
mov xtrn@tpoff(%ebx), %eax
|
||||||
bad call xtrn@tpoff
|
bad call xtrn@tpoff
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
Reference in New Issue
Block a user