aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64
AgeCommit message (Collapse)AuthorFilesLines
2012-05-22ld/testsuite/Roland McGrath3-5/+4
* ld-x86-64/pr12570a.d (name): Distinguish it from pr12570b.d case. Loosen CFI-matching regexp so it matches x86_64-*-nacl* variant too. * ld-x86-64/pr12570b.d: Likewise. * ld-x86-64/x86-64.exp: Revert last change.
2012-05-22Skip/xfail x86_64-*-nacl* for eh4/pr12570a testsH.J. Lu1-0/+1
* ld-elf/eh4.d: Skip x86_64-*-nacl*. * ld-x86-64/x86-64.exp: Xfail pr12570a for x86_64-*-nacl*.
2012-05-22Revert the change for PR ld/r13909H.J. Lu2-11/+0
bfd/ PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the last change. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. ld/testsuite/ 2012-05-22 H.J. Lu <hongjiu.lu@intel.com> PR ld/13909 * ld-i386/i386.exp: Revert the last change. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/dummy.s: Removed. * ld-i386/pr13909.d: Likewise. * ld-x86-64/pr13909.d: Likewise.
2012-05-22Create PLT eh_frame section if there is .eh_frame sectionH.J. Lu2-0/+11
bfd/ PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT eh_frame section if there is an input .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. ld/testsuite/ PR ld/13909 * ld-i386/i386.exp: Run pr13909. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/dummy.s: New file. * ld-i386/pr13909.d: Likewise. * ld-x86-64/pr13909.d: Likewise.
2012-05-22Always create PLT eh_frame section for i386/x86-64H.J. Lu5-0/+35
bfd/ 2012-05-22 H.J. Lu <hongjiu.lu@intel.com> PR ld/14105 * elf32-i386.c (elf_i386_create_dynamic_sections): Always create PLT eh_frame section with SEC_LINKER_CREATED. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. ld/testsuite/ 2012-05-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/14105 * ld-elf/eh4.d: Add PLT eh_frame. * ld-i386/i386.exp: Run pr12570a and pr12570b. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pr12570a.d: New file. * ld-i386/pr12570a.s: Likewise. * ld-i386/pr12570b.s: Likewise. * ld-i386/pr12570b.s: Likewise. * ld-x86-64/pr12570a.d: Likewise. * ld-x86-64/pr12570a.s: Likewise. * ld-x86-64/pr12570b.d: Likewise. * ld-x86-64/pr12570b.s: Likewise.
2012-05-18Don't make _DYNAMIC/_GLOBAL_OFFSET_TABLE_ absoluteH.J. Lu6-12/+12
bfd/ * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. ld/testsuite/ * ld-i386/tlsdesc-nacl.rd: Update for dynamic sym changes. * ld-i386/tlsdesc.rd: Likewise. * ld-i386/tlsgdesc-nacl.rd: Likewise. * ld-i386/tlsgdesc.rd: Likewise. * ld-i386/tlsnopic-nacl.rd: Likewise. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlspic-nacl.rd: Likewise. * ld-i386/tlspic.rd: Likewise. * ld-x86-64/tlsdesc-nacl.rd: Likewise. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlsgdesc-nacl.rd: Likewise. * ld-x86-64/tlsgdesc.rd: Likewise. * ld-x86-64/tlspic-nacl.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise.
2012-05-11Always display addend as signed hex numberH.J. Lu4-40/+40
binutils/ PR binutils/14088 * readelf.c (dump_relocations): Always display addend as signed hex number. ld/testsuite/ PR binutils/14088 * ld-ia64/tlspic.rd: Updated. * ld-x86-64/tlsdesc-nacl.rd: Likewise. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlspic-nacl.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise.
2012-05-10Display signed hex number in x32 addend overflow checkH.J. Lu1-1/+1
bfd/ * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed hex number in x32 addend overflow check. gas/ * config/tc-i386.c (tc_gen_reloc): Display signed hex number in x32 addend overflow check. ld/testsuite/ * ld-x86-64/ilp32-11.d: Updated.
2012-05-10Count R_X86_64_RELATIVE64 as reloc_class_relativeH.J. Lu2-2/+10
bfd/ * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle R_X86_64_RELATIVE64. ld/testsuite/ * ld-x86-64/pr13082-1a.d: Check RELACOUNT. * ld-x86-64/pr13082-1b.d: Likewise.
2012-05-10Check 64-bit relocation addend overflow for x32H.J. Lu3-0/+13
bfd/ * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend overflow for R_X86_64_RELATIVE64. gas/ * config/tc-i386.c (tc_gen_reloc): Check x32 addend overflow for BFD_RELOC_64. gas/testsuite/ * gas/i386/ilp32/ilp32.exp: Run reloc64-inval. * gas/i386/ilp32/reloc64.s: Add tests for ".quad". * gas/i386/ilp32/reloc64.d: Updated. * gas/i386/ilp32/reloc64-inval.l: New file. * gas/i386/ilp32/reloc64-inval.s: Likewise. ld/testsuite/ * ld-x86-64/ilp32-11.d: New file. * ld-x86-64/ilp32-11.s: Likewise. * ld-x86-64/x86-64.exp: Run ilp32-11.
2012-04-24* ld-x86-64/plt-nacl.pd: Fix expected nop padding.Roland McGrath2-6/+9
* ld-x86-64/tlsdesc-nacl.pd: Likewise.
2012-04-13Set reloc_count to 0 for reloc sectionsH.J. Lu3-0/+13
bfd/ 2012-04-13 Alan Modra <amodra@gmail.com> PR ld/13947 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for reloc sections. ld/testsuite/ 2012-04-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/13947 * ld-x86-64/x86-64.exp: Run pr13947. * ld-x86-64/pr13947.d: New file. * ld-x86-64/pr13947.s: Likewise.
2012-04-03bfd/Roland McGrath43-635/+1577
2012-04-03 Roland McGrath <mcgrathr@google.com> * elf-nacl.c: New file. * elf-nacl.h: New file. * elf32-i386.c (elf_backend_modify_segment_map): Define for bfd_elf32_i386_nacl_vec. (elf_backend_modify_program_headers): Likewise. * elf64-x86-64.c (elf_backend_modify_segment_map): Define for bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec. (elf_backend_modify_program_headers): Likewise. * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here. (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here. * Makefile.in: Regenerated. * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here. (bfd_elf32_x86_64_nacl_vec): Likewise. (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise. (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise. (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise. (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise. (bfd_elf32_i386_nacl_vec): Likewise. (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise. (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise. * configure: Regenerated. binutils/testsuite/ 2012-04-03 Roland McGrath <mcgrathr@google.com> * lib/binutils-common.exp (is_elf_format): Consider *-*-nacl* to be ELF too. * binutils-all/elfedit-4.d: Add "#as: --64" option. * binutils-all/i386/i386.exp: Accept nacl targets too. * binutils-all/x86-64/x86-64.exp: Likewise. gas/testsuite/ 2012-04-03 Roland McGrath <mcgrathr@google.com> * gas/i386/k1om.d: Add not-target match for *-*-nacl*. * gas/i386/l1om.d: Likewise. ld/ 2012-04-03 Roland McGrath <mcgrathr@google.com> * configure.tgt (i[3-7]86-*-nacl*, x86_64-*-nacl*): Handle them. * emulparams/elf_nacl.sh: New file. * emulparams/elf_i386_nacl.sh: New file. * emulparams/elf32_x86_64_nacl.sh: New file. * emulparams/elf_x86_64_nacl.sh: New file. * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_i386_nacl.c here. (ALL_64_EMULATION_SOURCES): Add eelf32_x86_64_nacl.c and eelf_x86_64_nacl.c here. (eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c): New targets. * Makefile.in: Regenerated. * scripttempl/elf.sc: Handle SEPARATE_CODE cases. ld/testsuite/ 2012-04-03 Roland McGrath <mcgrathr@google.com> * ld-x86-64/ilp32-4-nacl.d: New file. * ld-x86-64/x86-64.exp: Run it. * ld-discard/discard.exp: Accept nacl targets too. * ld-elf/binutils.exp: Likewise. * ld-elf/comm-data.exp: Likewise. * ld-elf/elf.exp: Likewise. * ld-elf/tls_common.exp: Likewise. * ld-elfvers/vers.exp: Likewise. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfweak/elfweak.exp: Likewise. * ld-gc/gc.exp: Likewise. * ld-ifunc/binutils.exp: Likewise. * ld-ifunc/ifunc.exp: Likewise. * ld-linkonce/linkonce.exp:Likewise. * ld-pie/pie.exp: Likewise. * ld-shared/shared.exp: Likewise. * ld-undefined/weak-undef.exp: Likewise. * ld-unique/unique.exp: Likewise. * ld-x86-64/dwarfreloc.exp: Likewise. * ld-x86-64/line.exp: Likewise. * lib/ld-lib.exp (slurp_options): Support global array options_regsub to apply substitutions to the contents of options lines read from the file. * ld-i386/emit-relocs.d: Renamed to ... * ld-i386/emit-relocs.rd: ... this. * ld-i386/i386.exp: Accept nacl targets too. For them, use options_regsub to replace elf_i386 with elf_i386_nacl in run_dump_test cases; apply the same substitution in $i386tests; replace foo.rd expectations files with foo-nacl.rd in $i386tests. (i386tests): Change emit-relocs.d to emit-relocs.rd here. * ld-i386/emit-relocs-nacl.rd: New file. * ld-i386/plt-nacl.pd: New file. * ld-i386/plt-pic-nacl.pd: New file. * ld-i386/tlsbin-nacl.rd: New file. * ld-i386/tlsbindesc-nacl.rd: New file. * ld-i386/tlsdesc-nacl.rd: New file. * ld-i386/tlsgdesc-nacl.rd: New file. * ld-i386/tlsnopic-nacl.rd: New file. * ld-i386/tlspic-nacl.rd: New file. * ld-x86-64/x86-64.exp: Accept nacl targets too. For them, use options_regsub to replace elf_x86_64 with elf_x86_64_nacl in run_dump_test cases; apply the same substitution in $x86_64tests; replace foo.rd expectations files with foo-nacl.rd in $x86_64tests. Add explicit -melf_x86_64 to ld options in tests that need it, in case the default emulation is x32 (as it is for x86_64-nacl). * ld/testsuite/ld-x86-64/plt-nacl.pd: New file. * ld/testsuite/ld-x86-64/split-by-file-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlsbin-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlsdesc-nacl.pd: New file. * ld/testsuite/ld-x86-64/tlsdesc-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlspic-nacl.rd: New file. * ld-i386/hidden2.d: Loosen regexps to match any file format variant, and not to depend on exact addresses, displacements, etc. where they are irrelevant. * ld-i386/pcrel16.d: Likewise. * ld-i386/pcrel16abs.d: Likewise. * ld-i386/pr12718.d: Likewise. * ld-i386/pr12921.d: Likewise. * ld-i386/reloc.d: Likewise. * ld-i386/tlsbin.dd: Likewise. * ld-i386/tlsbin.sd: Likewise. * ld-i386/tlsbin.td: Likewise. * ld-i386/tlsbindesc.dd: Likewise. * ld-i386/tlsbindesc.sd: Likewise. * ld-i386/tlsbindesc.td: Likewise. * ld-i386/tlsdesc.dd: Likewise. * ld-i386/tlsdesc.sd: Likewise. * ld-i386/tlsdesc.td: Likewise. * ld-i386/tlsg.sd: Likewise. * ld-i386/tlsgdesc.dd: Likewise. * ld-i386/tlsindntpoff.dd: Likewise. * ld-i386/tlsnopic.dd: Likewise. * ld-i386/tlsnopic.sd: Likewise. * ld-i386/tlspic.dd: Likewise. * ld-i386/tlspic.sd: Likewise. * ld-i386/tlspic.td: Likewise. * ld-i386/tlspie2.d: Likewise. * ld-x86-64/hidden2.d: Likewise. * ld-x86-64/pcrel16.d: Likewise. * ld-x86-64/pr12718.d: Likewise. * ld-x86-64/pr12921.d: Likewise. * ld-x86-64/protected3.d: Likewise. * ld-x86-64/tlsbin.dd: Likewise. * ld-x86-64/tlsbin.sd: Likewise. * ld-x86-64/tlsbin.td: Likewise. * ld-x86-64/tlsbindesc.dd: Likewise. * ld-x86-64/tlsbindesc.sd: Likewise. * ld-x86-64/tlsbindesc.td: Likewise. * ld-x86-64/tlsdesc.dd: Likewise. * ld-x86-64/tlsdesc.sd: Likewise. * ld-x86-64/tlsdesc.td: Likewise. * ld-x86-64/tlsg.sd: Likewise. * ld-x86-64/tlsgd5.dd: Likewise. * ld-x86-64/tlsgd6.dd: Likewise. * ld-x86-64/tlsgdesc.dd: Likewise. * ld-x86-64/tlspic.dd: Likewise. * ld-x86-64/tlspic.sd: Likewise. * ld-x86-64/tlspic.td: Likewise. * ld-x86-64/ilp32-8.d: Match any file format variant. Use a -Ttext and adjust expected results, to handle variant layouts. * ld-x86-64/ilp32-9.d: Likewise. * ld-i386/alloc.t: Remove superfluous OUTPUT_FORMAT statement. * ld-i386/pr12627.t: Likewise. * ld-x86-64/abs-l1om.d: Add target: constraint. * ld-x86-64/protected2-l1om.d: Likewise. * ld-x86-64/protected3-l1om.d: Likewise. * ld-x86-64/ilp32-4.d: Likewise. * ld-x86-64/plt.s: New file. * ld-x86-64/pltlib.s: New file. * ld-x86-64/plt.pd: New file. * ld-x86-64/x86-64.exp (x86_64tests): Add them. * ld-i386/plt.s: New file. * ld-i386/pltlib.s: New file. * ld-i386/plt.pd: New file. * ld-i386/plt-pic.s: New file. * ld-i386/plt-pic.pd: New file. * ld-i386/i386.exp (i386tests): Add them.
2012-03-20Handle relocation against protected function for -BsymbolicH.J. Lu5-0/+36
bfd/ 2012-03-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/13880 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error for R_386_GOTOFF relocation against protected function if SYMBOLIC_BIND is true. * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an error for R_X86_64_GOTOFF64 relocation against protected function when building executable or SYMBOLIC_BIND is true. ld/testsuite/ 2012-03-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/13880 * ld-i386/i386.exp: Run protected4 and protected5. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/protected4.d: New. * ld-i386/protected4.s: Likewise. * ld-i386/protected5.d: Likewise. * ld-i386/protected5.s: Likewise. * ld-x86-64/protected4.d: Likewise. * ld-x86-64/protected4.s: Likewise. * ld-x86-64/protected5.d: Likewise. * ld-x86-64/protected5.s: Likewise.
2012-03-09Restore R_386_IRELATIVE and R_X86_64_IRELATIVEH.J. Lu3-3/+3
bfd/ 2012-03-09 H.J. Lu <hongjiu.lu@intel.com> PR ld/13817 * bfd/elf32-i386.c (elf_i386_relocate_section): Restore R_386_IRELATIVE. * * elf64-x86-64.c (elf_x86_64_relocate_section): Restore R_X86_64_IRELATIVE. ld/testsuite/ 2012-03-09 H.J. Lu <hongjiu.lu@intel.com> PR ld/13817 * ld-i386/pr13302.d: Updated. * ld-x86-64/pr13082-5b.d: Likewise. * ld-x86-64/pr13082-6a.d: Likewise. * ld-x86-64/pr13082-6b.d: Likewise.
2012-01-31Support arch-dependent fillH.J. Lu3-8/+3
bfd/ 2012-01-31 H.J. Lu <hongjiu.lu@intel.com> PR ld/13616 * archures.c (bfd_arch_info): Add fill. (bfd_default_arch_struct): Add bfd_arch_default_fill. (bfd_arch_default_fill): New. * configure.in: Set bfd version to 2.22.52. * configure: Regenerated. * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info initializer. * cpu-arc.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-cris.c: Likewise. * cpu-crx.c: Likewise. * cpu-d10v.c: Likewise. * cpu-d30v.c: Likewise. * cpu-dlx.c: Likewise. * cpu-epiphany.c: Likewise. * cpu-fr30.c: Likewise. * cpu-frv.c: Likewise. * cpu-h8300.c: Likewise. * cpu-h8500.c: Likewise. * cpu-hppa.c: Likewise. * cpu-i370.c: Likewise. * cpu-i860.c: Likewise. * cpu-i960.c: Likewise. * cpu-ia64.c: Likewise. * cpu-ip2k.c: Likewise. * cpu-iq2000.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m10200.c: Likewise. * cpu-m10300.c: Likewise. * cpu-m32c.c: Likewise. * cpu-m32r.c: Likewise. * cpu-m68hc11.c: Likewise. * cpu-m68hc12.c: Likewise. * cpu-m68k.c: Likewise. * cpu-m88k.c: Likewise. * cpu-mcore.c: Likewise. * cpu-mep.c: Likewise. * cpu-microblaze.c: Likewise. * cpu-mips.c: Likewise. * cpu-mmix.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-mt.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-openrisc.c: Likewise. * cpu-or32.c: Likewise. * cpu-pdp11.c: Likewise. * cpu-pj.c: Likewise. * cpu-plugin.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rl78.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-rx.c: Likewise. * cpu-s390.c: Likewise. * cpu-score.c: Likewise. * cpu-sh.c: Likewise. * cpu-sparc.c: Likewise. * cpu-spu.c: Likewise. * cpu-tic30.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-tic54x.c: Likewise. * cpu-tic6x.c: Likewise. * cpu-tic80.c: Likewise. * cpu-tilegx.c: Likewise. * cpu-tilepro.c: Likewise. * cpu-v850.c: Likewise. * cpu-vax.c: Likewise. * cpu-w65.c: Likewise. * cpu-we32k.c: Likewise. * cpu-xc16x.c: Likewise. * cpu-xstormy16.c: Likewise. * cpu-xtensa.c: Likewise. * cpu-z80.c: Likewise. * cpu-z8k.c: Likewise. * cpu-i386.c: Include "libiberty.h". (bfd_arch_i386_fill): New. Add bfd_arch_i386_fill to bfd_arch_info initializer. * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer. * cpu-l1om.c: Likewise. * linker.c (default_data_link_order): Call abfd->arch_info->fill if fill size is 0. * bfd-in2.h: Regenerated. include/ 2012-01-31 H.J. Lu <hongjiu.lu@intel.com> PR ld/13616 * bfdlink.h (bfd_link_order): Update comments on data size. ld/ 2012-01-31 H.J. Lu <hongjiu.lu@intel.com> PR ld/13616 * emulparams/elf32_x86_64.sh: Remove NOP. * emulparams/elf_i386.sh: Likewise. * emulparams/elf_i386_be.sh: Likewise. * emulparams/elf_i386_ldso.sh: Likewise. * emulparams/elf_i386_vxworks.sh: Likewise. * emulparams/elf_k1om.sh: Likewise. * emulparams/elf_l1om.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * ldlang.c (zero_fill): Initialized to 0. * ldwrite.c (build_link_order): Set data size to linker odrder size when they are the same. * scripttempl/elf.sc: Don't specify fill if NOP is undefined. ld/testsuite/ 2012-01-31 H.J. Lu <hongjiu.lu@intel.com> PR ld/13616 * ld-i386/tlsbindesc.dd: Update no-op padding. * ld-i386/tlsnopic.dd: Likewise. * ld-i386/tlspic.dd: Likewise. * ld-x86-64/tlsbin.dd: Likewise. * ld-x86-64/tlsbindesc.dd: Likewise. * ld-x86-64/tlspic.dd: Likewise.
2012-01-10Remove ABI_64_P check on R_X86_64_PCXXH.J. Lu7-21/+25
bfd/ 2012-01-10 H.J. Lu <hongjiu.lu@intel.com> PR ld/13581 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P check on R_X86_64_PCXX. ld/testsuite/ 2012-01-10 H.J. Lu <hongjiu.lu@intel.com> PR ld/13581 * ld-x86-64/ilp32-4.s: New. * ld-x86-64/ilp32-10.d: Likewise. * ld-x86-64/ilp32-10.s: Likewise. * ld-x86-64/ilp32-4.d: Adjusted. * ld-x86-64/ilp32-5.d: Likewise. * ld-x86-64/ilp32-5.s: Likewise. * ld-x86-64/x86-64.exp: Run ilp32-10.
2012-01-05 * ld-x86-64/x86-64.exp: Add test of linking mixed 32-bit andNick Clifton4-0/+87
64-bit objects when the 32-bit object (loaded first) contains 32+ local symbols, all referenced by relocs and the 64-bit object contains a reloc that uses a symbol in the 32-bit object. * 32bit.s: New source file. * 64bit.s: New source file. * incompatible.l: New expected linker output file.
2011-10-21Replace IRELATIVE relocations with RELATIVE in .rel.dyn.H.J. Lu3-3/+3
bfd/ 2011-10-21 H.J. Lu <hongjiu.lu@intel.com> PR ld/13302 * elf32-i386.c (elf_i386_relocate_section): Replace R_386_IRELATIVE with R_386_RELATIVE. * elf64-x86-64.c (elf_x86_64_relocate_section): Replace R_X86_64_IRELATIVE with R_X86_64_RELATIVE. ld/testsuite/ 2011-10-21 H.J. Lu <hongjiu.lu@intel.com> PR ld/13302 * ld-i386/i386.exp: Run pr13302. * ld-i386/pr13302.d: New. * ld-i386/pr13302.s: Likewise. * ld-x86-64/pr13082-5b.d: Updated. * ld-x86-64/pr13082-6a.d: Likewise. * ld-x86-64/pr13082-6b.d: Likewise.
2011-09-12Use .got.plt for IFUNC symbols if there are no GOT relocations.H.J. Lu1-2/+1
bfd/ 2011-09-12 H.J. Lu <hongjiu.lu@intel.com> PR ld/13178 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt if there are no GOT relocations. ld/testsuite/ 2011-09-12 H.J. Lu <hongjiu.lu@intel.com> PR ld/13178 * ld-ifunc/ifunc-13-i386.d: Updated. * ld-ifunc/ifunc-13-x86-64.d: Likewise. * ld-ifunc/ifunc-3a-x86.d: Likewise. * ld-x86-64/pr13082-5a.d: Likewise. * ld-ifunc/ifunc-15-i386.d: New. * ld-ifunc/ifunc-15-i386.s: Likewise. * ld-ifunc/ifunc-15-x86-64.d: Likewise. * ld-ifunc/ifunc-15-x86-64.s: Likewise.
2011-08-12Add R_X86_64_RELATIVE64 and handle R_X86_64_64 for x32.H.J. Lu19-0/+199
bfd/ 2011-08-12 H.J. Lu <hongjiu.lu@intel.com> PR ld/13082 * elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_RELATIVE64. (elf_x86_64_relocate_section): Treat R_X86_64_64 like R_X86_64_32 and zero-extend it to 64bit if addend is zero for x32. Generate R_X86_64_RELATIVE64 for x32. include/elf/ 2011-08-12 H.J. Lu <hongjiu.lu@intel.com> PR ld/13082 * x86-64.h (R_X86_64_RELATIVE64): New. ld/testsuite/ 2011-08-12 H.J. Lu <hongjiu.lu@intel.com> PR ld/13082 * ld-x86-64/pr13082-1.s: New. * ld-x86-64/pr13082-1a.d: Likewise. * ld-x86-64/pr13082-1b.d: Likewise. * ld-x86-64/pr13082-2.s: Likewise. * ld-x86-64/pr13082-2a.d: Likewise. * ld-x86-64/pr13082-2b.d: Likewise. * ld-x86-64/pr13082-3.s: Likewise. * ld-x86-64/pr13082-3a.d: Likewise. * ld-x86-64/pr13082-3b.d: Likewise. * ld-x86-64/pr13082-4.s: Likewise. * ld-x86-64/pr13082-4a.d: Likewise. * ld-x86-64/pr13082-4b.d: Likewise. * ld-x86-64/pr13082-5.s: Likewise. * ld-x86-64/pr13082-5a.d: Likewise. * ld-x86-64/pr13082-5b.d: Likewise. * ld-x86-64/pr13082-6.s: Likewise. * ld-x86-64/pr13082-6a.d: Likewise. * ld-x86-64/pr13082-6b.d: Likewise. * ld-x86-64/x86-64.exp: Run pr13082-[1-6][ab].
2011-08-01Check R_X86_64_32 overflow and allow R_X86_64_64 for x32.H.J. Lu9-0/+47
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.
2011-07-22Add initial Intel K1OM support.H.J. Lu3-0/+44
bfd/ 2011-07-22 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (ALL_MACHINES): Add cpu-k1om.lo. (ALL_MACHINES_CFILES): Add cpu-k1om.c. * Makefile.in: Regenerated. * archures.c (bfd_architecture): Add bfd_arch_k1om. (bfd_k1om_arch): New. (bfd_archures_list): Add &bfd_k1om_arch. * bfd-in2.h: Regenerated. * config.bfd (targ64_selvecs): Add bfd_elf64_k1om_vec if bfd_elf64_x86_64_vec is supported. Add bfd_elf64_k1om_freebsd_vec if bfd_elf64_x86_64_freebsd_vec is supported. (targ_selvecs): Likewise. * configure.in: Support bfd_elf64_k1om_vec and bfd_elf64_k1om_freebsd_vec. * configure: Regenerated. * cpu-k1om.c: New. * elf64-x86-64.c (elf64_k1om_elf_object_p): New. (bfd_elf64_k1om_vec): Likewise. (bfd_elf64_k1om_freebsd_vec): Likewise. * targets.c (bfd_elf64_k1om_vec): New. (bfd_elf64_k1om_freebsd_vec): Likewise. (_bfd_target_vector): Add bfd_elf64_k1om_vec and bfd_elf64_k1om_freebsd_vec. binutils/ 2011-07-22 H.J. Lu <hongjiu.lu@intel.com> * dwarf.c (init_dwarf_regnames): Handle EM_K1OM. * elfedit.c (elf_machine): Support EM_K1OM. (elf_class): Likewise. * readelf.c (guess_is_rela): Handle EM_K1OM. (dump_relocations): Likewise. (get_machine_name): Likewise. (get_section_type_name): Likewise. (get_elf_section_flags): Likewise. (process_section_headers): Likewise. (get_symbol_index_type): Likewise. (is_32bit_abs_reloc): Likewise. (is_32bit_pcrel_reloc): Likewise. (is_64bit_abs_reloc): Likewise. (is_64bit_pcrel_reloc): Likewise. (is_none_reloc): Likewise. * doc/binutils.texi: Mention K1OM for elfedit. binutils/testsuite/ 2011-07-22 H.J. Lu <hongjiu.lu@intel.com> * binutils-all/elfedit.exp: Run elfedit-4. * binutils-all/elfedit-4.d: New. gas/ 2011-07-22 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (cpu_arch): Add k1om. (i386_align_code): Handle PROCESSOR_K1OM. (check_cpu_arch_compatible): Check EM_K1OM. (i386_arch): Handle Intel K1OM. (i386_mach): Return bfd_mach_k1om for Intel K1OM. (i386_target_format): Return ELF_TARGET_K1OM_FORMAT for Intel K1OM. * config/tc-i386.h (ELF_TARGET_K1OM_FORMAT): New. (processor_type): Add PROCESSOR_K1OM. * doc/c-i386.texi: Document k1om. gas/testsuite/ 2011-07-22 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/k1om.d: New. * gas/i386/k1om-inval.l: Likewise. * gas/i386/k1om-inval.s: Likewise. * gas/i386/i386.exp: Run k1om-inval and k1om. include/elf/ 2011-07-22 H.J. Lu <hongjiu.lu@intel.com> * common.h (EM_K1OM): New. ld/ 2011-07-22 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (ALL_64_EMULATIONS): Add eelf_k1om.o and eelf_k1om_fbsd.o (eelf_k1om.c): New. (eelf_k1om_fbsd.c): Likewise. * Makefile.in: Regenerated. * configure.tgt (targ64_extra_emuls): Add elf_k1om if elf_x86_64 is supported. Add elf_k1om_fbsd if elf_x86_64_fbsd is supported. (targ_extra_emuls): Likewise. * emulparams/elf_k1om.sh: New. * emulparams/elf_k1om_fbsd.sh: Likewise. ld/testsuite/ 2011-07-22 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/abs-k1om.d: New. * ld-x86-64/protected2-k1om.d: Likewise. * ld-x86-64/protected3-k1om.d: Likewise. * ld-x86-64/x86-64.exp: Run abs-k1om, protected2-k1om and protected3-k1om. opcodes/ 2011-07-22 H.J. Lu <hongjiu.lu@intel.com> * configure.in: Handle bfd_k1om_arch. * configure: Regenerated. * disassemble.c (disassembler): Handle bfd_k1om_arch. * i386-dis.c (print_insn): Handle bfd_mach_k1om and bfd_mach_k1om_intel_syntax. * i386-gen.c (cpu_flag_init): Set CPU_UNKNOWN_FLAGS to ~(CpuL1OM|CpuK1OM). Add CPU_K1OM_FLAGS. (cpu_flags): Add CpuK1OM. * i386-opc.h (CpuK1OM): New. (i386_cpu_flags): Add cpuk1om. * i386-init.h: Regenerated. * i386-tbl.h: Likewise.
2011-06-24Add testcases for PR ld/12921.H.J. Lu3-0/+47
2011-06-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/12921 * ld-i386/i386.exp: Run pr12921. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pr12921.d: New. * ld-i386/pr12921.s: Likewise. * ld-x86-64/pr12921.d: Likewise. * ld-x86-64/pr12921.s: Likewise.
2011-06-20 PR ld/12570Jakub Jelinek23-44/+49
include/ * bfdlink.h (struct bfd_link_info): Add no_ld_generated_unwind_info option. ld/ * emultempl/elf32.em (OPTION_LD_GENERATED_UNWIND_INFO, OPTION_NO_LD_GENERATED_UNWIND_INFO): Define. (gld${EMULATION_NAME}_handle_option): Handle --ld-generated-unwind-info and --no-ld-generated-unwind-info. * ld.texinfo (--ld-generated-unwind-info, --no-ld-generated-unwind-info): Document. bfd/ * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations at all for linker created .eh_frame sections. (_bfd_elf_discard_section_eh_frame): Handle linker created .eh_frame sections with no relocations. * elf64-x86-64.c: Include dwarf2.h. (elf_x86_64_eh_frame_plt): New variable. (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Define. (struct elf_x86_64_link_hash_table): Add plt_eh_frame field. (elf_x86_64_create_dynamic_sections): Create and fill in .eh_frame section for .plt section. (elf_x86_64_size_dynamic_sections): Write .plt section size into .eh_frame FDE covering .plt section. (elf_x86_64_finish_dynamic_sections): Write .plt section start into .eh_frame FDE covering .plt section. Call _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section. (elf_backend_plt_alignment): Define to 4. * elf32-i386.c: Include dwarf2.h. (elf_i386_eh_frame_plt): New variable. (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Define. (struct elf_i386_link_hash_table): Add plt_eh_frame field. (elf_i386_create_dynamic_sections): Create and fill in .eh_frame section for .plt section. (elf_i386_size_dynamic_sections): Write .plt section size into .eh_frame FDE covering .plt section. (elf_i386_finish_dynamic_sections): Write .plt section start into .eh_frame FDE covering .plt section. Call _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section. (elf_backend_plt_alignment): Define to 4. ld/testsuite/ * ld-x86-64/x86-64.exp: Link some testcases with --no-ld-generated-unwind-info. * ld-x86-64/tlsbin.rd: Add --no-ld-generated-unwind-info to ld comment. * ld-x86-64/tlsdesc.dd: Likewise. * ld-x86-64/tlspic.dd: Likewise. * ld-x86-64/tlsdesc.sd: Likewise. * ld-x86-64/tlspic.rd: Likewise. * ld-x86-64/tlsbindesc.rd: Likewise. * ld-x86-64/tlsbindesc.sd: Likewise. * ld-x86-64/tlsbin.td: Likewise. * ld-x86-64/tlsdesc.pd: Likewise. * ld-x86-64/tlsdesc.td: Likewise. * ld-x86-64/tlsbindesc.dd: Likewise. * ld-x86-64/tlsbin.dd: Likewise. * ld-x86-64/tlsgdesc.rd: Likewise. * ld-x86-64/tlspic.sd: Likewise. * ld-x86-64/tlsbindesc.td: Likewise. * ld-x86-64/tlspic.td: Likewise. * ld-x86-64/tlsbin.sd: Likewise. * ld-x86-64/ilp32-4.d: Likewise. * ld-x86-64/tlsgdesc.dd: Add --no-ld-generated-unwind-info to ld comment. Adjust. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlsgd6.dd: Adjust. * ld-x86-64/tlsgd5.dd: Likewise. * ld-i386/i386.exp: Link some testcases with --no-ld-generated-unwind-info. * ld-i386/tlsbin.rd: Add --no-ld-generated-unwind-info to ld comment.. * ld-i386/tlsdesc.dd: Likewise. * ld-i386/tlspic.dd: Likewise. * ld-i386/tlsdesc.sd: Likewise. * ld-i386/tlsgdesc.dd: Likewise. * ld-i386/tlsnopic.sd: Likewise. * ld-i386/tlspic.rd: Likewise. * ld-i386/tlsdesc.rd: Likewise. * ld-i386/tlsbindesc.rd: Likewise. * ld-i386/tlsbindesc.sd: Likewise. * ld-i386/tlsbin.td: Likewise. * ld-i386/tlsdesc.td: Likewise. * ld-i386/tlsnopic.dd: Likewise. * ld-i386/tlsbindesc.dd: Likewise. * ld-i386/tlsbin.dd: Likewise. * ld-i386/tlsgdesc.rd: Likewise. * ld-i386/tlspic.sd: Likewise. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlsbindesc.td: Likewise. * ld-i386/tlspic.td: Likewise. * ld-i386/tlsbin.sd: Likewise.
2011-06-19Fix misc x32 bugs.H.J. Lu2-2/+2
bfd/ 2011-06-19 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_backend_post_process_headers): Defined for x32. binutils/testsuite/ 2011-06-19 H.J. Lu <hongjiu.lu@intel.com> * binutils-all/elfedit-1.d: Updated for x32. gas/ 2011-06-19 H.J. Lu <hongjiu.lu@intel.com> * configure.tgt: Support x32. ld/ 2011-06-19 H.J. Lu <hongjiu.lu@intel.com> * configure.tgt: Support x32. ld/testsuite/ 2011-06-19 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/eh1.d: Skip x32. * ld-elf/eh2.d: Likewise. * ld-elf/eh3.d: Likewise. * ld-elf/eh4.d: Likewise. * ld-elfvsb/elfvsb.exp: Only xfail 64bit x86_64-*-linux*. * ld-shared/shared.exp: Likewise. * ld-ifunc/ifunc-1-local-x86.d: Support x32. * ld-ifunc/ifunc-1-x86.d: Likewise. * ld-ifunc/ifunc-3a-x86.d: Likewise. * ld-x86-64/pcrel16.d: Likewise. * ld-x86-64/x86-64.exp (x86_64tests): Add missing -melf_x86_64.
2011-06-09Build x32 DSO from x86-64 object file only for native.H.J. Lu1-2/+2
2011-06-08 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/x86-64.exp: Build x32 DSO from x86-64 object file only for native.
2011-06-09Allow building x32 DSO from x86-64 object file.H.J. Lu3-0/+33
bfd/ 2011-06-08 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64 relocations in SEC_DEBUGGING sections when building shared libraries. ld/testsuite/ 2011-06-08 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/simple.c: New. * ld-x86-64/x86-64-x32.rd: Likewise. * ld-x86-64/x86-64.exp: Check building x32 DSO from x86-64 object file.
2011-05-26Handle R_X86_64_TPOFF64 in executable.H.J. Lu9-54/+63
bfd/ 2011-05-26 H.J. Lu <hongjiu.lu@intel.com> PR ld/12809 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle R_X86_64_TPOFF64 in executable. ld/testsuite/ 2011-05-26 H.J. Lu <hongjiu.lu@intel.com> PR ld/12809 * ld-x86-64/tlsbin.s: Add a test for LE with large model. * ld-x86-64/tlsbin.dd: Updated. * ld-x86-64/tlsbin.rd: Likewise. * ld-x86-64/tlsbin.sd: Likewise. * ld-x86-64/tlsbin.td: Likewise. * ld-x86-64/tlsbindesc.dd: Likewise. * ld-x86-64/tlsbindesc.rd: Likewise. * ld-x86-64/tlsbindesc.sd: Likewise. * ld-x86-64/tlsbindesc.td: Likewise.
2011-05-01Add testcases for PR ld/12718.H.J. Lu3-0/+24
2011-05-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/12718 * ld-i386/i386.exp: Run pr12718. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pr12718.d: New. * ld-i386/pr12718.s: Likewise. * ld-x86-64/pr12718.d: Likewise. * ld-x86-64/pr12718.s: Likewise.
2011-03-12Support TLS x32 GD->IE, GD->LE and LD->LE transitions.H.J. Lu11-0/+123
bfd/ 2011-03-12 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS x32 GD->IE and GD->LE transitions. (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE and LD->LE transitions. ld/testsuite/ 2011-03-12 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/tlsgd4.dd: New. * ld-x86-64/tlsgd4.s: Likewise. * ld-x86-64/tlsgd5.dd: Likewise. * ld-x86-64/tlsgd5a.s: Likewise. * ld-x86-64/tlsgd5b.s: Likewise. * ld-x86-64/tlsgd6.dd: Likewise. * ld-x86-64/tlsgd6a.s: Likewise. * ld-x86-64/tlsgd6b.s: Likewise. * ld-x86-64/tlsld2.dd: Likewise. * ld-x86-64/tlsld2.s: Likewise. * ld-x86-64/x86-64.exp (x86_64tests): Add tlsgd4, libtlsgd5.so, tlsgd5, libtlsgd6.so, tlsgd6 and tlsld2.
2011-03-03Supprt TLS x32 IE->LE transition.H.J. Lu3-0/+37
bfd/ 2011-03-03 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS x32 IE->LE transition. (elf_x86_64_relocate_section): Likewise. ld/testsuite/ 2011-03-03 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/tlsie4.dd: New. * ld-x86-64/tlsie4.s: Likewise. * ld-x86-64/x86-64.exp (x86_64tests): Add tlsie4.
2011-01-18Undo Solaris damages in elf64-x86-64.c.H.J. Lu1-2/+2
bfd/ 2011-01-18 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_backend_static_tls_alignment): Undefine after Solaris target. (elf_backend_want_plt_sym): Redefine to 0 after Solaris target. ld/testsuite/ 2011-01-18 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/ilp32-4.d: Updated.
2011-01-15Replace n32 with x32.H.J. Lu2-4/+4
2011-01-14Rename --n32 to --x32.H.J. Lu6-10/+10
gas/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (OPTION_N32): Renamed to ... (OPTION_X32): This. (md_longopts): Replace n32 with x32. (md_parse_option): Updated. (md_show_usage): Likewise. * doc/c-i386.texi: Replace n32 with x32. gas/testsuite/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/ilp32/cfi/ilp32.exp: Replace --n32 with --x32. * gas/i386/ilp32/elf/ilp32.exp: Likewise. * gas/i386/ilp32/ilp32.exp: Likewise. * gas/i386/ilp32/lns/ilp32.exp: Likewise. ld/testsuite/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/ilp32-1.d: Replace --n32 with --x32. * ld-x86-64/ilp32-2.d: Likewise. * ld-x86-64/ilp32-3.d: Likewise. * ld-x86-64/ilp32-4.d: Likewise. * ld-x86-64/ilp32-5.d: Likewise. * ld-x86-64/x86-64.exp: Likewise.
2011-01-14Handle R_X86_64_32 like R_X86_64_64 for ILP32.H.J. Lu3-0/+17
bfd/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type. (elf_x86_64_link_hash_table_create): Set pointer_r_type. (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8, R_X86_64_16, R_X86_64_32 and R_X86_64_32S. (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64 for ILP32. ld/testsuite/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/ilp32-5.d: New. * ld-x86-64/ilp32-5.s: Likewise. * ld-x86-64/x86-64.exp: Run ilp32-5.
2011-01-14Fix x86-64 ILP32 shared library.H.J. Lu2-0/+37
bfd/ 2011-01-13 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove swap_reloca_out. (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out. (elf_x86_64_check_relocs): Align relocation section to 4 byte for 32bit. (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with ELF_ST_TYPE. (elf_x86_64_finish_dynamic_symbol): Updated. (elf_x86_64_finish_dynamic_sections): Don't use Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor bfd_elf64_swap_dyn_out. ld/testsuite/ 2011-01-13 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/ilp32-4.d: New. * ld-x86-64/x86-64.exp: Run ilp32-4.
2011-01-03Don't allow mixing x64_32 with x86_64.H.J. Lu13-1/+120
bfd/ 2011-01-03 H.J. Lu <hongjiu.lu@intel.com> * cpu-i386.c (bfd_i386_compatible): New. (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible with bfd_i386_compatible. (bfd_x86_64_arch_intel_syntax): Likewise. (bfd_i386_arch_intel_syntax): Likewise. (i8086_arch): Likewise. (bfd_x64_32_arch): Likewise. (bfd_x86_64_arch): Likewise. (bfd_i386_arch): Likewise. ld/testsuite/ 2011-01-03 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/dummy.s: New. * ld-x86-64/foo.s: Likewise. * ld-x86-64/ia32-1.d: Likewise. * ld-x86-64/ia32-2.d: Likewise. * ld-x86-64/ia32-3.d: Likewise. * ld-x86-64/ilp32-1.d: Likewise. * ld-x86-64/ilp32-2.d: Likewise. * ld-x86-64/ilp32-3.d: Likewise. * ld-x86-64/lp64-1.d: Likewise. * ld-x86-64/lp64-2.d: Likewise. * ld-x86-64/lp64-3.d: Likewise. * ld-x86-64/start.s: Likewise. * ld-x86-64/x86-64.exp: Run ilp32-1, ilp32-2, ilp32-3, ia32-1, ia32-2, ia32-3, lp64-1, lp64-2 and lp64-3.
2010-10-01Add 2 tests for PR ld/11812.H.J. Lu3-0/+12
2010-09-30 H.J. Lu <hongjiu.lu@intel.com> PR ld/11812 * ld-i386/nogot2.d: New * ld-i386/nogot2.s: Likewise. * ld-x86-64/nogot2.d: Likewise. * ld-x86-64/nogot2.s: Likewise. * ld-i386/i386.exp: Run nogot2. * ld-x86-64/x86-64.exp: Likewise.
2010-09-07Add missing files.H.J. Lu2-0/+13
2010-09-07 * ldwrite.c (clone_section): Call bfd_copy_private_section_data onNick Clifton2-0/+20
newly cloned section. * ld-x86-64/split-by-file.rd: New test. * ld-x86-64/split-by-file1.s: New test source code. * ld-x86-64/split-by-file2.s: New test source code. * ld-x86-64/x86-64.exp: Run the new test. * readelf.c (process_section_headers): Mention meaning of 'l' section flag for x86-64 targets.
2010-08-24Fix typos in ld-x86-64/x86-64.exp.H.J. Lu1-2/+2
2010-08-24 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/x86-64.exp: Fix typos.
2010-08-22Don't check relocation if input ELF object ID doesn't match output.H.J. Lu5-0/+61
bfd/ 2010-08-22 H.J. Lu <hongjiu.lu@intel.com> PR ld/11933 * elflink.c (elf_link_add_object_symbols): Don't check relocation if input ELF object ID doesn't match output. ld/testsuite/ 2010-08-22 H.J. Lu <hongjiu.lu@intel.com> PR ld/11933 * ld-x86-64/mixed1a.s: New. * ld-x86-64/mixed1b.s: Likewise. * ld-x86-64/mixed2a.s: Likewise. * ld-x86-64/mixed2b.s: Likewise. * ld-x86-64/x86-64.exp: Text mixed x86_64 and i386 inputs.
2010-08-13Check if .got.plt section is discarded before using it.H.J. Lu4-0/+24
bfd/ 2010-08-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11913 * elf32-i386.c (elf_i386_finish_dynamic_sections): Check if .got.plt section is discarded. * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise. ld/testsuite/ 2010-08-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11913 * ld-i386/discarded1.d: New. * ld-i386/discarded1.s: Likewise. * ld-i386/discarded1.t: Likewise. * ld-x86-64/discarded1.d: Likewise. * ld-x86-64/discarded1.s: Likewise. * ld-x86-64/discarded1.t: Likewise. * ld-i386/i386.exp: Run discarded1. * ld-x86-64/x86-64.exp: Likewise.
2010-07-15Add testcases for PR ld/11817.H.J. Lu3-0/+191
2010-07-14 H.J. Lu <hongjiu.lu@intel.com> PR ld/11817 * ld-i386/compressed1.s: New. * ld-i386/compressed1.d: Likewise. * ld-x86-64/compressed1.s: Likewise. * ld-x86-64/compressed1.d: Likewise. * ld-i386/i386.exp: Run compressed1. * ld-x86-64/x86-64.exp: Likewise.
2010-07-14Don't allocate .got.plt section if there are no GOT nor PLT entries.H.J. Lu3-0/+19
bfd/ 2010-07-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11812 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't allocate .got.plt section if there are no GOT nor PLT entries. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise. ld/testsuite/ 2010-07-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/11812 * ld-elf/exclude3b.d: Don't run on ia64-*-*. Replace .got with .dynamic. * ld-elf/exclude3d.d: New. * ld-i386/nogot1.d: Likewise. * ld-i386/nogot1.s: Likewise. * ld-x86-64/nogot1.d: Likewise. * ld-x86-64/nogot1.s: Likewise. * ld-i386/i386.exp: Run nogot1. * ld-x86-64/x86-64.exp: Likewise.
2010-07-13Don't hard code expected output.H.J. Lu2-2/+2
2010-07-13 H.J. Lu <hongjiu.lu@intel.com> * ld-i386/hidden2.d: Don't hard code expected output. * ld-i386/protected3.d: Likewise. * ld-x86-64/hidden2.d: Likewise. * ld-x86-64/protected3.d: Likewise.
2010-04-07Don't bind unique symbol locally.H.J. Lu3-0/+20
bfd/ 2010-04-06 H.J. Lu <hongjiu.lu@intel.com> PR ld/11434 * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally. ld/testsuite/ 2010-04-06 H.J. Lu <hongjiu.lu@intel.com> PR ld/11434 * ld/testsuite/ld-x86-64/unique1.d: New. * ld/testsuite/ld-x86-64/unique1.s: Likewise. * ld-x86-64/x86-64.exp: Run unique1.
2009-11-13Rewrite prefix processing.H.J. Lu4-15/+15
gas/testsuite/ 2009-11-13 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run long-1, long-1-intel, x86-64-long-1, and x86-64-long-1-intel. * gas/i386/long-1-intel.d: New. * gas/i386/long-1.d: Likewise. * gas/i386/long-1.s: Likewise. * gas/i386/x86-64-long-1-intel.d: Likewise. * gas/i386/x86-64-long-1.d: Likewise. * gas/i386/x86-64-long-1.s: Likewise. * gas/i386/jump16.d: Updated for prefix processing. * gas/i386/naked.d: Likewise. * gas/i386/nops-1-core2.d: Likewise. * gas/i386/nops-1-i686.d: Likewise. * gas/i386/nops-3-i686.d: Likewise. * gas/i386/nops-4-i686.d: Likewise. * gas/i386/nops-5-i686.d: Likewise. * gas/i386/nops-5.d: Likewise. * gas/i386/prefix.d: Likewise. * gas/i386/rep.d: Likewise. * gas/i386/string-ok.d: Likewise. * gas/i386/x86-64-addr32-intel.d: Likewise. * gas/i386/x86-64-addr32.d: Likewise. * gas/i386/x86-64-cbw-intel.d: Likewise. * gas/i386/x86-64-cbw.d: Likewise. * gas/i386/x86-64-io-intel.d: Likewise. * gas/i386/x86-64-io-suffix.d: Likewise. * gas/i386/x86-64-io.d: Likewise. * gas/i386/x86-64-lwp.d: Likewise. * gas/i386/x86-64-nops-1-core2.d: Likewise. * gas/i386/x86-64-nops-1-nocona.d: Likewise. * gas/i386/x86-64-nops-1.d: Likewise. * gas/i386/x86-64-nops-2.d: Likewise. * gas/i386/x86-64-nops-3.d: Likewise. * gas/i386/x86-64-nops-4-core2.d: Likewise. * gas/i386/x86-64-nops-4.d: Likewise. * gas/i386/x86-64-nops-5-k8.d: Likewise. * gas/i386/x86-64-nops-5.d: Likewise. * gas/i386/x86-64-rep.d: Likewise. * gas/i386/x86-64-stack-intel.d: Likewise. * gas/i386/x86-64-stack-suffix.d: Likewise. * gas/i386/x86-64-stack.d: Likewise. ld/testsuite/ 2009-11-13 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/tlsbin.dd: Updated for prefix processing. * ld-x86-64/tlsgdesc.dd: Likewise. * ld-x86-64/tlsld1.dd: Likewise. * ld-x86-64/tlspic.dd: Likewise. opcodes/ 2009-11-13 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (ckprefix): Updated to return 0 if number of prefixes > 14 and record the last position for each prefix. (lock_prefix): Removed. (data_prefix): Likewise. (addr_prefix): Likewise. (repz_prefix): Likewise. (repnz_prefix): Likewise. (last_lock_prefix): New. (last_repz_prefix): Likewise. (last_repnz_prefix): Likewise. (last_data_prefix): Likewise. (last_addr_prefix): Likewise. (last_rex_prefix): Likewise. (last_seg_prefix): Likewise. (MAX_CODE_LENGTH): Likewise. (ADDR16_PREFIX): Likewise. (ADDR32_PREFIX): Likewise. (DATA16_PREFIX): Likewise. (DATA32_PREFIX): Likewise. (REP_PREFIX): Likewise. (seg_prefix): Likewise. (all_prefixes): Change size to MAX_CODE_LENGTH - 1. (prefix_name): Handle ADDR16_PREFIX, ADDR32_PREFIX, DATA16_PREFIX, DATA32_PREFIX and REP_PREFIX. (get_valid_dis386): Updated. (OP_C): Likewise. (OP_Monitor): Likewise. (REP_Fixup): Likewise. (print_insn): Display all prefixes. (putop): Set PREFIX_DATA on used_prefixes only if it is used. (intel_operand_size): Likewise. (OP_E_register): Likewise. (OP_G): Likewise. (OP_REG): Likewise. (OP_IMREG): Likewise. (OP_I): Likewise. (OP_I64): Likewise. (OP_sI): Likewise. (CRC32_Fixup): Likewise. (MOVBE_Fixup): Likewise. (OP_E_memory): Set REFIX_DATA on used_prefixes when it is used in 16bit mode. (OP_J): Set REX_W used if it is used. Set PREFIX_DATA on used_prefixes only if it is used.
2009-09-24bfd/H.J. Lu5-44/+44
2009-09-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/10630 * elflink.c (elf_link_output_extsym): Turn off visibility on local symbol. (bfd_elf_final_link): Turn off visibility on dynamic local symbol. ld/testsuite/ 2009-09-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/10630 * ld-alpha/tlsbin.rd: Remove HIDDEN/.hidden on local symbols. * ld-alpha/tlsbinr.rd: Likewise. * ld-alpha/tlspic.rd: Likewise. * ld-cris/libdso-2.d: Likewise. * ld-cris/locref1.d: Likewise. * ld-cris/locref2.d: Likewise. * ld-cris/tls-e-20a.d: Likewise. * ld-cris/tls-e-20.d: Likewise. * ld-cris/tls-e-80.d: Likewise. * ld-cris/tls-gc-68.d: Likewise. * ld-cris/tls-gc-69.d: Likewise. * ld-cris/tls-gc-70.d: Likewise. * ld-cris/tls-gc-75.d: Likewise. * ld-cris/tls-gc-76.d: Likewise. * ld-cris/tls-gc-79.d: Likewise. * ld-cris/tls-gd-1h.d: Likewise. * ld-cris/tls-gd-2h.d: Likewise. * ld-cris/tls-ld-4.d: Likewise. * ld-cris/tls-ld-5.d: Likewise. * ld-cris/tls-ld-6.d: Likewise. * ld-cris/tls-ld-7.d: Likewise. * ld-cris/tls-ldgd-14.d: Likewise. * ld-cris/tls-ldgd-15.d: Likewise. * ld-cris/tls-local-63.d: Likewise. * ld-cris/tls-local-64.d: Likewise. * ld-elf/pr9676.rd: Likewise. * ld-elf/pr9679.rd: Likewise. * ld-elfvsb/hidden2.d: Likewise. * ld-i386/tlsbindesc.rd: Likewise. * ld-i386/tlsbin.rd: Likewise. * ld-i386/tlsdesc.rd: Likewise. * ld-i386/tlsgdesc.rd: Likewise. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlspic.rd: Likewise. * ld-ia64/tlsbin.rd: Likewise. * ld-ia64/tlspic.rd: Likewise. * ld-powerpc/tlsexe32.r: Likewise. * ld-powerpc/tlsexe.r: Likewise. * ld-powerpc/tlsexetoc.r: Likewise. * ld-powerpc/tlsso32.r: Likewise. * ld-powerpc/tlsso.r: Likewise. * ld-powerpc/tlstocso.r: Likewise. * ld-s390/tlsbin_64.rd: Likewise. * ld-s390/tlsbin.rd: Likewise. * ld-s390/tlspic_64.rd: Likewise. * ld-s390/tlspic.rd: Likewise. * ld-sparc/gotop32.rd: Likewise. * ld-sparc/gotop64.rd: Likewise. * ld-sparc/tlssunbin32.rd: Likewise. * ld-sparc/tlssunbin64.rd: Likewise. * ld-sparc/tlssunnopic32.rd: Likewise. * ld-sparc/tlssunnopic64.rd: Likewise. * ld-sparc/tlssunpic32.rd: Likewise. * ld-sparc/tlssunpic64.rd: Likewise. * ld-x86-64/tlsbindesc.rd: Likewise. * ld-x86-64/tlsbin.rd: Likewise. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlsgdesc.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise. * ld-xtensa/tlsbin.rd: Likewise. * ld-xtensa/tlspic.rd: Likewise. * ld-elf/local1.d: New. * ld-elf/local1.map: Likewise. * ld-elf/local1.s: Likewise. * ld-ia64/local1.d: Likewise. * ld-ia64/local1.map: Likewise. * ld-ia64/local1.s: Likewise.