binutils-gdb/gas/config
H.J. Lu 351f65ca26 Add x86-64 ILP32 support.
bfd/

2010-12-30  H.J. Lu  <hongjiu.lu@intel.com>

	* archures.c (bfd_mach_x64_32): New.
	(bfd_mach_x64_32_intel_syntax): Likewise.
	* bfd-in2.h: Regenerated.

	* config.bfd (targ64_selvecs): Add bfd_elf32_x86_64_vec for
	i[3-7]86-*-linux-*.
	(targ_selvecs): Add bfd_elf32_x86_64_vec for x86_64-*-linux-*.

	* configure.in: Support bfd_elf32_x86_64_vec.
	* configure: Regenerated.

	* cpu-i386.c (bfd_x64_32_arch_intel_syntax): New.
	(bfd_x64_32_arch): Likewise.

	* elf-bfd.h (elf_append_rela): New prototype.
	(elf_append_rel): Likewise.
	(elf64_r_info): Likewise.
	(elf32_r_info): Likewise.
	(elf64_r_sym): Likewise.
	(elf32_r_sym): Likewise.

	* elf64-x86-64.c (ABI_64_P): New.
	(elf_x86_64_info_to_howto): Replace ELF64_R_TYPE with
	ELF32_R_TYPE.  Replace ELF64_ST_TYPE with ELF_ST_TYPE.
	(elf_x86_64_check_tls_transition):Likewise.
	(elf_x86_64_check_relocs): Likewise.
	(elf_x86_64_gc_mark_hook):Likewise.
	(elf_x86_64_gc_sweep_hook): Likewise.
	(elf_x86_64_relocate_section): Likewise.
	(elf_x86_64_reloc_type_class): Likewise.
	(ELF_DYNAMIC_INTERPRETER): Renamed to ...
	(ELF64_DYNAMIC_INTERPRETER): This.
	(ELF32_DYNAMIC_INTERPRETER): New.
	(elf_x86_64_link_hash_table): Add r_info, r_sym, swap_reloca_out,
	dynamic_interpreter and dynamic_interpreter_size.
	(elf_x86_64_get_local_sym_hash): Replace ELF64_R_SYM with
	htab->r_sym.  Replace ELF64_R_INFO with htab->r_info.
	(elf_x86_64_get_local_sym_hash): Likewise.
	(elf_x86_64_check_tls_transition):Likewise.
	(elf_x86_64_check_relocs): Likewise.
	(elf_x86_64_gc_mark_hook):Likewise.
	(elf_x86_64_gc_sweep_hook): Likewise.
	(elf_x86_64_relocate_section): Likewise.
	(elf_x86_64_finish_dynamic_symbol): Likewise.
	(elf_x86_64_finish_local_dynamic_symbol): Likewise.
	(elf_x86_64_link_hash_table_create): Initialize r_info, r_sym,
	swap_reloca_out, dynamic_interpreter and dynamic_interpreter_size.
	(elf_x86_64_check_relocs): Check ABI_64_P when requesting for
	PIC.
	(elf_x86_64_relocate_section): Likewise.
	(elf64_x86_64_adjust_dynamic_symbol): Replace sizeof
	(Elf64_External_Rela) with bed->s->sizeof_rela.
	(elf64_x86_64_allocate_dynrelocs): Likewise.
	(elf64_x86_64_size_dynamic_sections): Likewise.
	(elf64_x86_64_finish_dynamic_symbol): Likewise.
	(elf64_x86_64_append_rela): Removed.
	(elf32_x86_64_elf_object_p): New.
	Add bfd_elf32_x86_64_vec.

	* elf64-x86-64.c (elf64_x86_64_xxx): Renamed to ...
	(elf_x86_64_xxx): This.

	* elflink.c (bfd_elf_final_link): Check ELF file class on error.
	(elf_append_rela): New.
	(elf_append_rel): Likewise.
	(elf64_r_info): Likewise.
	(elf32_r_info): Likewise.
	(elf64_r_sym): Likewise.
	(elf32_r_sym): Likewise.

	* targets.c (bfd_elf32_x86_64_vec): New.
	(_bfd_target_vector): Add bfd_elf32_x86_64_vec.

gas/

