From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6401 invoked by alias); 31 Dec 2010 22:30:55 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 6364 invoked by uid 9674); 31 Dec 2010 22:30:54 -0000 Date: Fri, 31 Dec 2010 22:30:00 -0000 Message-ID: <20101231223054.6349.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] master: Merge remote branch 'gdb/master' X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: dd2092437258c4ea93d4626f094446eed31b2fa0 X-Git-Newrev: d3cf99efbd69d1713af02f445f361e475c905f80 X-SW-Source: 2010-q4/txt/msg00147.txt.bz2 List-Id: The branch, master has been updated via d3cf99efbd69d1713af02f445f361e475c905f80 (commit) via 063d51569a462844484401166c2fb3a46691668a (commit) via 76c889a35e18796c235dd690f0bc9ed6b89e61e6 (commit) via cfe876923224be1f46d60aa69d655dfec1768a6c (commit) via 81739b404bb6e4c3a459e6fc4b707e4eab80eae1 (commit) via 8fe80dd2edd866c0e1192f98ee36058af4048879 (commit) via 66ca0ee28888b8575bb404f861255e1db83161b2 (commit) via 8aefc2ca418cc5dfac6ac1a0d10d5650bd9aa027 (commit) via 30a2b1ae93bae347f55202e06e2018fef3a1a40e (commit) via 3425331568060820fe70c1a0850f125a5ca9901e (commit) from dd2092437258c4ea93d4626f094446eed31b2fa0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit d3cf99efbd69d1713af02f445f361e475c905f80 Merge: dd20924 063d515 Author: Jan Kratochvil Date: Fri Dec 31 23:30:46 2010 +0100 Merge remote branch 'gdb/master' commit 063d51569a462844484401166c2fb3a46691668a Author: Michael Snyder Date: Fri Dec 31 19:16:35 2010 +0000 2010-12-31 Michael Snyder * annotate.c: Comment cleanup, shorten long lines. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * auxv.c: Ditto. * auxv.h: Ditto. * ax-gdb.c: Ditto. * ax-gdb.h: Ditto. * ax-general.c: Ditto. * breakpoint.h: Ditto. * buildsym.h: Ditto. commit 76c889a35e18796c235dd690f0bc9ed6b89e61e6 Author: Dave Anglin Date: Fri Dec 31 16:43:44 2010 +0000 PR gas/11395 * config/tc-hppa.c (pa_ip): Revert last change. Add variable need_cond to determine whether a 64-bit condition is needed for 'A' and 'S' conditions. Default to 32-bit never condition for logical and unit instructions. Add error message for missing branch on bit condition. * hppa.h (pa_opcodes): Revert last change. Exchange 32 and 64-bit "bb" entries. * hppa-dis.c (compare_cond_64_names): Change never condition to ",*". (add_cond_64_names): Likewise. (logical_cond_64_names): Likewise. (unit_cond_64_names): Likewise. commit cfe876923224be1f46d60aa69d655dfec1768a6c Author: Richard Sandiford Date: Fri Dec 31 11:00:52 2010 +0000 bfd/ 2010-12-23 Robert Millan * config.bfd: Recognize mips-freebsd and mips-kfreebsd-gnu. * configure.host: Likewise. * configure.in: Support for `bfd_elf32_ntradbigmips_freebsd_vec', `bfd_elf32_ntradlittlemips_freebsd_vec', `bfd_elf32_tradbigmips_freebsd_vec', `bfd_elf32_tradlittlemips_freebsd_vec', `bfd_elf64_tradbigmips_freebsd_vec' and `bfd_elf64_tradlittlemips_freebsd_vec'. * configure: Regenerate. * elf32-mips.c: New target for FreeBSD support (same as traditional MIPS but overrides ELF_OSABI with ELFOSABI_FREEBSD). * elf64-mips.c: Likewise. * elfn32-mips.c: Likewise. * targets.c (_bfd_target_vector): Add `bfd_elf32_ntradbigmips_freebsd_vec', `bfd_elf32_ntradlittlemips_freebsd_vec', `bfd_elf32_tradbigmips_freebsd_vec', `bfd_elf32_tradlittlemips_freebsd_vec', `bfd_elf64_tradbigmips_freebsd_vec' and `bfd_elf64_tradlittlemips_freebsd_vec'. ld/ 2010-12-14 Robert Millan * configure.tgt: Recognize mips-freebsd and mips-kfreebsd-gnu. * emulparams/elf32btsmip_fbsd.sh: New file. * emulparams/elf32btsmipn32_fbsd.sh: Likewise. * emulparams/elf32ltsmip_fbsd.sh: Likewise. * emulparams/elf32ltsmipn32_fbsd.sh: Likewise. * emulparams/elf64btsmip_fbsd.sh: Likewise. * emulparams/elf64ltsmip_fbsd.sh: Likewise. * Makefile.am: Add build rules for `eelf32btsmip_fbsd.c', `eelf32btsmipn32_fbsd.c', `eelf32ltsmip_fbsd.c', `eelf32ltsmipn32_fbsd.c', `eelf64btsmip_fbsd.c' and `eelf64ltsmip_fbsd.c'. * Makefile.in: Regenerate. gas/ 2010-12-19 Robert Millan Richard Sandiford * config/tc-mips.c (ELF_TARGET): New macro. Generates target names accordingly to whether TE_FreeBSD and whether TE_TMIPS are defined. (mips_target_format): Refactor code using ELF_TARGET(). (support_64bit_objects): Likewise. * configure.in: Recognize mips-freebsd and mips-kfreebsd-gnu. * configure.tgt: Likewise. * configure: Regenerate. binutils/testsuite/ * binutils-all/readelf.exp: Handle MIPS FreeBSD targets. gas/testsuite/ * gas/mips/e32el-rel2.d: Accept any file format. * gas/mips/elf-rel.d: Likewise. * gas/mips/elf-rel2.d: Likewise. * gas/mips/elf-rel3.d: Likewise. * gas/mips/elfel-rel.d: Likewise. * gas/mips/elfel-rel2.d: Likewise. * gas/mips/elfel-rel3.d: Likewise. * gas/mips/ldstla-32-mips3-shared.d: Likewise. * gas/mips/ldstla-32-mips3.d: Likewise. * gas/mips/ldstla-32-shared.d: Likewise. * gas/mips/ldstla-32.d: Likewise. * gas/mips/ldstla-n64-shared.d: Likewise. * gas/mips/ldstla-n64.d: Likewise. * gas/mips/noat-1.d: Likewise. * gas/mips/set-arch.d: Likewise. * gas/mips/tls-o32.d: Likewise. ld/testsuite/ * ld-mips-elf/mips-elf-flags.exp: Handle FreeBSD targets. * ld-mips-elf/mips-elf.exp: Likewise. * ld-mips-elf/mips16-call-global.d: Accept any file format. * ld-mips-elf/mips16-intermix.d: Likewise. commit 81739b404bb6e4c3a459e6fc4b707e4eab80eae1 Author: H.J. Lu Date: Fri Dec 31 02:43:20 2010 +0000 Move elfXX_r_info/elfXX_r_sym to elfcode.h. 2010-12-30 H.J. Lu * elfcode.h (NAME(elf,r_info)): New. (NAME(elf,r_sym)): Likewise. * elflink.c (elf64_r_info): Removed. (elf32_r_info): Likewise. (elf64_r_sym): Likewise. (elf32_r_sym): Likewise. commit 8fe80dd2edd866c0e1192f98ee36058af4048879 Author: H.J. Lu Date: Fri Dec 31 00:34:59 2010 +0000 Add elf_x86_64_relocs_compatible. 2010-12-30 H.J. Lu * elf64-x86-64.c (elf_x86_64_relocs_compatible): New. (elf_backend_relocs_compatible): Defined to elf_x86_64_relocs_compatible. commit 66ca0ee28888b8575bb404f861255e1db83161b2 Author: H.J. Lu Date: Fri Dec 31 00:33:30 2010 +0000 Add x86-64 ILP32 support. bfd/ 2010-12-30 H.J. Lu * 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 * 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 * 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 * 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 * i386-dis.c (print_insn): Support bfd_mach_x64_32 and bfd_mach_x64_32_intel_syntax. commit 8aefc2ca418cc5dfac6ac1a0d10d5650bd9aa027 Author: gdbadmin Date: Fri Dec 31 00:00:03 2010 +0000 *** empty log message *** commit 30a2b1ae93bae347f55202e06e2018fef3a1a40e Author: Alan Modra Date: Thu Dec 30 23:00:06 2010 +0000 daily update commit 3425331568060820fe70c1a0850f125a5ca9901e Author: Mike Frysinger Date: Thu Dec 30 17:36:22 2010 +0000 Fix style warnings detected by server in new Blackfin code ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 115 +++++++ bfd/archures.c | 2 + bfd/bfd-in2.h | 2 + bfd/config.bfd | 38 ++- bfd/configure | 19 +- bfd/configure.host | 1 + bfd/configure.in | 19 +- bfd/cpu-i386.c | 36 ++- bfd/elf-bfd.h | 8 + bfd/elf32-mips.c | 31 ++ bfd/elf64-mips.c | 33 ++ bfd/elf64-x86-64.c | 852 ++++++++++++++++++++++++++-------------------- bfd/elfcode.h | 16 + bfd/elflink.c | 51 +++- bfd/elfn32-mips.c | 33 ++ bfd/targets.c | 14 + bfd/version.h | 2 +- gdb/ChangeLog | 23 ++- gdb/annotate.c | 6 +- gdb/arch-utils.c | 55 ++-- gdb/arch-utils.h | 10 +- gdb/auxv.c | 73 +++-- gdb/auxv.h | 2 +- gdb/ax-gdb.c | 12 +- gdb/ax-gdb.h | 2 +- gdb/ax-general.c | 2 +- gdb/bfin-tdep.c | 10 +- gdb/breakpoint.h | 249 ++++++++------ gdb/buildsym.h | 17 +- gdb/version.in | 2 +- include/opcode/ChangeLog | 6 + include/opcode/hppa.h | 14 +- opcodes/ChangeLog | 13 + opcodes/hppa-dis.c | 10 +- opcodes/i386-dis.c | 5 + 35 files changed, 1176 insertions(+), 607 deletions(-) First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bf39613..c486f58 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,118 @@ +2010-12-31 Robert Millan + + * config.bfd: Recognize mips-freebsd and mips-kfreebsd-gnu. + * configure.host: Likewise. + * configure.in: Support for `bfd_elf32_ntradbigmips_freebsd_vec', + `bfd_elf32_ntradlittlemips_freebsd_vec', + `bfd_elf32_tradbigmips_freebsd_vec', + `bfd_elf32_tradlittlemips_freebsd_vec', + `bfd_elf64_tradbigmips_freebsd_vec' and + `bfd_elf64_tradlittlemips_freebsd_vec'. + * configure: Regenerate. + * elf32-mips.c: New target for FreeBSD support + (same as traditional MIPS but overrides ELF_OSABI + with ELFOSABI_FREEBSD). + * elf64-mips.c: Likewise. + * elfn32-mips.c: Likewise. + * targets.c (_bfd_target_vector): Add + `bfd_elf32_ntradbigmips_freebsd_vec', + `bfd_elf32_ntradlittlemips_freebsd_vec', + `bfd_elf32_tradbigmips_freebsd_vec', + `bfd_elf32_tradlittlemips_freebsd_vec', + `bfd_elf64_tradbigmips_freebsd_vec' and + `bfd_elf64_tradlittlemips_freebsd_vec'. + +2010-12-30 H.J. Lu + + * elfcode.h (NAME(elf,r_info)): New. + (NAME(elf,r_sym)): Likewise. + + * elflink.c (elf64_r_info): Removed. + (elf32_r_info): Likewise. + (elf64_r_sym): Likewise. + (elf32_r_sym): Likewise. + +2010-12-30 H.J. Lu + + * elf64-x86-64.c (elf_x86_64_relocs_compatible): New. + (elf_backend_relocs_compatible): Defined to + elf_x86_64_relocs_compatible. + +2010-12-30 H.J. Lu + + * 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. + 2010-12-24 Alan Modra * compress.c (decompress_contents): Style. diff --git a/bfd/archures.c b/bfd/archures.c index 1d61ae3..0efc658 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -185,6 +185,8 @@ DESCRIPTION .#define bfd_mach_i386_i386 1 .#define bfd_mach_i386_i8086 2 .#define bfd_mach_i386_i386_intel_syntax 3 +.#define bfd_mach_x64_32 32 +.#define bfd_mach_x64_32_intel_syntax 33 .#define bfd_mach_x86_64 64 .#define bfd_mach_x86_64_intel_syntax 65 . bfd_arch_l1om, {* Intel L1OM *} diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 7cf593b..e75eb0d 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1872,6 +1872,8 @@ enum bfd_architecture #define bfd_mach_i386_i386 1 #define bfd_mach_i386_i8086 2 #define bfd_mach_i386_i386_intel_syntax 3 +#define bfd_mach_x64_32 32 +#define bfd_mach_x64_32_intel_syntax 33 #define bfd_mach_x86_64 64 #define bfd_mach_x86_64_intel_syntax 65 bfd_arch_l1om, /* Intel L1OM */ diff --git a/bfd/config.bfd b/bfd/config.bfd index 2de94a4..01fa09a 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -598,7 +598,7 @@ case "${targ}" in i[3-7]86-*-linux-*) targ_defvec=bfd_elf32_i386_vec targ_selvecs="i386linux_vec i386pei_vec" - targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec" + targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf32_x86_64_vec bfd_elf64_l1om_vec" ;; #ifdef BFD64 x86_64-*-darwin*) @@ -629,7 +629,7 @@ case "${targ}" in ;; x86_64-*-linux-*) targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386linux_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec" + targ_selvecs="bfd_elf32_i386_vec bfd_elf32_x86_64_vec i386linux_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec" want64=true ;; x86_64-*-mingw*) @@ -1016,6 +1016,40 @@ case "${targ}" in want64=true ;; #ifdef BFD64 + mips64*el-*-freebsd* | mips64*el-*-kfreebsd*-gnu) + # FreeBSD vectors + targ_defvec=bfd_elf32_ntradlittlemips_freebsd_vec + targ_selvecs="bfd_elf32_ntradbigmips_freebsd_vec bfd_elf32_tradlittlemips_freebsd_vec bfd_elf32_tradbigmips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec" + # Generic vectors + targ_selvecs="${targ_selvecs} bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec" + want64=true + ;; + mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu) + # FreeBSD vectors + targ_defvec=bfd_elf32_ntradbigmips_freebsd_vec + targ_selvecs="bfd_elf32_ntradlittlemips_freebsd_vec bfd_elf32_tradbigmips_freebsd_vec bfd_elf32_tradlittlemips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec" + # Generic vectors + targ_selvecs="${targ_selvecs} bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec" + want64=true + ;; +#endif + mips*el-*-freebsd* | mips*el-*-kfreebsd*-gnu) + # FreeBSD vectors + targ_defvec=bfd_elf32_tradlittlemips_freebsd_vec + targ_selvecs="bfd_elf32_tradbigmips_freebsd_vec bfd_elf32_ntradlittlemips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec bfd_elf32_ntradbigmips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec" + # Generic vectors + targ_selvecs="${targ_selvecs} bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec" + want64=true + ;; + mips*-*-freebsd* | mips*-*-kfreebsd*-gnu) + # FreeBSD vectors + targ_defvec=bfd_elf32_tradbigmips_freebsd_vec + targ_selvecs="bfd_elf32_tradlittlemips_freebsd_vec bfd_elf32_ntradbigmips_freebsd_vec bfd_elf64_tradbigmips_freebsd_vec bfd_elf32_ntradlittlemips_freebsd_vec bfd_elf64_tradlittlemips_freebsd_vec" + # Generic vectors + targ_selvecs="${targ_selvecs} bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec" + want64=true + ;; +#ifdef BFD64 mmix-*-*) targ_defvec=bfd_elf64_mmix_vec targ_selvecs=bfd_mmo_vec diff --git a/bfd/configure b/bfd/configure index 278cc1d..5085580 100755 --- a/bfd/configure +++ b/bfd/configure @@ -15113,8 +15113,10 @@ do bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;; bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf32_ntradbigmips_vec | bfd_elf32_ntradbigmips_freebsd_vec) + tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec) + tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;; bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;; bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; @@ -15153,8 +15155,10 @@ do bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;; bfd_elf32_tic6x_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; bfd_elf32_tic6x_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec) + tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_tradlittlemips_vec | bfd_elf32_tradlittlemips_freebsd_vec) + tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; @@ -15187,11 +15191,14 @@ do bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_tradbigmips_vec | bfd_elf64_tradbigmips_freebsd_vec) + tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec) + tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_x86_64_sol2_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf32_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;; bfd_elf64_l1om_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; diff --git a/bfd/configure.host b/bfd/configure.host index eb7bfe9..7c63de5 100644 --- a/bfd/configure.host +++ b/bfd/configure.host @@ -50,6 +50,7 @@ mips*-sgi-irix3*) HDEFINES="-G 4" ;; mips*-sgi-irix4*) HDEFINES="-G 4" ;; mips*-sgi-irix6*) host64=true;; mips64*-*-linux*) host64=true;; +mips64*-*-freebsd* | mips64*-*-kfreebsd*-gnu) host64=true;; mips*-*-sysv4*) ;; mips*-*-sysv*) HDEFINES="-G 4" ;; mips*-*-riscos*) HDEFINES="-G 4" ;; diff --git a/bfd/configure.in b/bfd/configure.in index baa996a..5908a57 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -748,8 +748,10 @@ do bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;; bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf32_ntradbigmips_vec | bfd_elf32_ntradbigmips_freebsd_vec) + tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec) + tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;; bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;; bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; @@ -788,8 +790,10 @@ do bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;; bfd_elf32_tic6x_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; bfd_elf32_tic6x_le_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;; - bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; - bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_tradbigmips_vec | bfd_elf32_tradbigmips_freebsd_vec) + tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_tradlittlemips_vec | bfd_elf32_tradlittlemips_freebsd_vec) + tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; @@ -822,11 +826,14 @@ do bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_tradbigmips_vec | bfd_elf64_tradbigmips_freebsd_vec) + tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; + bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec) + tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_x86_64_sol2_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf32_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;; bfd_elf64_l1om_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; diff --git a/bfd/cpu-i386.c b/bfd/cpu-i386.c index 44cca9d..f679a18 100644 --- a/bfd/cpu-i386.c +++ b/bfd/cpu-i386.c @@ -24,6 +24,22 @@ #include "bfd.h" #include "libbfd.h" +static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax = +{ + 64, /* 64 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i386, + bfd_mach_x64_32_intel_syntax, + "i386:intel", + "i386:x64-32:intel", + 3, + FALSE, + bfd_default_compatible, + bfd_default_scan, + 0 +}; + static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = { 64, /* 64 bits in a word */ @@ -37,7 +53,7 @@ static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = FALSE, bfd_default_compatible, bfd_default_scan, - 0 + &bfd_x64_32_arch_intel_syntax, }; static const bfd_arch_info_type bfd_i386_arch_intel_syntax = @@ -72,6 +88,22 @@ static const bfd_arch_info_type i8086_arch = &bfd_i386_arch_intel_syntax }; +static const bfd_arch_info_type bfd_x64_32_arch = +{ + 64, /* 64 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i386, + bfd_mach_x64_32, + "i386", + "i386:x64-32", + 3, + FALSE, + bfd_default_compatible, + bfd_default_scan, + &i8086_arch +}; + static const bfd_arch_info_type bfd_x86_64_arch = { 64, /* 64 bits in a word */ @@ -85,7 +117,7 @@ static const bfd_arch_info_type bfd_x86_64_arch = FALSE, bfd_default_compatible, bfd_default_scan, - &i8086_arch + &bfd_x64_32_arch }; const bfd_arch_info_type bfd_i386_arch = diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 2e607f8..cc83588 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -2272,6 +2272,14 @@ extern bfd_boolean _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_dyn_relocs **, unsigned int, unsigned int); +extern void elf_append_rela (bfd *, asection *, Elf_Internal_Rela *); +extern void elf_append_rel (bfd *, asection *, Elf_Internal_Rela *); + +extern bfd_vma elf64_r_info (bfd_vma, bfd_vma); +extern bfd_vma elf64_r_sym (bfd_vma); +extern bfd_vma elf32_r_info (bfd_vma, bfd_vma); +extern bfd_vma elf32_r_sym (bfd_vma); + /* Large common section. */ extern asection _bfd_elf_large_com_section; diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index aed0b4c..3392207 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -1725,6 +1725,37 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { /* Include the target file again for this target. */ #include "elf32-target.h" +/* FreeBSD support. */ + +#undef TARGET_LITTLE_SYM +#undef TARGET_LITTLE_NAME +#undef TARGET_BIG_SYM +#undef TARGET_BIG_NAME + +#define TARGET_LITTLE_SYM bfd_elf32_tradlittlemips_freebsd_vec +#define TARGET_LITTLE_NAME "elf32-tradlittlemips-freebsd" +#define TARGET_BIG_SYM bfd_elf32_tradbigmips_freebsd_vec +#define TARGET_BIG_NAME "elf32-tradbigmips-freebsd" + +#undef ELF_OSABI +#define ELF_OSABI ELFOSABI_FREEBSD + +/* The kernel recognizes executables as valid only if they carry a + "FreeBSD" label in the ELF header. So we put this label on all + executables and (for simplicity) also all other object files. */ + +static void +elf_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info) +{ + _bfd_elf_set_osabi (abfd, info); +} + +#undef elf_backend_post_process_headers +#define elf_backend_post_process_headers elf_fbsd_post_process_headers +#undef elf32_bed +#define elf32_bed elf32_fbsd_tradbed + +#include "elf32-target.h" /* Implement elf_backend_final_write_processing for VxWorks. */ static void diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c index 7ed54fa..3eeb341 100644 --- a/bfd/elf64-mips.c +++ b/bfd/elf64-mips.c @@ -3354,3 +3354,36 @@ extern bfd_boolean bfd_elf64_archive_write_armap /* Include the target file again for this target. */ #include "elf64-target.h" + + +/* FreeBSD support. */ + +#undef TARGET_LITTLE_SYM +#undef TARGET_LITTLE_NAME +#undef TARGET_BIG_SYM +#undef TARGET_BIG_NAME + +#define TARGET_LITTLE_SYM bfd_elf64_tradlittlemips_freebsd_vec +#define TARGET_LITTLE_NAME "elf64-tradlittlemips-freebsd" +#define TARGET_BIG_SYM bfd_elf64_tradbigmips_freebsd_vec +#define TARGET_BIG_NAME "elf64-tradbigmips-freebsd" + +#undef ELF_OSABI +#define ELF_OSABI ELFOSABI_FREEBSD + +/* The kernel recognizes executables as valid only if they carry a + "FreeBSD" label in the ELF header. So we put this label on all + executables and (for simplicity) also all other object files. */ + +static void +elf_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info) +{ + _bfd_elf_set_osabi (abfd, info); +} + +#undef elf_backend_post_process_headers +#define elf_backend_post_process_headers elf_fbsd_post_process_headers +#undef elf64_bed +#define elf64_bed elf64_fbsd_tradbed + +#include "elf64-target.h" diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 83656ae..3dd16ba 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -1,4 +1,4 @@ -/* X86-64 specific support for 64-bit ELF +/* X86-64 specific support for ELF Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Jan Hubicka . @@ -34,6 +34,14 @@ /* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */ hooks/post-receive -- Repository for Project Archer.