Commit Graph

9612 Commits

Author SHA1 Message Date
Alan Modra a66eed7a5d * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
libraries.
2012-03-29 23:17:37 +00:00
Alan Modra 0c1f93989b daily update 2012-03-29 23:00:05 +00:00
Alan Modra f67f98b55b * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
* bfd-in2.h: Regenerate.
2012-03-29 13:22:43 +00:00
Alan Modra 0643b94473 daily update 2012-03-28 23:00:04 +00:00
Alan Modra 921deac4aa daily update 2012-03-27 23:00:05 +00:00
Alan Modra 87a6f30243 daily update 2012-03-26 23:00:04 +00:00
Alan Modra b411de145e daily update 2012-03-25 23:00:05 +00:00
Alan Modra 361ac46c6d daily update 2012-03-24 23:00:05 +00:00
Alan Modra 203d9758b3 daily update 2012-03-23 23:00:06 +00:00
Alan Modra e8d2ba5354 * elf.c (assign_file_positions_for_non_load_sections): Don't warn
on empty alloc sections.
2012-03-23 09:34:57 +00:00
Alan Modra 051d833a41 * linker.c (_bfd_nearby_section): New function, split out from..
(fix_syms): ..here.
	* bfd-in.h (_bfd_nearby_section): Declare.
	* bfd-in2.h: Regenerate.
	* elflink.c (elf_link_input_bfd): Don't use text_index_section or
	data_index_section with ld -q or ld -r output relocs against
	stripped output sections.  Instead use _bfd_nearby_section.
2012-03-23 09:27:43 +00:00
Alan Modra 62599110be PR binutils/13894
* elf64-ppc.c (opd_entry_value): Read full symbol table when
	sym hashes unavailable.
2012-03-23 06:41:21 +00:00
Alan Modra fc90a9c610 daily update 2012-03-22 23:00:05 +00:00
Alan Modra 5255715a40 daily update 2012-03-21 23:00:05 +00:00
Joseph Myers b781d74fe1 2012-03-21 Eliot Dresselhaus <eliot@sonic.net>
* elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
	for non-C6X objects.
2012-03-21 14:55:45 +00:00
Alan Modra a319231e66 daily update 2012-03-20 23:00:05 +00:00
Kai Tietz 17d5dae239 PR ld/12742
* configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
        * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
        Add windows.h header include if HAVE_WINDOWS_H is defined.
        (dlerror): New static function if windows variant is used instead
        of dlfcn.h.
        (dlclose): Likewise.
        (dlopen): Likewise.
        (dlsym): Likewise.
        * configure: Regenerated.
        * config.in: Regenerated.
2012-03-20 19:24:32 +00:00
H.J. Lu bdb892b995 Handle relocation against protected function for -Bsymbolic
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-20 18:16:38 +00:00
Alan Modra e918b09c1c daily update 2012-03-19 23:00:05 +00:00
Alan Modra 371cf10e70 daily update 2012-03-18 23:00:05 +00:00
Alan Modra 1c4c34148c daily update 2012-03-17 23:00:05 +00:00
Roland McGrath 8059fb196e bfd/
2012-03-16  Roland McGrath  <mcgrathr@google.com>

	* config.bfd: Handle x86_64-*-nacl*.
	* elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
	(bfd_elf32_x86_64_nacl_vec): Likewise.
	* targets.c: Support them.
	* configure.in: Likewise.
	* configure: Regenerated.

gas/
2012-03-16  Roland McGrath  <mcgrathr@google.com>

	* config/tc-i386.h [TE_NACL] (ELF_TARGET_FORMAT32, ELF_TARGET_FORMAT64):
	Define for this case.
	* configure.tgt (i386-*-nacl*): If ${cpu} is x86_64*, default to x32.
2012-03-16 23:19:47 +00:00
Alan Modra b2ecfddf1c daily update 2012-03-16 23:00:05 +00:00
Matthew Gretton-Dann ac56ee8f4c * bfd/elf32-arm.c (elf32_arm_attributes_accept_div): New function.
(elf32_arm_attributes_forbid_div): Likewise.
	(elf32_arm_merge_eabi_attributes): Correct handling of
	Tag_DIV_use.
2012-03-16 15:15:14 +00:00
Alan Modra de4a15510f daily update 2012-03-15 23:00:05 +00:00
Roland McGrath a4456d242d * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
elf_x86_64_backend_data parameters for plt_eh_frame.

