Browse Source
bfd/ 2011-08-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/13048 * archures.c (bfd_mach_i386_intel_syntax): New. (bfd_mach_i386_i8086): Updated. (bfd_mach_i386_i386): Likewise. (bfd_mach_x86_64): Likewise. (bfd_mach_x64_32): Likewise. (bfd_mach_i386_i386_intel_syntax): Likewise. (bfd_mach_x86_64_intel_syntax): Likewise. (bfd_mach_x64_32_intel_syntax): Likewise. (bfd_mach_l1om): Likewise. (bfd_mach_l1om_intel_syntax): Likewise. (bfd_mach_k1om): Likewise. (bfd_mach_k1om_intel_syntax): Likewise. * bfd-in2.h: Regenerated. * cpu-i386.c (bfd_i386_compatible): Check mach instead of bits_per_address. (bfd_x64_32_arch_intel_syntax): Set bits_per_address to 64. (bfd_x64_32_arch): Likewise. * elf64-x86-64.c: Include "libiberty.h". (x86_64_elf_howto_table): Append x32 R_X86_64_32. (elf_x86_64_rtype_to_howto): Support x32 R_X86_64_32. (elf_x86_64_reloc_type_lookup): Likewise. (elf_x86_64_reloc_name_lookup): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_check_relocs): Allow R_X86_64_64 relocations for x32. gas/ 2011-08-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/13048 * config/tc-i386.c (handle_quad): Removed. (md_pseudo_table): Remove "quad". (tc_gen_reloc): Don't check BFD_RELOC_64 for disallow_64bit_reloc. (x86_dwarf2_addr_size): New. * config/tc-i386.h (x86_dwarf2_addr_size): New. (DWARF2_ADDR_SIZE): Likewise. gas/testsuite/ 2011-08-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/13048 * gas/i386/ilp32/ilp32.exp: Don't run inval. * gas/i386/ilp32/inval.l: Removed. * gas/i386/ilp32/inval.s: Likewise. * gas/i386/ilp32/quad.d: Expect R_X86_64_64 instead of R_X86_64_32. * gas/i386/ilp32/x86-64-pcrel.s: Add tests for movabs. * gas/i386/ilp32/x86-64-pcrel.d: Updated. ld/testsuite/ 2011-08-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/13048 * ld-x86-64/ilp32-6.d: New. * ld-x86-64/ilp32-6.s: Likewise. * ld-x86-64/ilp32-7.d: Likewise. * ld-x86-64/ilp32-7.s: Likewise. * ld-x86-64/ilp32-8.d: Likewise. * ld-x86-64/ilp32-8.s: Likewise. * ld-x86-64/ilp32-9.d: Likewise. * ld-x86-64/ilp32-9.s: Likewise. * ld-x86-64/x86-64.exp: Run ilp32-6, ilp32-7, ilp32-8 and ilp32-9. opcodes/ 2011-08-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/13048 * i386-dis.c (print_insn): Optimize info->mach check.binutils-2_22-branch
27 changed files with 225 additions and 168 deletions
@ -1,23 +0,0 @@ |
|||
.*: Assembler messages: |
|||
.*:3: Error: .* |
|||
.*:4: Error: .* |
|||
.*:5: Error: .* |
|||
.*:6: Error: .* |
|||
GAS LISTING .* |
|||
|
|||
|
|||
[ ]*1[ ]+\.text |
|||
[ ]*2[ ]+\# All the following should be illegal for x32 |
|||
[ ]*3[ ]+\?\?\?\? 48A10000 movabs xxx,%rax |
|||
[ ]*3[ ]+00000000 |
|||
[ ]*3[ ]+0000 |
|||
[ ]*4[ ]+\?\?\?\? 48A10000 movabs foo,%rax |
|||
[ ]*4[ ]+00000000 |
|||
[ ]*4[ ]+0000 |
|||
[ ]*5[ ]+\?\?\?\? 48A10000 movabsq xxx,%rax |
|||
[ ]*5[ ]+00000000 |
|||
[ ]*5[ ]+0000 |
|||
[ ]*6[ ]+\?\?\?\? 48A10000 movabsq foo,%rax |
|||
\*\*\*\* Error:cannot represent relocation type BFD_RELOC_[ ]*64[ ]+in x32 mode |
|||
[ ]*6[ ]+00000000 |
|||
[ ]*6[ ]+0000 |
|||
@ -1,6 +0,0 @@ |
|||
.text |
|||
# All the following should be illegal for x32 |
|||
movabs xxx,%rax |
|||
movabs foo,%rax |
|||
movabsq xxx,%rax |
|||
movabsq foo,%rax |
|||
@ -0,0 +1,3 @@ |
|||
#as: --x32 |
|||
#ld: -m elf32_x86_64 -Ttext-segment 0xe0000000 |
|||
#error: .*relocation truncated to fit: R_X86_64_32S.* |
|||
@ -0,0 +1,3 @@ |
|||
.globl _start |
|||
_start: |
|||
mov $_start,%rax |
|||
@ -0,0 +1,3 @@ |
|||
#as: --x32 |
|||
#ld: -m elf32_x86_64 -Ttext-segment 0xe0000000 |
|||
#error: .*relocation truncated to fit: R_X86_64_32S.* |
|||
@ -0,0 +1,3 @@ |
|||
.globl _start |
|||
_start: |
|||
mov _start,%rax |
|||
@ -0,0 +1,13 @@ |
|||
#as: --x32 |
|||
#ld: -m elf32_x86_64 -Ttext-segment 0xe0000000 |
|||
#objdump: -dw |
|||
|
|||
.*: +file format elf32-x86-64 |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
e0000054 <_start>: |
|||
[ ]*[a-f0-9]+: 48 b8 54 00 00 e0 00 00 00 00 movabs \$0xe0000054,%rax |
|||
[ ]*[a-f0-9]+: 48 a1 54 00 00 e0 00 00 00 00 movabs 0xe0000054,%rax |
|||
#pass |
|||
@ -0,0 +1,5 @@ |
|||
.text |
|||
.globl _start |
|||
_start: |
|||
movabs $_start,%rax |
|||
movabs _start,%rax |
|||
@ -0,0 +1,9 @@ |
|||
#as: --x32 |
|||
#ld: -m elf32_x86_64 -Ttext-segment 0xe0000000 |
|||
#objdump: -s -j .text |
|||
|
|||
.*: +file format .* |
|||
|
|||
Contents of section .text: |
|||
e0000054 540000e0 00000000 T....... |
|||
#pass |
|||
@ -0,0 +1,4 @@ |
|||
.text |
|||
.globl _start |
|||
_start: |
|||
.quad _start |
|||
Loading…
Reference in new issue