2010-12-30  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-i386.c (x86_elf_abi): New.
	(i386_mach): Return bfd_mach_x64_32 for ILP32.
	(OPTION_N32): Likewise.
	(md_longopts): Add "n32" for ELF.
	(md_parse_option): Handle OPTION_N32.
	(md_show_usage): Add --n32.
	(i386_target_format): Update and check x86_elf_abi.

	* config/tc-i386.h (ELF_TARGET_FORMAT32): New.

	* doc/as.texinfo: Document --n32.
	* doc/c-i386.texi: Likewise.

gas/testsuite/

2010-12-30  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/i386/ilp32/lns/ilp32.exp: New.
	* gas/i386/ilp32/lns/lns-common-1.d: Likewise.
	* gas/i386/ilp32/lns/lns-duplicate.d: Likewise.

	* gas/i386/ilp32/cfi/cfi-common-1.d: New.
	* gas/i386/ilp32/cfi/cfi-common-2.d: Likewise.
	* gas/i386/ilp32/cfi/cfi-common-3.d: Likewise.
	* gas/i386/ilp32/cfi/cfi-common-4.d: Likewise.
	* gas/i386/ilp32/cfi/cfi-common-5.d: Likewise.
	* gas/i386/ilp32/cfi/cfi-common-6.d: Likewise.
	* gas/i386/ilp32/cfi/cfi-common-7.d: Likewise.
	* gas/i386/ilp32/cfi/cfi-x86_64.d: Likewise.
	* gas/i386/ilp32/cfi/ilp32.exp: Likewise.
	* gas/i386/ilp32/elf/ehopt0.d: Likewise.
	* gas/i386/ilp32/elf/equ-reloc.d: Likewise.
	* gas/i386/ilp32/elf/file.d: Likewise.
	* gas/i386/ilp32/elf/group0a.d: Likewise.
	* gas/i386/ilp32/elf/group0b.d: Likewise.
	* gas/i386/ilp32/elf/group1a.d: Likewise.
	* gas/i386/ilp32/elf/group1b.d: Likewise.
	* gas/i386/ilp32/elf/ifunc-1.d: Likewise.
	* gas/i386/ilp32/elf/ilp32.exp: Likewise.
	* gas/i386/ilp32/elf/redef.d: Likewise.
	* gas/i386/ilp32/elf/section0.d: Likewise.
	* gas/i386/ilp32/elf/section1.d: Likewise.
	* gas/i386/ilp32/elf/section3.d: Likewise.
	* gas/i386/ilp32/elf/section4.d: Likewise.
	* gas/i386/ilp32/elf/section6.d: Likewise.
	* gas/i386/ilp32/elf/section7.d: Likewise.
	* gas/i386/ilp32/elf/struct.d: Likewise.
	* gas/i386/ilp32/elf/symtab.d: Likewise.
	* gas/i386/ilp32/elf/symver.d: Likewise.

	* gas/i386/ilp32/ilp32.exp: New.
	* gas/i386/ilp32/immed64.d: Likewise.
	* gas/i386/ilp32/mixed-mode-reloc64.d: Likewise.
	* gas/i386/ilp32/reloc64.d: Likewise.
	* gas/i386/ilp32/rex.d: Likewise.
	* gas/i386/ilp32/rexw.d: Likewise.
	* gas/i386/ilp32/svme64.d: Likewise.
	* gas/i386/ilp32/x86-64-addr32.d: Likewise.
	* gas/i386/ilp32/x86-64-addr32-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-aes.d: Likewise.
	* gas/i386/ilp32/x86-64-aes-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-amdfam10.d: Likewise.
	* gas/i386/ilp32/x86-64-arch-1.d: Likewise.
	* gas/i386/ilp32/x86-64-arch-2.d: Likewise.
	* gas/i386/ilp32/x86-64-avx.d: Likewise.
	* gas/i386/ilp32/x86-64-avx-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-avx-swap.d: Likewise.
	* gas/i386/ilp32/x86-64-avx-swap-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-branch.d: Likewise.
	* gas/i386/ilp32/x86-64-cbw.d: Likewise.
	* gas/i386/ilp32/x86-64-cbw-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-clmul.d: Likewise.
	* gas/i386/ilp32/x86-64-clmul-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-crc32.d: Likewise.
	* gas/i386/ilp32/x86-64-crc32-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-crx.d: Likewise.
	* gas/i386/ilp32/x86-64-crx-suffix.d: Likewise.
	* gas/i386/ilp32/x86-64.d: Likewise.
	* gas/i386/ilp32/x86-64-disp.d: Likewise.
	* gas/i386/ilp32/x86-64-disp-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-drx.d: Likewise.
	* gas/i386/ilp32/x86-64-drx-suffix.d: Likewise.
	* gas/i386/ilp32/x86-64-ept.d: Likewise.
	* gas/i386/ilp32/x86-64-ept-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-fma4.d: Likewise.
	* gas/i386/ilp32/x86-64-fma.d: Likewise.
	* gas/i386/ilp32/x86-64-fma-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-gidt.d: Likewise.
	* gas/i386/ilp32/x86-64-ifunc.d: Likewise.
	* gas/i386/ilp32/x86-64-intel64.d: Likewise.
	* gas/i386/ilp32/x86-64-io.d: Likewise.
	* gas/i386/ilp32/x86-64-io-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-io-suffix.d: Likewise.
	* gas/i386/ilp32/x86-64-localpic.d: Likewise.
	* gas/i386/ilp32/x86-64-mem.d: Likewise.
	* gas/i386/ilp32/x86-64-mem-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-movbe.d: Likewise.
	* gas/i386/ilp32/x86-64-movbe-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-1-core2.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-1.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-1-k8.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-1-nocona.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-1-pentium.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-2.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-3.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-4-core2.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-4.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-4-k8.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-5.d: Likewise.
	* gas/i386/ilp32/x86-64-nops-5-k8.d: Likewise.
	* gas/i386/ilp32/x86-64-nops.d: Likewise.
	* gas/i386/ilp32/x86-64-opcode.d: Likewise.
	* gas/i386/ilp32/x86-64-opcode-inval.d: Likewise.
	* gas/i386/ilp32/x86-64-opcode-inval-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-opts.d: Likewise.
	* gas/i386/ilp32/x86-64-opts-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-pcrel.d: Likewise.
	* gas/i386/ilp32/x86-64-reg.d: Likewise.
	* gas/i386/ilp32/x86-64-reg-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-rep.d: Likewise.
	* gas/i386/ilp32/x86-64-rep-suffix.d: Likewise.
	* gas/i386/ilp32/x86-64-rip.d: Likewise.
	* gas/i386/ilp32/x86-64-rip-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-sib.d: Likewise.
	* gas/i386/ilp32/x86-64-sib-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-simd.d: Likewise.
	* gas/i386/ilp32/x86-64-simd-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-simd-suffix.d: Likewise.
	* gas/i386/ilp32/x86-64-sse2avx.d: Likewise.
	* gas/i386/ilp32/x86-64-sse2avx-opts.d: Likewise.
	* gas/i386/ilp32/x86-64-sse2avx-opts-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-sse3.d: Likewise.
	* gas/i386/ilp32/x86-64-sse4_1.d: Likewise.
	* gas/i386/ilp32/x86-64-sse4_1-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-sse4_2.d: Likewise.
	* gas/i386/ilp32/x86-64-sse4_2-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-sse-check.d: Likewise.
	* gas/i386/ilp32/x86-64-sse-check-none.d: Likewise.
	* gas/i386/ilp32/x86-64-sse-check-warn.d: Likewise.
	* gas/i386/ilp32/x86-64-sse-noavx.d: Likewise.
	* gas/i386/ilp32/x86-64-ssse3.d: Likewise.
	* gas/i386/ilp32/x86-64-stack.d: Likewise.
	* gas/i386/ilp32/x86-64-stack-intel.d: Likewise.
	* gas/i386/ilp32/x86-64-stack-suffix.d: Likewise.
	* gas/i386/ilp32/x86-64-unwind.d: Likewise.
	* gas/i386/ilp32/x86-64-vmx.d: Likewise.
	* gas/i386/ilp32/x86-64-xsave.d: Likewise.
	* gas/i386/ilp32/x86-64-xsave-intel.d: Likewise.

