Commit Graph

9833 Commits

Author SHA1 Message Date
Alan Modra a1ad3e4c95 daily update 2012-07-18 00:00:05 +00:00
Alan Modra 2e84b6bfc2 daily update 2012-07-17 00:00:04 +00:00
Alan Modra 6817161ed4 daily update 2012-07-16 00:00:05 +00:00
Alan Modra ed9598823a daily update 2012-07-15 00:00:04 +00:00
Alan Modra 871bd9bf73 daily update 2012-07-14 00:00:04 +00:00
Andreas Krebbel 470b557aaf 2012-07-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* elf64-s390.c: Include elf-s390-common.c.
	(R_390_IRELATIVE): New reloc.
	(elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
	(RELA_ENTRY_SIZE): New macro.
	(elf_s390_link_hash_entry): New fields ifunc_resolver_address and
	*ifunc_resolver_section.
	(struct plt_entry): New struct.
	(struct elf_s390_obj_tdata): New field local_plt.
	(elf_s390_local_plt): New macro.
	(struct elf_s390_link_hash_table): New field irelifunc.
	(ELF64): New macro.
	(link_hash_newfunc): Initialize new fields.
	(elf_s390_check_relocs): Handle IFUNC symbols.
	(elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
	symbols.
	(allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
	IFUNC symbols.
	(elf_s390_size_dynamic_sections): Handle IFUNC symbols.
	(elf_s390_relocate_section): Likewise.
	(elf_s390_finish_dynamic_symbol): Likewise.
	(elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
	(elf_s390_finish_ifunc_symbol): New function.
	(elf_s390_gc_sweep_hook): Handle local plt entries.
	(elf_backend_add_symbol_hook): Define.
	* elf32-s390.c: See elf64-s390.c changes.
	* elf-s390-common.c: New file.
	* bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
	* libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
	BFD_RELOC_390_IRELATIVE.
	* reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.

2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* elf/s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc.

2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* emulparams/elf_s390.sh (IREL_IN_PLT): Define.
	* emulparams/elf64_s390.sh (IREL_IN_PLT): Define.
2012-07-13 15:47:27 +00:00
Nick Clifton 2c3fc38946 * aix386-core.c: Remove use of PTR and PARAMS macros.
* archive.c: Likewise.
	* cache.c: Likewise.
	* cisco-core.c: Likewise.
	* coff-alpha.c: Likewise.
	* coff-apollo.c: Likewise.
	* coff-aux.c: Likewise.
	* coff-h8300.c: Likewise.
	* coff-h8500.c: Likewise.
	* coff-i386.c: Likewise.
	* coff-i960.c: Likewise.
	* coff-ia64.c: Likewise.
	* coff-m68k.c: Likewise.
	* coff-m88k.c: Likewise.
	* coff-mcore.c: Likewise.
	* coff-mips.c: Likewise.
	* coff-or32.c: Likewise.
	* coff-ppc.c: Likewise.
	* coff-rs6000.c: Likewise.
	* coff-sh.c: Likewise.
	* coff-sparc.c: Likewise.
	* coff-stgo32.c: Likewise.
	* coff-tic30.c: Likewise.
	* coff-tic4x.c: Likewise.
	* coff-tic54x.c: Likewise.
	* coff-tic80.c: Likewise.
	* coff-w65.c: Likewise.
	* cofflink.c: Likewise.
	* cpu-arc.c: Likewise.
	* cpu-cris.c: Likewise.
	* cpu-h8500.c: Likewise.
	* cpu-i960.c: Likewise.
	* cpu-msp430.c: Likewise.
	* cpu-ns32k.c: Likewise.
	* cpu-powerpc.c: Likewise.
	* cpu-rs6000.c: Likewise.
	* cpu-tic4x.c: Likewise.
	* cpu-w65.c: Likewise.
	* ecoff.c: Likewise.
	* ecofflink.c: Likewise.
	* elf-m10200.c: Likewise.
	* elf32-bfin.c: Likewise.
	* elf32-cris.c: Likewise.
	* elf32-crx.c: Likewise.
	* elf32-fr30.c: Likewise.
	* elf32-frv.c: Likewise.
	* elf32-h8300.c: Likewise.
	* elf32-i960.c: Likewise.
	* elf32-m32c.c: Likewise.
	* elf32-m68hc11.c: Likewise.
	* elf32-m68hc12.c: Likewise.
	* elf32-m68hc1x.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mcore.c: Likewise.
	* elf32-rl78.c: Likewise.
	* elf32-rx.c: Likewise.
	* elf32-s390.c: Likewise.
	* elf32-vax.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-mmix.c: Likewise.
	* elf64-s390.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elfnn-ia64.c: Likewise.
	* elfxx-mips.c: Likewise.
	* elfxx-sparc.c: Likewise.
	* hash.c: Likewise.
	* hp300hpux.c: Likewise.
	* hppabsd-core.c: Likewise.
	* hpux-core.c: Likewise.
	* i386dynix.c: Likewise.
	* i386linux.c: Likewise.
	* i386lynx.c: Likewise.
	* i386mach3.c: Likewise.
	* i386msdos.c: Likewise.
	* i386os9k.c: Likewise.
	* irix-core.c: Likewise.
	* lynx-core.c: Likewise.
	* m68klinux.c: Likewise.
	* mach-o.h: Likewise.
	* mipsbsd.c: Likewise.
	* netbsd-core.c: Likewise.
	* nlm32-i386.c: Likewise.
	* osf-core.c: Likewise.
	* pc532-mach.c: Likewise.
	* pef.c: Likewise.
	* ppcboot.c: Likewise.
	* ptrace-core.c: Likewise.
	* reloc16.c: Likewise.
	* sco5-core.c: Likewise.
	* som.h: Likewise.
	* sparclinux.c: Likewise.
	* sparclynx.c: Likewise.
	* ticoff.h: Likewise.
	* trad-core.c: Likewise.
	* vms-lib.c: Likewise.
	* xsym.h: Likewise.
2012-07-13 14:22:50 +00:00
Alan Modra f1b8e226de daily update 2012-07-13 00:00:04 +00:00
Alan Modra 8c6d03e711 daily update 2012-07-12 00:00:04 +00:00
Alan Modra cedbfe6825 daily update 2012-07-11 00:00:05 +00:00
Alan Modra c06853bb15 daily update 2012-07-10 00:00:03 +00:00
Alan Modra 1416057852 PR ld/14323
* elflink.c (elf_sort_symbol): Sort by size too.
	(elf_link_add_object_symbols <weakdefs>): Simplify binary search.
	Do not depend on ordering of symbol aliases.  Match largest size.
2012-07-09 08:17:34 +00:00
Alan Modra 2e515f7e37 daily update 2012-07-09 00:00:04 +00:00
Alan Modra 461be744ee daily update 2012-07-08 00:00:06 +00:00
Alan Modra f33353ae21 daily update 2012-07-07 00:00:04 +00:00
Alan Modra 51fe2ab425 daily update 2012-07-06 00:00:04 +00:00
Alan Modra 0a56835690 daily update 2012-07-05 00:00:04 +00:00
H.J. Lu 1c52a64577 Check number of sections overflow
* elf.c (assign_section_numbers): Check if number of sections
	>= SHN_LORESERVE.
	* elfcode.h (elf_object_p): Likewise.
2012-07-04 00:29:52 +00:00
Alan Modra e37fa14346 daily update 2012-07-04 00:00:05 +00:00
Nick Clifton 5f8ebec53d * archive.c (bsd_write_armap): Catch attempts to create an archive
with indicies bigger than 4Gb.
	(coff_write_armap): Likewise.

	* readelf.c (process_archive): Display member indicies when
	dumping index.
2012-07-03 16:25:17 +00:00
H.J. Lu 5a5ed5b0e4 Don't compress empty debug section
2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/14319
	* elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty
	debug section.

2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/14319
	* binutils-all/compress.exp: Test compress empty debug sections.

	* binutils-all/dw2-empty.S: New file.
2012-07-03 16:06:34 +00:00
H.J. Lu 90c984fc53 Properly handle indirect symbols
2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3351
	* elflink.c (_bfd_elf_update_dynamic_flags): New.
	(_bfd_elf_merge_symbol): Update both real and indirect symbol
	dynamic flags.
	(_bfd_elf_add_default_symbol): Make the real symbol dynamic if
	the indirect symbol is defined in a shared library.
	(elf_link_add_object_symbols): Likewise.  If the indirect
	symbol has been forced local, don't make the real symbol
	dynamic.
	(elf_link_check_versioned_symbol): Check indirect symbol.
	(elf_link_output_extsym): Use real symbol definition when
	reporting indirect symbol error.  Check version info for
	dynamic versioned symbol.

2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3351
	* ld-elf/indirect.exp: New file.
	* ld-elf/indirect1a.c: Likewise.
	* ld-elf/indirect1b.c: Likewise.
	* ld-elf/indirect1c.c: Likewise.
	* ld-elf/indirect2.c: Likewise.
	* ld-elf/indirect3.out: Likewise.
	* ld-elf/indirect3a.c: Likewise.
	* ld-elf/indirect3b.c: Likewise.
	* ld-elf/indirect3c.c: Likewise.
	* ld-elf/indirect4.out: Likewise.
	* ld-elf/indirect4a.c: Likewise.
	* ld-elf/indirect4b.c: Likewise.
	* ld-elf/indirect4c.c: Likewise.
2012-07-03 14:44:35 +00:00
Alan Modra 3146fac428 PR ld/14207
* elf.c (assign_file_positions_for_load_sections): Remove assertions
	that only PT_LOAD headers include file header and section headers.
	(assign_file_positions_for_non_load_sections): Similarly don't
	assert PT_GNU_RELRO header does not include file and section headers.
	Compare first section vma rather than PT_LOAD p_vaddr against
	relro_start when looking for PT_LOAD covering PT_GNU_RELRO.  Replace
	abort with assertion.
2012-07-03 05:47:35 +00:00
Alan Modra 3da732519b daily update 2012-07-03 00:00:04 +00:00
Alan Modra 87e0a731c8 * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section
"anyway" variant when creating .plt.
	(m32c_elf_relax_plt_section): Remove redundant test and unused param.
	(m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling
	m32c_elf_relax_plt_section.
	* elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant
	when creating .got and .got.plt.
	(_bfd_mips_elf_final_link): Likewise for .rtproc, and use
	bfd_get_linker_section.
	* sunos.c: Similarly throughout.
2012-07-02 03:02:45 +00:00
Alan Modra 8de28c9ef6 daily update 2012-07-02 00:00:04 +00:00
Andreas Schwab bc823199d1 * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error
message.
2012-07-01 08:23:13 +00:00
Alan Modra 4a84e058e5 daily update 2012-07-01 00:00:04 +00:00
Alan Modra 9eaa1654f1 daily update 2012-06-30 00:00:05 +00:00
H.J. Lu a040981f62 Return FALSE on unresolvable relocation
* elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
	on unresolvable relocation.
2012-06-29 21:54:44 +00:00
H.J. Lu d5abbdf3c1 Simplify global symbol handling
* archive.c (_bfd_compute_and_write_armap): Simplify global
	symbol handling.
2012-06-29 17:36:21 +00:00
Nick Clifton a8c887ddc5 PR ld/14189
* elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
	for locally bound symbols.
2012-06-29 15:20:30 +00:00
Alan Modra 3d4d4302b9 * section.c (bfd_get_linker_section): New function.
* elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use
	the above throughout rather than bfd_get_section_by_name.  Use
	bfd_make_section_anyway rather than bfd_make_section when creating
	them.
	* elf32-bfin.c: Likewise.
	* elf32-cr16.c: Likewise.
	* elf32-cris.c: Likewise.
	* elf32-frv.c: Likewise.
	* elf32-hppa.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf32-i386.c: Likewise.
	* elf32-lm32.c: Likewise.
	* elf32-m32c.c: Likewise.
	* elf32-m32r.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-microblaze.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-rl78.c: Likewise.
	* elf32-s390.c: Likewise.
	* elf32-score.c: Likewise.
	* elf32-score7.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-tic6x.c: Likewise.
	* elf32-tilepro.c: Likewise.
	* elf32-vax.c: Likewise.
	* elf32-xstormy16.c: Likewise.
	* elf32-xtensa.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-hppa.c: Likewise.
	* elf64-ia64-vms.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-s390.c: Likewise.
	* elf64-sh64.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* elfnn-ia64.c: Likewise.
	* elfxx-mips.c: Likewise.
	* elfxx-sparc.c: Likewise.
	* elfxx-tilegx.c: Likewise.
	* elflink.c: Likewise.
	* elf-vxworks.c: Likewise.
	* elf-m10300.c: Likewise.  Also make use of htab plt, got and
	gotplt shortcuts.
	* bfd-in2.h: Regenerate.
	* elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when
	calling create_rofixup_section.
	* elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
2012-06-29 14:46:03 +00:00
Alan Modra 66e17d7f53 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela
section for bss type sections, except for .rela.bss.
	* elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
	* elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise.
	* elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise.
	* elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
	* elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
2012-06-29 07:37:50 +00:00
Alan Modra bd2e36c1da daily update 2012-06-29 00:00:05 +00:00
Sean Keys fe54041627 gas/config/
* tc-xgate.h: Defined tc_frob_symbol.
	* tc-xgate.c (xgate_frob_symbol): Wrote new function to mark
	  symbols as being XGATE by setting st_target_internal value.

bfd/
	* elf32-xgate.c (elf32_xgate_add_symbol_hook): Added a temp patch
	  that forces st_target_internal to equal 1, since tc_frob_symbol
	  seems to need adjusting.
2012-06-28 21:36:35 +00:00
Roland McGrath 6034aab8a1 bfd/
* elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for
	displacement calculation in nacl_p case.
2012-06-28 16:57:24 +00:00
Nick Clifton 4c6a93d362 * po/vi.po: Updated Vietnamese translation.
* po/uk.po: New Ukranian translation.
	* configure.in (ALL_LINGUAS): Add uk.
	* configure: Regenerate.
2012-06-28 14:36:01 +00:00
Alan Modra d26281a3fc daily update 2012-06-28 00:00:04 +00:00
Alan Modra f7ccda615a daily update 2012-06-27 00:00:05 +00:00
Alan Modra a4fd3de5d3 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
file has multiple .got/.toc sections and all don't fit in
	current toc group.
2012-06-26 01:40:59 +00:00
Alan Modra e01efe68d4 daily update 2012-06-26 00:00:05 +00:00
Alan Modra 8eb3f24a99 daily update 2012-06-25 00:00:05 +00:00
Alan Modra 5a0196faca daily update 2012-06-24 00:00:04 +00:00
Alan Modra 069db2a3fe daily update 2012-06-23 00:00:04 +00:00
Roland McGrath 62655c7b8b bfd/
* elf.c (assign_file_positions_for_non_load_sections): Define
	__ehdr_start symbol if it's referenced and there's a PT_LOAD
	segment that covers both the file and program headers.

ld/
	* NEWS: Mention __ehdr_start.

ld/testsuite/
	* ld-elf/ehdr_start.s: New file.
	* ld-elf/ehdr_start.d: New file.
2012-06-22 16:52:33 +00:00
Andreas Schwab b70e7a2fdf * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make
_GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute.
2012-06-22 09:30:18 +00:00
Alan Modra 27fc25a1a9 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
save/restore functions when relocatable.  Make "funcs" static.
2012-06-22 05:53:04 +00:00
Alan Modra dedde98681 daily update 2012-06-22 00:00:05 +00:00
Alan Modra e7c706a741 daily update 2012-06-21 00:00:04 +00:00