Change-Id: I4e1a7c2787ed1276765e269f50fc8ba89bab41d5
2012-03-15 18:20:22 +00:00
Roland McGrath eed180f84c * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
(get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
	(elf_x86_64_arch_bed): New variable.
	(elf_backend_arch_data): New macro.
	(elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
	(elf_x86_64_allocate_dynrelocs): Likewise.
	(elf_x86_64_relocate_section): Likewise.
	(elf_x86_64_plt_sym_val): Likewise.
	(elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
	parameters for PLT details.
	(elf_x86_64_finish_dynamic_sections): Likewise.
2012-03-15 16:37:25 +00:00
Alan Modra 9eca3be1dd daily update 2012-03-14 23:00:05 +00:00
Roland McGrath caa0075c38 * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
to the full size, padding out with nop instructions.
2012-03-14 19:32:11 +00:00
Alan Modra 5bed0268de daily update 2012-03-13 23:00:05 +00:00
Alan Modra 1d7e9d183f * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't error
on zero size dynbss symbol.
	* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
	* elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
	* elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
	* elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
	* elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
	* elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
	* elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
	* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
	* elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
	* elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
	* elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
	* elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
	* elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
	* elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
	* elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
	* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
	* elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
2012-03-13 06:04:37 +00:00
Alan Modra 894631572d daily update 2012-03-12 23:00:07 +00:00
Alan Modra 43b1a91f0a daily update 2012-03-11 23:00:05 +00:00
Alan Modra a094e1ce32 daily update 2012-03-10 23:00:04 +00:00
Alan Modra aea77599d0 include/opcode/
* ppc.h: Add PPC_OPCODE_ALTIVEC2, PPC_OPCODE_E6500, PPC_OPCODE_TMR.
opcodes/
	* ppc-dis.c (ppc_opts): Add entries for "e5500" and "e6500".
	* ppc-opc.c (insert_ls, TMR, ESYNC, XSYNCLE_MASK): New.
	(PPCVEC2, PPCTMR, E6500): New short names.
	(powerpc_opcodes): Add vabsdub, vabsduh, vabsduw, dni, mvidsplt,
	mviwsplt, icblq., mftmr, mttmr, dcblq., miso, lvexbx, lvexhx,
	lvexwx, stvexbx, stvexhx, stvexwx, lvepx, lvepxl, stvepx, stvepxl,
	lvtrx, lvtrxl, lvtlx, lvtlxl, stvfrx, stvfrxl, stvflx, stvflxl,
	lvswx, lvswxl, stvswx, stvswxl, lvsm mnemonics. Accept LS, ESYNC
	optional operands on sync instruction for E6500 target.
bfd/
	* archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
	* bfd-in2.h: Regenerate.
	* cpu-powerpc.c (bfd_powerpc_archs): Add entryies for
	bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
gas/
	* config/tc-ppc.c (md_show_usage): Document -me5500 and -me6500.
	(ppc_handle_align): Add termination nop opcode for e500mc family.
	* doc/as.texinfo: Document options -me5500 and -me6500.
	* doc/c-ppc.texi: Likewise.
gas/testsuite/
	* gas/ppc/e500mc64_nop.s: New test case for e500mc family
	termination nops.
	* gas/ppc/e500mc64_nop.d: Likewise.
	* gas/ppc/e5500_nop.s: Likewise.
	* gas/ppc/e5500_nop.d: Likewise.
	* gas/ppc/e6500_nop.s: Likewise.
	* gas/ppc/e6500_nop.d: Likewise.
	* gas/ppc/e6500.s: New.
	* gas/ppc/e6500.d: Likewise.
	* gas/ppc/ppc.exp: Run e6500, e500mc64_nop, e5500_nop, and e6500_nop.
2012-03-09 23:39:06 +00:00
Alan Modra 15985358e6 daily update 2012-03-09 23:00:05 +00:00
H.J. Lu 56b8aada47 Restore R_386_IRELATIVE and R_X86_64_IRELATIVE
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-03-09 16:28:38 +00:00
Alan Modra 491f66ba2b daily update 2012-03-08 23:00:06 +00:00
Tristan Gingold 460f1cdc3f 2012-03-08 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
	keylen according to archive kind.  Set nextvbn and nextrfa lhd
	fields.  Add comments.
2012-03-08 14:25:29 +00:00
Alan Modra 9fdc551be7 daily update 2012-03-07 23:00:05 +00:00
Nick Clifton 0a22ae8eb5 * mn10300.h (elf_mn10300_reloc_type): Add R_MN10300_TLS_GD,
R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
	R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
	R_MN10300_TLS_DTPOFF and R_MN10300_TLS_TPOFF.

	* elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
	field.
	(elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
	(elf_mn10300_tdata): Define.
	(elf_mn10300_local_got_tls_type): Define.
	(elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
	R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
	R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
	R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
	(mn10300_reloc_map): Likewise.
	(elf_mn10300_tls_transition): New function.
	(dtpoff, tpoff, mn10300_do_tls_transition): New functions.
	(mn10300_elf_check_relocs): Add TLS support.
	(mn10300_elf_final_link_relocate): Likewise.
	(mn10300_elf_relocate_section): Likewise.
	(mn10300_elf_relax_section): Likewise.
	(elf32_mn10300_link_hash_newfunc): Initialise new field.
	(_bfd_mn10300_copy_indirect_symbol): New function.
	(elf32_mn10300_link_hash_table_create): Initialise new fields.
	(_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
	(_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
	(_bfd_mn10300_elf_reloc_type_class): Allocate an
	elf_mn10300_obj_tdata structure.
	(elf_backend_copy_indirect_symbol): Define.
	* reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
	BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
	BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
	BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
	(BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
	alongside other MN10300 relocations.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

	* config/tc-mn10300.c (other_registers): Add SSP and USP.
	(md_assemble): Add support for TLS relocs.
	(mn10300_parse_name): Likewise.

	* readelf.c (is_16bit_abs_reloc): Add detection of R_MN10300_16.
2012-03-07 17:52:00 +00:00
Alan Modra 9f3bdf60f9 daily update 2012-03-06 23:00:04 +00:00
Jakub Jelinek 3ce231f8e2 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
set relocate to TRUE.
2012-03-06 20:15:56 +00:00
Alan Modra d9cb611b57 daily update 2012-03-05 23:00:05 +00:00
Rainer Orth 0bef263a74 PR ld/12152
* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
	overflows for R_SPARC_UA32 in .stab sections.
2012-03-05 16:02:19 +00:00
Alan Modra 92dd1f05e1 daily update 2012-03-04 23:00:05 +00:00
Alan Modra f108d3e4e7 daily update 2012-03-03 23:00:05 +00:00
Alan Modra 4cb07424db daily update 2012-03-02 23:00:05 +00:00
Alan Modra b38716c63a daily update 2012-03-01 23:00:05 +00:00
Alan Modra 84abc003c2 * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning. 2012-03-01 01:55:11 +00:00