ld/

2010-12-30  H.J. Lu  <hongjiu.lu@intel.com>

	* emulparams/elf32_x86_64.sh: New.

	* configure.tgt (targ64_extra_emuls): Add elf32_x86_64 for
	i[3-7]86-*-linux-*.
	(targ_extra_libpath): Likewise.
	(targ_extra_emuls): Add elf32_x86_64 for x86_64-*-linux-*.
	(targ_extra_libpath): Likewise.

	* Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf32_x86_64.c.
	(eelf32_x86_64.c): New.
	* Makefile.in: Regenerated.

opcodes/

2010-12-30  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-dis.c (print_insn): Support bfd_mach_x64_32 and
	bfd_mach_x64_32_intel_syntax.
2010-12-31 00:33:36 +00:00
..
aout_gnu.h
atof-ieee.c
atof-vax.c
bfin-aux.h gas: blackfin: support numeric local labels with LOOP_BEGIN/LOOP_END pseudo insns 2010-10-11 08:36:30 +00:00
bfin-defs.h gas: blackfin: add missing register move insns 2010-09-22 21:30:35 +00:00
bfin-lex.l gas: blackfin: reign in overeager insn flag handling 2010-10-11 08:37:20 +00:00
bfin-parse.y gas: blackfin: fix encoding of BYTEOP2M insn 2010-10-15 20:44:46 +00:00
e-crisaout.c
e-criself.c
e-i386aout.c
e-i386coff.c
e-i386elf.c
e-mipsecoff.c
e-mipself.c
itbl-mips.h
m68k-parse.h
m68k-parse.y
obj-aout.c * obj.h (struct format_ops): Add adjust_symtab. 2010-10-25 12:38:42 +00:00
obj-aout.h
obj-coff-seh.c ChangeLog gas 2010-09-15 19:48:52 +00:00
obj-coff-seh.h ChangeLog gas 2010-09-15 19:43:56 +00:00
obj-coff.c * config/obj-coff.c (weak_altname2name): Don't infer from the presence 2010-11-05 04:58:24 +00:00
obj-coff.h
obj-ecoff.c * obj.h (struct format_ops): Add adjust_symtab. 2010-10-25 12:38:42 +00:00
obj-ecoff.h
obj-elf.c PR gas/12181 2010-11-18 16:00:25 +00:00
obj-elf.h 2010-10-23 Mark Mitchell <mark@codesourcery.com> 2010-10-23 18:05:10 +00:00
obj-evax.c
obj-evax.h
obj-fdpicelf.c
obj-fdpicelf.h
obj-macho.c
obj-macho.h
obj-multi.c
obj-multi.h * obj.h (struct format_ops): Add adjust_symtab. 2010-10-25 12:38:42 +00:00
obj-som.c
obj-som.h
rx-defs.h
rx-parse.y * config/rx-parse.y (SUB): Correct subtraction of immediate 2010-12-18 05:40:46 +00:00
tc-alpha.c Use bfd_elf_generic_reloc for alpha-elf. 2010-09-20 16:09:03 +00:00
tc-alpha.h
tc-arc.c
tc-arc.h
tc-arm.c PR gas/12198 2010-11-15 10:03:05 +00:00
tc-arm.h
tc-avr.c
tc-avr.h
tc-bfin.c gas: blackfin: support numeric local labels with LOOP_BEGIN/LOOP_END pseudo insns 2010-10-11 08:36:30 +00:00
tc-bfin.h
tc-cr16.c * config/tc-cr16.c (getprocreg_image): Fix typo MAX_PREG -> 2010-11-05 11:08:27 +00:00
tc-cr16.h
tc-cris.c
tc-cris.h
tc-crx.c
tc-crx.h
tc-d10v.c * config/tc-d10v.c (do_assemble): Correctly detect overflow of 2010-08-25 11:51:07 +00:00
tc-d10v.h
tc-d30v.c * config/tc-d30v.c (d30v_cons_align): Don't align .eh_frame. 2010-10-28 05:34:55 +00:00
tc-d30v.h
tc-dlx.c
tc-dlx.h
tc-fr30.c
tc-fr30.h
tc-frv.c
tc-frv.h
tc-generic.c
tc-generic.h
tc-h8300.c
tc-h8300.h
tc-hppa.c PR gas/11395 2010-12-27 02:05:14 +00:00
tc-hppa.h
tc-i370.c
tc-i370.h
tc-i386-intel.c Properly fold _GLOBAL_OFFSET_TABLE_ in Intel syntax. 2010-11-03 14:18:43 +00:00
tc-i386.c Add x86-64 ILP32 support. 2010-12-31 00:33:36 +00:00
tc-i386.h Add x86-64 ILP32 support. 2010-12-31 00:33:36 +00:00
tc-i860.c
tc-i860.h
tc-i960.c
tc-i960.h
tc-ia64.c PR gas/12011 2010-09-16 23:55:10 +00:00
tc-ia64.h
tc-ip2k.c
tc-ip2k.h
tc-iq2000.c
tc-iq2000.h
tc-lm32.c
tc-lm32.h
tc-m32c.c
tc-m32c.h
tc-m32r.c
tc-m32r.h
tc-m68hc11.c * config/tc-d10v.c (do_assemble): Correctly detect overflow of 2010-08-25 11:51:07 +00:00
tc-m68hc11.h
tc-m68k.c * gas/config/tc-m68k.c (tc_gen_reloc): Handle references to defined 2010-09-09 10:48:17 +00:00
tc-m68k.h
tc-m68851.h
tc-mcore.c
tc-mcore.h
tc-mep.c PR gas/12011 2010-09-16 23:55:10 +00:00
tc-mep.h
tc-microblaze.c * config/tc-d10v.c (do_assemble): Correctly detect overflow of 2010-08-25 11:51:07 +00:00
tc-microblaze.h
tc-mips.c include/opcode/ 2010-12-18 11:14:14 +00:00
tc-mips.h * symbols.c (symbol_clone_if_forward_ref): Call tc_new_dot_label 2010-12-16 18:48:28 +00:00
tc-mmix.c
tc-mmix.h
tc-mn10200.c
tc-mn10200.h
tc-mn10300.c * config/tc-mn10300.c (tc_gen_reloc): Replace absolute symbols 2010-09-23 12:11:31 +00:00
tc-mn10300.h
tc-moxie.c
tc-moxie.h
tc-msp430.c
tc-msp430.h
tc-mt.c
tc-mt.h
tc-ns32k.c
tc-ns32k.h
tc-openrisc.c
tc-openrisc.h
tc-or32.c
tc-or32.h
tc-pdp11.c
tc-pdp11.h
tc-pj.c
tc-pj.h
tc-ppc.c * config/tc-ppc.c (nop_limit): New var. 2010-11-04 03:30:05 +00:00
tc-ppc.h
tc-rx.c * reloc.c (BFD_RELOC_RX_ABS16_REV): Add. 2010-12-17 04:17:00 +00:00
tc-rx.h
tc-s390.c 2010-11-25 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> 2010-11-25 09:33:54 +00:00
tc-s390.h
tc-score7.c
tc-score.c
tc-score.h
tc-sh64.c
tc-sh64.h
tc-sh.c
tc-sh.h
tc-sparc.c
tc-sparc.h ld: 2010-10-22 12:08:32 +00:00
tc-spu.c
tc-spu.h
tc-tic4x.c
tc-tic4x.h
tc-tic6x.c bfd: 2010-11-02 14:36:39 +00:00
tc-tic6x.h gas/ 2010-09-27 15:52:40 +00:00
tc-tic30.c
tc-tic30.h
tc-tic54x.c
tc-tic54x.h
tc-v850.c
tc-v850.h
tc-vax.c
tc-vax.h
tc-xc16x.c
tc-xc16x.h
tc-xstormy16.c
tc-xstormy16.h
tc-xtensa.c
tc-xtensa.h
tc-z8k.c
tc-z8k.h
tc-z80.c * config/tc-z80.c (md_apply_fix): Rename var to fix shadow warning. 2010-12-09 20:02:07 +00:00
tc-z80.h
te-386bsd.h
te-aix5.h
te-armeabi.h
te-armlinuxeabi.h
te-dynix.h
te-epoc-pe.h
te-freebsd.h
te-generic.h
te-gnu.h
te-go32.h
te-hppa64.h
te-hppa.h
te-hppalinux64.h
te-hpux.h
te-i386aix.h
te-ia64aix.h
te-interix.h
te-irix.h
te-linux.h
te-lnews.h
te-lynx.h
te-mach.h
te-macos.h
te-nbsd532.h
te-nbsd.h
te-netware.h
te-pc532mach.h
te-pe.h
te-pep.h
te-psos.h
te-riscix.h
te-solaris.h
te-sparcaout.h
te-sun3.h
te-svr4.h
te-symbian.h
te-tmips.h
te-uclinux.h
te-vms.c
te-vms.h
te-vxworks.h
te-wince-pe.h
vax-inst.h
xtensa-istack.h
xtensa-relax.c
xtensa-relax.h