Commit Graph

10347 Commits

Author SHA1 Message Date
Alan Modra 461f3ab781 daily update 2013-01-02 23:00:06 +00:00
Nick Clifton bab4becb12 opcodes/ChangeLog
* cr16-dis.c (match_opcode,make_instruction: Remove static declaration.
	(dwordU,wordU): Moved typedefs to opcode/cr16.h
	(cr16_words,cr16_allWords,cr16_currInsn): Added prefix 'cr16_'

bfd/Changelog
	* config.bfd (cr16*-*-uclinux*): New target support.

include/opcode/ChangeLog
	* cr16.h (dwordU,wordU): Moved typedefs from cr16-dis.c
	(make_instruction,match_opcode): Added function prototypes.
	(cr16_words,cr16_allWords,cr16_currInsn): Declare as extern.
2013-01-02 13:13:36 +00:00
Alan Modra 4bc2b8b71d daily update 2013-01-01 23:00:05 +00:00
Alan Modra b861b889bd daily update 2012-12-31 23:00:05 +00:00
Alan Modra 4ac4775446 daily update 2012-12-30 23:00:05 +00:00
Alan Modra d9929638ce daily update 2012-12-29 23:00:06 +00:00
Alan Modra 4ab7dc04b7 daily update 2012-12-28 23:00:06 +00:00
Alan Modra 879c6bba6a daily update 2012-12-27 23:00:04 +00:00
Alan Modra ac89cf5f88 daily update 2012-12-26 23:00:05 +00:00
Alan Modra 057fa683cd daily update 2012-12-25 23:00:06 +00:00
Alan Modra 0e06cf6e68 daily update 2012-12-24 23:00:05 +00:00
Mike Frysinger 884f2a8d06 bfd: also enable x86_64pei_vec for 64bit i386-linux targets
We enable x86_64pei_vec for x86_64-linux targets, so we should list this
in the 64bit i386-linux vec section.  This is useful for when we want to
build 64bit EFI code on an i386 system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-24 02:47:51 +00:00
Alan Modra 25ff34673a daily update 2012-12-23 23:00:04 +00:00
Alan Modra e74738c35e daily update 2012-12-22 23:00:05 +00:00
Alan Modra ddd2e71547 daily update 2012-12-21 23:00:06 +00:00
H.J. Lu 9911c0fc43 Check R_X86_64_standard for unrecognized relocation
* elf64-x86-64.c (elf_x86_64_relocate_section): Check
	R_X86_64_standard instead of R_X86_64_max for unrecognized
	relocation.
2012-12-21 20:54:59 +00:00
H.J. Lu a5479e5ff4 Properly adjust h->plt.refcount
bfd/

	PR ld/14980
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly
	adjust h->plt.refcount.
	* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.

ld/testsuite/

	PR ld/14980
	* ld-ifunc/ifunc-14c.s: New file.
	* ld-ifunc/ifunc-14e-i386.d: Likewise.
	* ld-ifunc/ifunc-14e-x86-64.d: Likewise.
	* ld-ifunc/ifunc-14f-i386.d: Likewise.
	* ld-ifunc/ifunc-14f-x86-64.d: Likewise.
2012-12-21 18:15:22 +00:00
Alan Modra 1a5f1c8701 daily update 2012-12-20 23:00:05 +00:00
Alan Modra b83a921078 daily update 2012-12-19 23:00:04 +00:00
H.J. Lu c3b0209786 Fix indentation in the last checkin 2012-12-19 19:50:40 +00:00
H.J. Lu 59d6ffb2c9 Fix and use elf_append_rel
* elf32-i386.c (elf_i386_relocate_section): Replace
	bfd_elf32_swap_reloc_out with elf_append_rel.
	(elf_i386_finish_dynamic_symbol): Likewise.

	* elflink.c (elf_append_rel): Call swap_reloc_out instead of
	swap_reloca_out.
2012-12-19 19:45:43 +00:00
H.J. Lu 13ca314985 Reindent elf_i386_finish_dynamic_symbol
* elf32-i386.c (elf_i386_finish_dynamic_symbol): Reindent.
2012-12-19 19:41:18 +00:00
Alan Modra af1fd9e052 daily update 2012-12-18 23:00:04 +00:00
Michael Eager 886e427f80 PR ld/14736
bfd:
	* elf32-microblaze.c (calc_fixup): Add end range.
gas/testsuite:
	* gas/microblaze/relax_size.exp: New file - test object size after linker
	relaxation
	* gas/microblaze/relax_size.s: Likewise
	* gas/microblaze/relax_size.elf: Likewise
	* gas/microblaze/relax_size2.s: Likewise
	* gas/microblaze/relax_size2.elf: Likewise
2012-12-18 16:01:02 +00:00
Alan Modra 15bc576af1 * elf.c (swap_out_syms): Set shndx to SHN_ABS when not one of
the special MAP_* values.
2012-12-18 13:25:46 +00:00
Alan Modra 614b686180 daily update 2012-12-17 23:00:08 +00:00
Roland McGrath adbcc655b4 bfd/
* elf32-arm.c (elf32_arm_size_stubs): Skip input BFDs that are
	not ARM ELF.
2012-12-17 19:13:07 +00:00
Nick Clifton 5bf135a788 Add copyright notices 2012-12-17 16:56:12 +00:00
H.J. Lu ad1e85de41 Don't check IFUNC relocations in elf_*_check_relocs
* elf32-i386.c (elf_i386_check_relocs): Don't check IFUNC
	relocations here.
	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2012-12-16 23:01:13 +00:00
Alan Modra b6eb2f8639 daily update 2012-12-16 23:00:07 +00:00
H.J. Lu 73bcf23385 Also check local IFUNC references
bfd/

	PR ld/14968
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Also check
	local IFUNC references.
	* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.

ld/testsuite/

	PR ld/14968
	* ld-ifunc/ifunc-18a-i386.d: New file.
	* ld-ifunc/ifunc-18a-x86-64.d: Likewise.
	* ld-ifunc/ifunc-18a.s: Likewise.
	* ld-ifunc/ifunc-18b-i386.d: Likewise.
	* ld-ifunc/ifunc-18b-x86-64.d: Likewise.
	* ld-ifunc/ifunc-18b.s: Likewise.
	* ld-ifunc/ifunc-19a-i386.d: Likewise.
	* ld-ifunc/ifunc-19a-x86-64.d: Likewise.
	* ld-ifunc/ifunc-19a.s: Likewise.
	* ld-ifunc/ifunc-19b-i386.d: Likewise.
	* ld-ifunc/ifunc-19b-x86-64.d: Likewise.
	* ld-ifunc/ifunc-19b.s: Likewise.
2012-12-16 20:31:08 +00:00
Alan Modra 987acc137d daily update 2012-12-15 23:00:05 +00:00
Alan Modra 774094928e daily update 2012-12-14 23:00:05 +00:00
Tom Tromey 451b7c33cb gdb
* NEWS: Mention "info proc" and core files.
        * corelow.c (core_info_proc): New function.
        (init_core_ops): Set to_info_proc.
        * gdbarch.c, gdbarch.h: Rebuild.
        * gdbarch.sh (core_info_proc): New method.
        * infcmd.c (info_proc_cmd_1): Invoke target_info_proc first.
        * linux-tdep.c (linux_core_info_proc_mappings)
        (linux_core_info_proc): New functions.
        (linux_find_memory_region_ftype): New typedef.
        (linux_find_memory_regions_full): New function, from
        linux_find_memory_regions.
        (struct linux_find_memory_regions_data): New.
        (linux_find_memory_regions_thunk): New function.
        (linux_find_memory_regions): Rewrite.
        (struct linux_make_mappings_data): New.
        (linux_make_mappings_callback)
        (linux_make_mappings_corefile_notes): New functions.
        (linux_make_corefile_notes): Call linux_make_mappings_corefile_notes.
        (linux_init_abi): Call set_gdbarch_core_info_proc.
        * target.c (target_info_proc): Return 'int'.
        * target.h (target_info_proc): Update.
gdb/doc
        * gdb.texinfo (SVR4 Process Information): Mention core files.
gdb/testsuite
        * gdb.base/info-proc.exp: Add core file tests.
bfd
        * elf.c (elfcore_grok_note) <NT_FILE>: New case.
2012-12-14 15:30:38 +00:00
Alan Modra 62ea864c39 daily update 2012-12-14 00:36:48 +00:00
H.J. Lu 5ca5bb3545 Check local IFUNC calls
bfd/

2012-12-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14956
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Check local
	IFUNC calls.
	* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.

ld/testsuite/

2012-12-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14956
	* ld-ifunc/ifunc-14-i386.d: Renamed to ...
	* ld-ifunc/ifunc-14a-i386.d: This.

	* ld-ifunc/ifunc-14-x86-64.d: Renamed to ...
	* ld-ifunc/ifunc-14a-x86-64.d: This.

	* ld-ifunc/ifunc-14b-i386.d: New file.
	* ld-ifunc/ifunc-14b-x86-64.d: Likewise.
	* ld-ifunc/ifunc-14c-i386.d: Likewise.
	* ld-ifunc/ifunc-14c-x86-64.d: Likewise.
	* ld-ifunc/ifunc-14d-i386.d: Likewise.
	* ld-ifunc/ifunc-14d-x86-64.d: Likewise.
2012-12-13 21:07:16 +00:00
Alan Modra 7b40ae6136 daily update 2012-12-12 23:00:04 +00:00
Alan Modra 7fdee5dead daily update 2012-12-11 23:00:04 +00:00
Michael Eager 69b06cc85f Microblaze: Add support for handling TLS symbol suffixes and generating
TLS relocs for General Dynamic and Local Dynamic models.

bfd/Changelog
          * reloc.c: Add new relocations
          * bfd-in2.h: Regenerated
          * libbfd.h: Regenerated
          * elf32-microblaze.c (microblaze_elf_howto_raw):
            Add TLS relocations
            (microblaze_elf_reloc_type_lookup): Likewise
            (elf32_mb_link_hash_entry): define TLS reference types
            (elf32_mb_link_hash_table): add TLS Local dynamic GOT entry
            #define has_tls_reloc if section has TLS relocs
            (dtprel_base), (check_unique_offset): New
            (microblaze_elf_output_dynamic_relocation): output simple
            dynamic relocation into SRELOC.
            (microblaze_elf_relocate_section): Accommodate TLS relocations.
            (microblaze_elf_check_relocs): Likewise
            (update_local_sym_info): New
            (microblaze_elf_copy_indirect_symbol): Add tls_mask.
            (allocate_dynrelocs): Handle TLS symbol
            (microblaze_elf_size_dynamic_sections): Set size and offset
            (microblaze_elf_finish_dynamic_symbol): Use
             microblaze_elf_output_dynamic_relocation

gas/Changelog
          * config/tc-microblaze.c: Define TLS offsets
            (md_relax_table): Add TLS offsets
            (imm_types), (match_imm), (get_imm_otype): New to support
            TLS offsets.
            (tc_microblaze_fix_adjustable): Add TLS relocs.
            (md_convert_frag): Support TLS offsets.
            (md_apply_fix), (md_estimate_size_before_relax), (tc_gen_reloc):
            Add TLS relocs

include/Changelog
          * elf/microblaze.h: Add TLS relocs to START_RELOC_NUMBERS
2012-12-11 16:56:53 +00:00
Alan Modra 6eda113996 daily update 2012-12-10 23:00:05 +00:00
Nick Clifton 752937aa0c Add copyright notices 2012-12-10 12:48:03 +00:00
Alan Modra f9a52e371c daily update 2012-12-09 23:00:04 +00:00
H.J. Lu 35f0d39652 Properly check indicies bigger than 4Gb
PR binutils/14933
	* archive.c (bsd_write_armap): Properly check indicies bigger
	than 4Gb.
2012-12-09 18:01:39 +00:00
Alan Modra afa58f649b daily update 2012-12-08 23:00:05 +00:00
Alan Modra 7a684288ee daily update 2012-12-07 23:00:04 +00:00
Alan Modra d2bcb0d1aa PR ld/14926
* elf.c (_bfd_elf_map_sections_to_segments): Include elf header
	size when determining phdr_in_segment.
2012-12-07 04:58:36 +00:00
Alan Modra 2a744ebb76 daily update 2012-12-06 23:00:05 +00:00
Yufeng Zhang cd6fa7fd88 bfd/
2012-12-06  Yufeng Zhang  <yufeng.zhang@arm.com>

	* elf64-aarch64.c (elf64_aarch64_grok_prstatus): New function.
	(elf_backend_grok_prstatus): Define to elf64_aarch64_grok_prstatus.
2012-12-06 15:56:38 +00:00
Alan Modra 625ef6dc55 * elfxx-mips.c (allocate_dynrelocs): Correct test for symbol
defined in a regular file to include common symbols.
2012-12-06 00:09:13 +00:00
Alan Modra ad288036a7 daily update 2012-12-05 23:00:05 +00:00
Alan Modra 79056107ed Add x86_64-*-rdos. 2012-12-05 05:48:19 +00:00
Alan Modra 68d6295870 * elf64-ppc.c (build_plt_stub): Fix off by one error in branch
to glink.
2012-12-05 04:58:51 +00:00
Alan Modra bfc07f4d1a daily update 2012-12-04 23:00:05 +00:00
Alan Modra db53afde99 daily update 2012-12-03 23:00:05 +00:00
Maciej W. Rozycki e6aea42dfa PR ld/10629
* elfxx-mips.c (mips_elf_link_hash_table): Update comment for
	use_rld_obj_head.
	(_bfd_mips_elf_create_dynamic_sections): Always create a
	.rld_map section if no __rld_obj_head symbol has been seen.
2012-12-03 16:37:51 +00:00
Maciej W. Rozycki dd2bed3aca * elf32-mips.c (mips_elf32_object_p): Return right away when the
ABI is not compatible.
	* elfn32-mips.c (mips_elf_n32_object_p): Likewise.
2012-12-03 16:33:13 +00:00
Maciej W. Rozycki a412bee57b * elf32-tilepro.c (tilepro_elf_mkobject): New function.
(bfd_elf32_mkobject): New macro.
2012-12-03 16:30:03 +00:00
Maciej W. Rozycki 6ae68ba390 bfd/
* elf32-mips.c (bfd_elf32_mkobject): New macro.
	* elf64-mips.c (bfd_elf64_mkobject): Likewise.
	* elfn32-mips.c (bfd_elf32_mkobject): Likewise.
	* elfxx-mips.h (_bfd_mips_elf_mkobject): New prototype.
	* elfxx-mips.c (mips_elf_obj_tdata): New struct.
	(mips_elf_tdata): New macro.
	(_bfd_mips_elf_mkobject): New function.
	(mips_elf_merge_obj_attributes): Report the originating input BFD
	on attribute conflicts.

	ld/testsuite/
	* ld-mips-elf/attr-gnu-4-12.d: Update the warning message.
	* ld-mips-elf/attr-gnu-4-13.d: Likewise.
	* ld-mips-elf/attr-gnu-4-14.d: Likewise.
	* ld-mips-elf/attr-gnu-4-15.d: Likewise.
	* ld-mips-elf/attr-gnu-4-21.d: Likewise.
	* ld-mips-elf/attr-gnu-4-23.d: Likewise.
	* ld-mips-elf/attr-gnu-4-24.d: Likewise.
	* ld-mips-elf/attr-gnu-4-25.d: Likewise.
	* ld-mips-elf/attr-gnu-4-31.d: Likewise.
	* ld-mips-elf/attr-gnu-4-32.d: Likewise.
	* ld-mips-elf/attr-gnu-4-34.d: Likewise.
	* ld-mips-elf/attr-gnu-4-35.d: Likewise.
	* ld-mips-elf/attr-gnu-4-41.d: Likewise.
	* ld-mips-elf/attr-gnu-4-42.d: Likewise.
	* ld-mips-elf/attr-gnu-4-43.d: Likewise.
	* ld-mips-elf/attr-gnu-4-45.d: Likewise.
	* ld-mips-elf/attr-gnu-4-51.d: Likewise.
2012-12-03 16:17:48 +00:00
Maciej W. Rozycki 20696deded bfd/
* elfxx-mips.c (mips_elf_merge_obj_attributes): Correct messages
	for the -mdouble-float and -msingle-float cases throughout; make
	all the messages report the output file consistently on the
	left-hand side.

	ld/testsuite/
	* ld-mips-elf/attr-gnu-4-12.d: Adjust the warning expected
	according to changes to BFD.
	* ld-mips-elf/attr-gnu-4-14.d: Likewise.
	* ld-mips-elf/attr-gnu-4-31.d: Likewise.
	* ld-mips-elf/attr-gnu-4-32.d: Likewise.
	* ld-mips-elf/attr-gnu-4-34.d: Likewise.
	* ld-mips-elf/attr-gnu-4-41.d: Likewise.
2012-12-03 15:57:44 +00:00
Alan Modra 108170905a daily update 2012-12-02 23:00:04 +00:00
Alan Modra dae66d1066 daily update 2012-12-01 23:00:05 +00:00
Alan Modra d7893ac43a daily update 2012-11-30 23:00:03 +00:00
Alan Modra ccd6faef2b daily update 2012-11-29 23:00:03 +00:00
Roland McGrath a0c82a2bce bfd/
* elf-nacl.c (segment_eligible_for_headers): Disallow writable segments.
2012-11-29 19:07:53 +00:00
Hans-Peter Nilsson 17a5e4b875 Fix attribution for old patch:
2009-10-19  Edgar E. Iglesias  <edgar@axis.com>
	    Hans-Peter Nilsson  <hp@axis.com>

	* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
	Don't subtract the size of the TLS block for non-shared objects
	from the relocation.
2012-11-29 14:39:23 +00:00
Alan Modra 4e2cfdbdc0 daily update 2012-11-28 23:00:05 +00:00
Alan Modra 11985b7f96 daily update 2012-11-27 23:00:05 +00:00
Alan Modra b80f948aeb daily update 2012-11-26 23:00:10 +00:00
Roland McGrath aa6407c6ed bfd/
* elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null.
2012-11-26 17:49:11 +00:00
Alan Modra e898b29382 daily update 2012-11-25 23:00:05 +00:00
Alan Modra 6ee8970bb5 daily update 2012-11-24 23:00:04 +00:00
Alan Modra ea98391bd5 daily update 2012-11-23 23:00:05 +00:00
Alan Modra 686f4cdfc5 daily update 2012-11-22 23:00:04 +00:00
Alan Modra 0f60f328f0 daily update 2012-11-21 23:00:04 +00:00
H.J. Lu f1d8578513 Set output maxpagesize when rewriting program header
bfd/

	PR binutils/14493
	* elf.c (copy_elf_program_header): When rewriting program
	header, set the output maxpagesize to the maximum alignment
	of input PT_LOAD segments.

2012-11-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/14493
	* ld-elf/maxpage5.d: New file.
	* ld-elf/maxpage5.s: Likewise.
	* ld-elf/maxpage5.t: Likewise.
2012-11-21 21:31:18 +00:00
Roland McGrath a3f548ed85 bfd/
* elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ...
	(segment_eligible_for_headers): ... this.  Take new arguments
	MAXPAGESIZE and SIZEOF_HEADERS.  Return false if the first section's
	start address doesn't leave space for the headers.
	(nacl_modify_segment_map): Update caller.
2012-11-21 20:13:04 +00:00
Alan Modra 579994610c daily update 2012-11-20 23:00:03 +00:00
H.J. Lu dda8ddc56f Remove ref_dynamic_nonweak added by accident
bfd/

2012-11-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14862
	* elf-bfd.h (elf_link_hash_entry): Remove ref_dynamic_nonweak
	added by accident.
	(elf_link_add_object_symbols): Don't set nor check
	ref_dynamic_nonweak.

ld/testsuite/

2012-11-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14862
	* ld-elf/shared.exp (build_tests): Build libpr14862-1.o and
	libpr14862.so.
	(run_tests): Test pr14862.

	* ld-elf/pr14862-1.c: New file.
	* ld-elf/pr14862-2.c: Likewise.
	* ld-elf/pr14862.map: Likewise.
	* ld-elf/pr14862.out: Likewise.
2012-11-20 22:17:27 +00:00
Alan Modra 6d8a3edee5 * elf32-rx.c (rx_elf_print_private_bfd_data): Warning fix. 2012-11-20 01:40:00 +00:00
Alan Modra 3ed43f129e daily update 2012-11-19 23:00:03 +00:00
Alan Modra 2315ff81ea daily update 2012-11-18 23:00:02 +00:00
Alan Modra 67f186a615 daily update 2012-11-16 23:00:04 +00:00
Yufeng Zhang 79f080079c bfd/ChangeLog
2012-11-16  Joey Ye  <joey.ye@arm.com>

	* elf32-arm.c (elf32_arm_final_link_relocate,
	case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12): Align address of
	the place being relocated.
	(elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address
	of the place being relocated and truncate addend.
	(Pa): New macro.
2012-11-16 18:33:00 +00:00
Alan Modra 71fc5f3b4b daily update 2012-11-15 23:00:03 +00:00
Roland McGrath edccdf7c8b bfd/
* elf32-arm.c (elf32_arm_nacl_plt0_entry): Use bic rather than bfc
	instruction for data sandboxing.

gold/
	* arm.cc (Output_data_plt_arm_nacl::first_plt_entry): Use bic rather
	than bfc instruction for data sandboxing.
2012-11-15 00:30:11 +00:00
Alan Modra d5673c84ee daily update 2012-11-14 23:00:03 +00:00
Tristan Gingold 1778ad74b3 bfd/
2012-11-14  Tristan Gingold  <gingold@adacore.com>

	* mach-o.c (bfd_mach_o_read_main)
	(bfd_mach_o_read_source_version): New functions.
	(bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DATA_IN_CODE,
	BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS, BFD_MACH_O_LC_MAIN,
	BFD_MACH_O_LC_SOURCE_VERSION.
	* mach-o.h (bfd_mach_o_main_command)
	(bfd_mach_o_source_version_command): New types.
	(bfd_mach_o_load_command): Add fields for these new types.

binutils/
2012-11-14  Tristan Gingold  <gingold@adacore.com>

	* od-macho.c (bfd_mach_o_load_command_name): Add new definitions.
	(dump_load_command): Handle BFD_MACH_O_LC_SOURCE_VERSION
	and BFD_MACH_O_LC_MAIN.
2012-11-14 11:03:27 +00:00
Tristan Gingold f4716ee22e 2012-11-14 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Add a special
	handling for non-scattered pairs.  Update comments.
2012-11-14 10:29:46 +00:00
Alan Modra 52bef019f8 daily update 2012-11-13 23:00:04 +00:00
H.J. Lu 5964fc3adc Allocate elf_segment_map with bfd_zalloc
* elf.c (rewrite_elf_program_header): Allocate elf_segment_map
	with bfd_zalloc, instead of bfd_alloc.
2012-11-13 22:54:21 +00:00
Alan Modra 005c560c76 daily update 2012-11-12 23:00:03 +00:00
Alan Modra b494aad8c3 daily update 2012-11-11 23:00:04 +00:00
Alan Modra f8869e47bf daily update 2012-11-10 23:00:04 +00:00
Alan Modra 99443492b3 daily update 2012-11-09 23:00:03 +00:00
Nick Clifton de863c7475 2012-11-09 Nick Clifton <nickc@redhat.com>
* Makefile.am (ALL_MACHINES): Add cpu-v850-rh850.lo.
	(ALL_MACHINES_CFILES): Add cpu-v850-rh850.c.
	* archures.c (bfd_arch_info): Add bfd_v850_rh850_arch.
	* config.bfd: Likewise.
	* configure.in: Add bfd_elf32_v850_rh850_vec.
	* cpu-v850.c: Update printed description.
	* cpu-v850_rh850.c: New file.
	* elf32-v850.c (v850_elf_check_relocs): Add support for RH850 ABI
	relocs.
	(v850_elf_perform_relocation): Likewise.
	(v850_elf_final_link_relocate): Likewise.
	(v850_elf_relocate_section): Likewise.
	(v850_elf_relax_section): Likewise.
	(v800_elf_howto_table): New.
	(v850_elf_object_p): Add support for RH850 ABI values.
	(v850_elf_final_write_processing): Likewise.
	(v850_elf_merge_private_bfd_data): Likewise.
	(v850_elf_print_private_bfd_data): Likewise.
	(v800_elf_reloc_map): New.
	(v800_elf_reloc_type_lookup): New.
	(v800_elf_reloc_name_lookup): New.
	(v800_elf_info_to_howto): New.
	(bfd_elf32_v850_rh850_vec): New.
	(bfd_arch_v850_rh850): New.
	* targets.c (_bfd_targets): Add bfd_elf32_v850_rh850_vec.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.

	* readelf.c (get_machine_flags): Add support for E_FLAG_RX_ABI.
	(guess_is_rela): Add EM_V800.
	(dump_relocations): Likewise.
	(get_machine_name): Update EM_V800.
	(get_machine_flags): Add support for RH850 ABI flags.
	(is_32bit_abs_reloc): Add support for RH850 ABI reloc.

	* config/tc-v850.c (v850_target_arch): New.
	(v850_target_format): New.
	(set_machine): Use v850_target_arch.
	(md_begin): Likewise.
	(md_show_usage): Document new switches.
	(md_parse_option): Add -mgcc-abi, -mrh850-abi, -m8byte-align and
	-m4byte-align.
	* config/tc-v850.c (TARGET_ARCH) Use v850_target_arch.
	(TARGET_FORMAT): Use v850_target_format.
	* doc/c-v850.texi: Document new options.

	* v850.h: Add RH850 ABI values.

	* Makefile.am: (ALL_EMULATION_SOURCES): Add ev850_rh850.c.
	* Makefile.in: Regenerate.
	* configure.tgt (v850*-*-*): Make v850_rh850 the default
	emulation. Add vanilla v850 as an extra emulation.
	* emulparams/v850_rh850.sh: New file.
	* scripttempl/v850_rh850.sc: New file.

	* configure.in: Add bfd_v850_rh850_arch.
	* configure: Regenerate.
	* disassemble.c (disassembler): Likewise.
2012-11-09 17:36:19 +00:00
Nick Clifton 708e2187a3 2012-11-09 Nick Clifton <nickc@redhat.com>
* elf32-rx.c (describe_flags): New function.  Returns a buffer
	containing a description of the E_FLAG_RX_... values set.
	(rx_elf_merge_private_bfd_data): Use it.
	(rx_elf_print_private_bfd_data): Likewise.
	(elf32_rx_machine): Skip EF_RX_CPU_RX check.
	(elf32_rx_special_sections): Define.
	(elf_backend_special_sections): Define.

2012-11-09  Nick Clifton  <nickc@redhat.com>

	* readelf.c (get_machine_flags): Add support for E_FLAG_RX_ABI.

2012-11-09  Nick Clifton  <nickc@redhat.com>

	* config/obj-elf.c (obj_elf_change_section): Allow init array
	sections to have the SHF_EXECINSTR attribute for the RX target.
	* config/tc-rx.c (elf_flags): Initialise with E_FLAG_RX_ABI.
	(enum options): Add OPTION_USES_GCC_ABI and OPTION_USES_RX_ABI.
	(md_longopts): Add -mgcc-abi and -mrx-abi.
	(md_parse_option): Add support for OPTION_USES_GCC_ABI and
	OPTION_USES_RX_ABI.
	* doc/as.texinfo (RX Options): Add mention of remaining RX
	options.
	* doc/c-rx.texi: Document -mgcc-abi and -mrx-abi.

2012-11-09  Nick Clifton  <nickc@redhat.com>

	* rx.h (EF_RX_CPU_RX): Add comment.
	(E_FLAG_RX_ABI): Define.

2012-11-09  Nick Clifton  <nickc@redhat.com>

	* emultempl/rxelf.em (no_flag_mismatch_warnings): Initialise to
	true.
	(PARSE_AND_LIST_LONGOPTS): Add flag-mismatch-warnings.
	(PARSE_AND_LIST_ARG_CASES): Add support for
	--flag-mismatch-warnings.
2012-11-09 17:00:44 +00:00
Michael Eager f23200ada9 Add microblazeel target support to bfd, gas and ld.
binutils/bfd/Changelog

 2012-11-09  Edgar E. Iglesias <edgar.iglesias@gmail.com>

          * config.bfd: Add microblazeel-*-*
          * configure.in: Likewise.
          * configure: Regenerate.
          * elf32-microblaze.c (microblaze_elf_relocate_section):
            Add endian awareness.
            (microblaze_elf_merge_private_bfd_data): New.
            (microblaze_bfd_write_imm_value_32): New.
            (microblaze_bfd_write_imm_value_64): New.
            (microblaze_elf_relax_section): Add endian awareness.
            (microblaze_elf_add_symbol_hook): Define TARGET_LITTLE_NAME,
            TARGET_LITTLE_SYM and bfd_elf32_bfd_merge_private_bfd_data.
          * targets.c: Add bfd target bfd_elf32_microblazeel_vec.

binutils/gas/Changelog

 2012-11-09  Edgar E. Iglesias <edgar.iglesias@gmail.com>

          * tc-microblaze.c (md_longopts): Define OPTION_EB and
            OPTION_EL for target.
            (md_parse_option): Likewise.
          * tc-microblaze.h: Set elf32-microblazeel if not
            target_big_endian for TARGET_FORMAT.
          * configure.tgt: Add microblazeel and set endian per target.

binutils/gas/testsuite/Changelog

 2012-11-09  David Holsgrove  <david.holsgrove@xilinx.com>

          * gas/microblaze/endian.exp: New file - endian
            testcase for microblaze / microblazeel.
          * gas/microblaze/endian.s: Likewise.
          * gas/microblaze/endian_be.d: Likewise.
          * gas/microblaze/endian_le.d: Likewise.
          * gas/microblaze/endian_le_elf.d: Likewise.
          * gas/microblaze/reloc_sym.d: Update to accept targets
            other than elf32-microblaze.
          * gas/microblaze/special_reg.d: Likewise.

binutils/ld/Changelog

 2012-11-09  Edgar E. Iglesias <edgar.iglesias@gmail.com>

          * Makefile.am: Add eelf32microblazeel.c and eelf32mbel_linux.c.
          * Makefile.in: Regenerated.
          * configure.tgt: Add microblazeel and set endian per target.
          * emulparams/elf32mb_linux.sh: Add OUTPUT_FORMAT.
          * emulparams/elf32microblaze.sh: Likewise.
          * emulparams/elf32mbel_linux.sh: New file.
          * emulparams/elf32microblazeel.sh: Likewise.
2012-11-09 16:25:12 +00:00
H.J. Lu 5bb3703f01 Remove trailing redundant `;'
bfd/

	* aout-tic30.c (MY_final_link_callback): Remove trailing
	redundant `;'.
	* coff-h8500.c (extra_case): Likewise.
	(bfd_coff_reloc16_get_value): Likewise.
	* dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Likewise.
	* elf.c (_bfd_elf_slurp_version_tables): Likewise.
	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_perform_relocation): Likewise.
	* opncls.c (bfd_calc_gnu_debuglink_crc32): Likewise.
	* plugin.c (add_symbols): Likewise.
	* reloc.c (bfd_check_overflow): Likewise.
	* vms-lib.c (_bfd_vms_lib_archive_p): Likewise.

binutils/

	* coffgrok.c (coff_grok): Remove trailing redundant `;'.
	* resrc.c (open_input_stream): Likewise.

gas/

	* config/atof-ieee.c (gen_to_words): Remove trailing redundant
	`;'.
	* config/atof-vax.c (flonum_gen2vax): Likewise.
	* config/tc-d10v.c (write_2_short): Likewise.
	* config/tc-i386-intel.c (i386_intel_simplify): Likewise.
	* config/tc-s390.c (tc_s390_force_relocation): Likewise.
	* config/tc-v850.c (md_parse_option): Likewise.
	* config/tc-xtensa.c (find_address_of_next_align_frag): Likewise.
	* dwarf2dbg.c (out_header): Likewise.
	* symbols.c (dollar_label_name): Likewise.
	(fb_label_name): Likewise.

ld/

	* testplug.c (record_add_file): Remove trailing redundant `;'.

opcodes/

	* aarch64-opc.h (gen_mask): Remove trailing redundant `;'.
	* ia64-gen.c (fetch_insn_class): Likewise.
2012-11-09 08:29:34 +00:00
Alan Modra 93561fe655 daily update 2012-11-08 23:00:04 +00:00
Tom Tromey 9015683b1c gdb
* linux-tdep.c (linux_make_siginfo_note): New function.
	(linux_make_corefile_notes): Use it.
	* corelow.c (get_core_siginfo): New function.
	(core_xfer_partial) <TARGET_OBJECT_SIGNAL_INFO>: New case.
gdb/testsuite
	* gdb.base/siginfo-obj.exp: Create core file.  Test siginfo from
	core files, if possible.
	* gdb.base/siginfo-thread.c: New file
	* gdb.base/siginfo-thread.exp: New file
bfd
	* elf.c (elfcore_grok_note) <NT_SIGINFO>: New case; make
	pseudosection.
2012-11-08 21:16:43 +00:00
Alan Modra 6febeb7413 Regenerate. 2012-11-08 03:03:26 +00:00
Alan Modra cb90edda25 daily update 2012-11-07 23:00:05 +00:00
H.J. Lu ddda4adc28 Replace memcpy with memmove
* section.c (bfd_get_section_contents): Replace memcpy
	with memmove.
2012-11-07 05:57:24 +00:00
Hans-Peter Nilsson 75344f2a89 PR binutils/14481
* aout-target.h (MY_close_and_cleanup): Make local function
	instead of alias of MY_bfd_free_cached_info.  Also call
	_bfd_generic_close_and_cleanup.
2012-11-07 05:51:37 +00:00
H.J. Lu 9053b70efa Change return type of bclose to bfd_boolean
PR binutils/14813
	* bfdio.c (bfd_iovec): Change return type of bclose to
	bfd_boolean.
	(memory_bclose): Change return type to bfd_boolean.
	* cache.c (cache_bclose): Likewise.
	* opncls.c (opncls_bclose): Likewise.  Return TRUE on success.
	* vms-lib.c (vms_lib_bclose): Likewise.  Return TRUE.
	* libbfd.h: Regenerated.
2012-11-07 00:55:04 +00:00
Alan Modra 87988f9a1d daily update 2012-11-06 23:00:05 +00:00
Tristan Gingold 4bea9418b3 2012-11-06 Tristan Gingold <gingold@adacore.com>
* coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator):
	Define as coff_find_nearest_line_discriminator.
2012-11-06 16:11:07 +00:00
Alan Modra b374d0f8d9 PR binutils/14567
* opncls.c (opncls_iovec): Forward declare.
	(_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream
	to new bfd.
2012-11-06 09:31:12 +00:00
Alan Modra 8c746b9642 * mach-o.c (bfd_mach_o_close_and_cleanup): Don't call
_bfd_generic_close_and_cleanup for mach_o_fat archives.
2012-11-06 06:44:01 +00:00
Alan Modra 0df8acdee9 Allow SEC_CODE and SEC_READONLY in section flags. 2012-11-06 06:36:42 +00:00
Alan Modra 1849850340 bfd/
* coff-tic4x.c (tic4x_coff0_vec, tic4x_coff0_beh_vec,
	tic4x_coff1_vec, tic4x_coff1_beh_vec, tic4x_coff2_vec,
	tic4x_coff2_beh_vec): Allow SEC_CODE and SEC_READONLY in
	section flags.
gas/
	* config/tc-tic4x.c: Remove alignment TODO comments.
	(tic4x_do_align): Enable subseg_text_p test.
2012-11-06 05:51:18 +00:00
Alan Modra a38a07e07c bfd/
* elf64-ppc.c (struct ppc_link_hash_table): Add dot_toc_dot.
	(ppc64_elf_size_stubs): Lookup ".TOC.".
	(ppc64_elf_relocate_section): Resolve special symbol ".TOC.".
gas/
	* config/tc-ppc.c (ppc_elf_adjust_symtab): New function, split out..
	(ppc_frob_file_before_adjust): ..from here.
	(md_apply_fix): Set BSF_KEEP on .TOC. if not @tocbase.
	* config/tc-ppc.h (ppc_elf_adjust_symtab): Declare.
	(tc_adjust_symtab): Define.
2012-11-06 05:18:03 +00:00
Alan Modra 53d8967a85 * elf64-ppc.c (maybe_strip_output): Heed SEC_KEEP. 2012-11-06 03:44:51 +00:00
Alan Modra c6ad7cc56e daily update 2012-11-05 23:00:04 +00:00
Andreas Krebbel 0cb79d6955 2012-11-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
PR target/14788
	* elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for
	local ifunc symbols.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
2012-11-05 12:31:08 +00:00
Alan Modra d17dce5567 * configure.in: Apply 2012-09-10 change to config.in here. 2012-11-05 10:45:32 +00:00
Alan Modra d4f1ee75e7 * elf64-ppc.c (ppc64_elf_edit_toc): Clear "repeat" inside
loop.  Really mark toc entry referring to another toc entry
	only if the first is used.
2012-11-05 05:17:34 +00:00
Alan Modra d6d2d89142 daily update 2012-11-04 23:00:04 +00:00
Alan Modra 3770f6448f daily update 2012-11-03 23:00:06 +00:00
Alan Modra c0038b0e0b daily update 2012-11-02 23:00:04 +00:00
Alan Modra d1c2e12c10 daily update 2012-11-01 23:00:04 +00:00
Alan Modra 878462f3f1 daily update 2012-10-31 23:00:05 +00:00
H.J. Lu 680db949c6 Handle --enable-64-bit-bfd when setting CORE_HEADER
* configure.in: Also handle --enable-64-bit-bfd when setting
	CORE_HEADER for 'i[3-7]86-*-linux-*'.
2012-10-30 13:30:15 +00:00
Nick Clifton 3bfcb6528e bfd:
* elf32-arm.c (elf32_arm_print_private_bfd_data): Recognise and
        display the new ARM hard-float/soft-float ABI flags for EABI_VER5
        (elf32_arm_post_process_headers): Add the hard-float/soft-float
        ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5.

binutils:
        * readelf.c (decode_ARM_machine_flags): Recognise and display the
        new ARM hard-float/soft-float ABI flags for EABI_VER5. Split out
        the code for EABI_VER4 and EABI_VER5 to allow this.

elfcpp:
        * arm.h: New enum for EABI soft- and hard-float flags.

gold:
        * gold.cc (Target_arm::do_adjust_elf_header): Add the
        hard-float/soft-float ABI flag as appropriate for ET_DYN/ET_EXEC
        in EABI_VER5.

include:
        * elf/arm.h (EF_ARM_ABI_FLOAT_SOFT): New define.
        (EF_ARM_ABI_FLOAT_HARD): Likewise.

ld/testsuite:
        * ld-arm/eabi-hard-float.s: New test source.
        * ld-arm/eabi-soft-float.s: New test source.
        * ld-arm/eabi-hard-float.d: New test.
        * ld-arm/eabi-soft-float.d: New test.
        * ld-arm/eabi-soft-float-ABI4.d: New test.
        * ld-arm/eabi-soft-float-r.d: New test.
        * ld-arm/arm-elf.xp: Use the new tests.

binutils:
	PR binutils/14779
	* configure.in: Add checks for wchar.h and mbstate_t.
	* config.in: Regenerate.
	* configure: Regenerate.
	* readelf.c: Conditionally include wchar.h.
	(print_symbol): Conditionally use mbstate_t.
2012-10-30 12:44:58 +00:00
H.J. Lu b1bd052dee Add Linux/x86_64 core support to i[3-7]86-*-linux
* configure.in: Set CORE_HEADER to hosts/x86-64linux.h for
	'i[3-7]86-*-linux-*' if x86_64-*linux is enabled.
	* configure: Regenerated.

	* elf64-x86-64.c (elf_x86_64_write_core_note): Replace type
	'prpsinfo_t' and 'prstatus_t' with 'prpsinfo64_t' and
	'prstatus64_t' respectively.

	* hosts/x86-64linux.h (a8_uint64_t): New.
	(user_regsx32_struct): Renamed to ...
	(user_regs64_struct): This.  Replace uint64_t with a8_uint64_t.
	(elf_gregx32_t): Renamed to ...
	(elf_greg64_t): This.  Replace uint64_t with a8_uint64_t.
	(ELF_NGREGX32): Removed.
	(ELF_NGREG64): New.
	(elf_gregx32_t): Removed.
	(elf_greg64_t): New.
	(struct prstatus64_timeval): New.
	(elf_prstatusx32): Replace elf_gregsetx32_t with elf_gregset64_t.
	(elf_prstatus64): New.
	(elf_prpsinfo64): New.
	(prstatus64_t, prpsinfo64_t): New typedef.
2012-10-30 08:36:10 +00:00
Alan Modra 29473179ea daily update 2012-10-29 23:00:04 +00:00
Sean Keys d62734337d * elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for
R_XGATE_16
2012-10-29 21:28:09 +00:00
Alan Modra bdaacd3a1c * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in
R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A,
	R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A,
	R_PPC_VLE_SDAREL_HA16A reloc howtos.
2012-10-29 09:51:10 +00:00
Alan Modra 9f8ca834d6 daily update 2012-10-28 23:00:04 +00:00
Alan Modra a760a976b7 daily update 2012-10-27 23:00:05 +00:00
Alan Modra 4c2abef8de daily update 2012-10-26 23:00:04 +00:00
Nick Clifton 31f7d8fd19 * po/hr.po: New Croation translation.
* configure.in (ALL_LINGUAS): Add hr.
	* configure: Regenerate.

	* po/uk.po: Updated Ukranian translation.
2012-10-26 15:27:18 +00:00
Alan Modra 1fe532cf60 PR target/14758
bfd/
	* elf32-ppc.c (ppc_elf_reloc_type_lookup): Decode ppc64 _DS
	bfd_reloc values.  Map to corresponding D-form relocs.
	(is_insn_ds_form, is_insn_qs_form): New functions.
	(ppc_elf_relocate_section): Validate insn with DS-form or DQ-form
	fields using D-form reloc.
gas/
	* config/tc-ppc.c (ppc_setup_opcodes): Fix comment.
	(md_assemble): Translate to _DS relocs for ppc32 as well as ppc64.
	(tc_gen_reloc): Handle _DS relocs in ppc32 mode.
2012-10-26 03:40:37 +00:00
Alan Modra 2461266c18 daily update 2012-10-25 23:00:04 +00:00
H.J. Lu 9d4b2dba0e Replace _GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot
* elf32-i386.c (elf_i386_size_dynamic_sections): Replace
	_GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot.
	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
2012-10-25 13:36:08 +00:00
Alan Modra 4902650971 daily update 2012-10-24 23:00:06 +00:00
H.J. Lu 64f401629b Don't decompress the section in bfd_is_section_compressed
* compress.c (bfd_is_section_compressed): Don't decompress the
	section.
2012-10-24 21:36:50 +00:00
Alan Modra 3258d498f4 daily update 2012-10-23 23:00:04 +00:00
Nathan Sidwell 04c3a75556 bfd/
* bfd-in.h (bfd_elf_stack_segment_size): Declare.
	* bfd-in2.h: Rebuilt.
	* elfxx-target.h (elf_backend_stack_align): New.
	(elfNN_bed): Add it.
	* elf-bfd.h (struct elf_backend_data): Add stack_align field.
	* elf.c (bfd_elf_map_sections_to_segments): Pay attention to
	stack_align and stacksize for PT_GNU_STACK segment.
	(assign_file_positions_for_non_load_sections): Set p_memsz for
	PT_GNU_STACK segment.
	(copy_elf_program_header): Copy PT_GNU_STACK size.
	* elflink.c (bfd_elf_stack_segment_size): New function, taken from
	uclinux backends.
	(bfd_elf_size_dynamic_sections): Determine
	PT_GNU_STACK requirements after calling backend.  Pay attention to
	stacksize.
	* elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(elf32_bfinfdpic_modify_program_headers): Delete.
	(elf32_bfingfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
	here.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-frv.c (frvfdpic_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(elf32_frvfdpic_modify_program_headers): Delete.
	(elf32_frvfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
	here.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-lm32.c (lm32_elf_always_size_sections): Leave
	PT_GNU_STACK creation to underlying elf support.  Check
	__stacksize here for backwards compatibility, and set it if
	needed.
	(lm32_elf_modify_segment_map): Delete.
	(lm32_elf_modify_program_headers): Delete.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_segment_map): Don't override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-sh.c (sh_elf_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(sh_elf_modify_program_headers): Delete.
	(sh_elf_copy_private_data): Don't copy PT_GNU_STACK
	here.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-tic6x.c (elf32_tic6x_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(elf32_tic6x_modify_program_headers): Delete.
	(elf32_tic6x_copy_private_data): Delete.
	(elf_backend_stack_align): Override.
	(bfd_elf32_bfd_copy_private_bfd_data): Don't override.
	(elf_backend_modify_program_headers): Don't override.

	include/
	* bfdlink.h (struct bfd_link_info): Add stacksize option.

	ld/
	* ld.texinfo (stack-size): New option.
	* emultempl/elf32.em: Add stack-size option.

	ld/testsuite/
	* ld-elf/binutils.exp: Add -z stack-size=0.
	* ld-elf/elf.exp: Add stack-exec and stack-size tests.
	* ld-elf/orphan-region.d: Add stack-size option. Remove xfail.
	* ld-elf/stack-exec.rd: New.
	* ld-elf/stack-size.rd: New.
	* ld-elf/stack.s: New.
	* ld-scripts/empty-aligned.d: Add stack-size option.
	* ld-sh/fdpic-stack-set.d: New.
	* ld-tic6x/shlib-1.rd: Remove __stacksize symbol.
	* ld-tic6x/shlib-1b.rd: Likewise.
	* ld-tic6x/shlib-1r.rd: Likewise.
	* ld-tic6x/shlib-1rb.rd: Likewise.
	* ld-tic6x/shlib-app-1.rd: Likewise.
	* ld-tic6x/shlib-app-1b.rd: Likewise.
	* ld-tic6x/shlib-app-1r.rd: Likewise.
	* ld-tic6x/shlib-app-1rb.rd: Likewise.
	* ld-tic6x/shlib-noindex.rd: Likewise.
	* ld-tic6x/static-app-1.rd: Likewise.
	* ld-tic6x/static-app-1b.rd: Likewise.
	* ld-tic6x/static-app-1r.rd: Likewise.
	* ld-tic6x/static-app-1rb.rd: Likewise.
2012-10-23 09:33:56 +00:00
Alan Modra e4c4c631c4 daily update 2012-10-22 23:00:04 +00:00
Alan Modra eac3aa9e9a * cache.c (cache_bmmap): Don't use void* arithmetic. 2012-10-22 04:51:52 +00:00
Alan Modra 379b38338d daily update 2012-10-21 23:00:04 +00:00
Alan Modra 8a72cc6e7e bfd/
* compress.c (bfd_cache_section_contents): New function.
	* bfd-in2.h: Regenerate.
binutils/
	* objdump.c (load_specific_debug_section): Use
	bfd_cache_section_contents.
2012-10-21 09:06:07 +00:00
Hans-Peter Nilsson 1e9d6fc263 Correct last entry 2012-10-21 03:25:02 +00:00
Hans-Peter Nilsson d3a65d4dea * linker.c (_bfd_generic_link_output_symbols): Handle a
no-longer-global symbol entered as a BFD_PLUGIN.
2012-10-21 03:23:37 +00:00
Alan Modra c2762effd9 daily update 2012-10-20 23:00:05 +00:00
Alan Modra 38b774d28c * compress.c: Reinstate 2012-10-19 change.
(bfd_get_full_section_contents): Don't free unless we alloc.
	Use proper decompress size.  Delete some vars, rename others.
2012-10-20 08:27:13 +00:00
Alan Modra d8551d25f7 daily update 2012-10-19 23:00:05 +00:00
Tom Tromey 67d004eb5f * compress.c: Revert previous patch. 2012-10-19 16:59:57 +00:00
Tom Tromey 06c2e2c12c * compress.c (bfd_get_full_section_contents): Don't cache
decompressed contents.
2012-10-19 15:51:53 +00:00
Alan Modra 5cb3f7f4d9 daily update 2012-10-18 23:00:04 +00:00
Kai Tietz a29a8af823 ChangeLog bfd
2012-10-18  Kai Tietz  <ktietz@redhat.com>

	PR binutils/14067
	* coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
	Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
	* coff-x86_64.c: Likewise.
	* coffcode.h (DOT_ZDEBUG): New define.
	(sec_to_styp_flags): Check for .zdebug.
	(styp_to_sec_flags): Likewise.
	* coffgen.c (make_a_section): Handle .debug_* section
	compression/decompression flags.
	* cofflink.c (mark_relocs): Ignore relocations
	for a section, which isn't marked as used.
	(_bfd_coff_link_input_bfd): Add support of compressed
	debug sections.
	* compress.c (decompress_contents): Loop as long
	as there is input available and there is room for
	output.
	* bfd/pe-arm.c: Add .zdebug_ partial match entry.
	* pe-i386.c: Likewise.
	* pe-x86_64.c: Likewise.
	* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
	data-directories as this might destroy content.

        * coff-i386.c (_bfd_generic_find_nearest_line_discriminator):
        define as coff_find_nearest_line_discriminator.
        * libcoff-in.h (coff_find_nearest_line_discriminator): New
        * libcoff.h: Regenerated.
        * coff-x86_64.c: Likewise.
        * coffgen.c (coff_find_nearest_line_discriminator): New function.
        prototype.

ChangeLog binutils

2012-10-18  Kai Tietz  <ktietz@redhat.com>

	* objdump.c (dump_bfd): Call dump headers after
	call of slurp_symtab.

ChangeLog ld

2012-10-18  Kai Tietz  <ktietz@redhat.com>

	PR binutils/14067
	* NEWS: Menition new feature.
	* scripttempl/pep.sc: Add zdebug sections.
	* scripttempl/pe.sc: L
2012-10-18 17:42:29 +00:00
Alan Modra f8bfb3c5e1 daily update 2012-10-17 23:00:03 +00:00
Alan Modra 617a460292 daily update 2012-10-16 23:00:04 +00:00
Joel Brobecker 1239a68ada Add missing ChangeLog entry for previous commit:
2012-10-16  Joel Brobecker  <brobecker@adacore.com>

       * coff64-rs6000.c (rs6000coff64_vec): Set _close_and_cleanup
       field to _bfd_archive_close_and_cleanup.
       (aix5coff64_vec): Likewise.
2012-10-16 22:57:50 +00:00
Joel Brobecker 329e5cac87 dangling pointer in coff64-rs6000 archive cache.
bfd/ChangeLog:

        * coff64-rs6000.c (rs6000coff64_vec): Set _close_and_cleanup
        field to _bfd_archive_close_and_cleanup.
        (aix5coff64_vec): Likewise.
2012-10-16 22:56:55 +00:00
Joel Brobecker e3f9f6d818 Dangling bfd pointer in archive cache.
This dandling pointer eventually leads to a crash when trying to run
on ppc-aix a program using threading...

bfd/ChangeLog:

        * coff-rs6000.c (rs6000coff_vec): Set _close_and_cleanup
        field to _bfd_archive_close_and_cleanup.
        (pmac_xcoff_vec): Likewise.
2012-10-16 22:47:03 +00:00
Yufeng Zhang bb3f9ed8ba Fixed AArch64 TLS relocation resolution.
bfd/

	* elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
	R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
	R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
	R_AARCH64_TLSLE_ADD_TPREL_HI12.
	(elf64_aarch64_tlsdesc_howto_table): Fix shift value for
	R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
	(elf64_aarch64_final_link_relocate): Add signed_addend when resolving
	AARCH64_TLSLE_*_TPREL_* relocations.

	ld/testsuite/

	* ld-aarch64/tlsle-symbol-offset.s: New file.
	* ld-aarch64/tlsle-symbol-offset.d: New file.
	* ld-aarch64/aarch64-elf.exp: Add tlsle-symbol-offset test.
2012-10-16 16:36:50 +00:00
Alan Modra 65e911f9f0 * elf32-xtensa.c (free_section_cache): Renamed from
clear_section_cache.  Don't zero cache.
	(section_cache_section): Remove ineffectual zero of cache.
	Call init_section_cache instead.
2012-10-16 01:42:42 +00:00
Alan Modra 60151bd509 daily update 2012-10-15 23:00:04 +00:00
Doug Evans a9a72a6552 * elf.c (special_sections_d): Add comment. 2012-10-15 20:36:12 +00:00
Alan Modra 5a6c2d4f39 daily update 2012-10-14 23:00:04 +00:00
Alan Modra 499a7a6c74 daily update 2012-10-13 23:00:04 +00:00
H.J. Lu 3cf9e6c408 Replace -ldl with @lt_cv_dlopen_libs@
* Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
	* configure.in (lt_cv_dlopen_libs): AC_SUBST.
	* Makefile.in: Regenerated.
	* configure: Likewise.
2012-10-13 14:17:14 +00:00
Alan Modra 5491ebdaa6 daily update 2012-10-12 23:00:05 +00:00
Alan Modra 0b901e182f daily update 2012-10-11 23:00:05 +00:00
Alan Modra 0a2244151b daily update 2012-10-10 23:00:05 +00:00
Alan Modra 45321653b1 daily update 2012-10-09 23:00:05 +00:00
Alan Modra 427a6345b7 daily update 2012-10-08 23:00:05 +00:00
Alan Modra f073ced36d PR binutils/14662
* elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as
	SEC_DEBUGGING.
2012-10-07 23:59:26 +00:00
Alan Modra 0f4058b697 daily update 2012-10-07 23:00:05 +00:00
Alan Modra 706c84260e daily update 2012-10-06 23:00:05 +00:00
Alan Modra 39dc86500a daily update 2012-10-06 00:00:04 +00:00
Alan Modra fda1189bbc daily update 2012-10-05 00:00:04 +00:00
Alan Modra e1a5fb8d37 daily update 2012-10-04 00:00:04 +00:00
Alan Modra a330419054 daily update 2012-10-03 00:00:04 +00:00
Alan Modra 38981e1608 daily update 2012-10-02 00:00:04 +00:00
Alan Modra ed8960ecbc daily update 2012-10-01 00:00:04 +00:00
Alan Modra 0b9b36904a daily update 2012-09-30 00:00:04 +00:00
Alan Modra f49004d3f0 daily update 2012-09-29 00:00:04 +00:00
Alan Modra 9782f08bbd daily update 2012-09-28 00:00:04 +00:00
Alan Modra ce14842f78 daily update 2012-09-27 00:00:04 +00:00
Alan Modra 60958081ea daily update 2012-09-26 00:00:04 +00:00
Alan Modra 264218d061 daily update 2012-09-25 00:00:04 +00:00
Alan Modra 2e0f0e7c07 daily update 2012-09-24 00:00:03 +00:00
Alan Modra e00c11850a daily update 2012-09-23 00:00:05 +00:00
Alan Modra 21ab1f4c17 daily update 2012-09-22 00:00:06 +00:00
Alan Modra 27755b6678 daily update 2012-09-21 00:00:04 +00:00
Walter Lee 535127d2b8 Fix computation of got relocations for .got sections greater than
0x8000 bytes.
2012-09-20 06:55:02 +00:00
Alan Modra 34ab44f42e daily update 2012-09-20 00:00:04 +00:00
Steve Ellcey 795e8513e8 2012-09-19 Steve Ellcey <sellcey@mips.com>
* config.bfd: Add mips*-mti-elf* target.
2012-09-19 20:10:43 +00:00
H.J. Lu 37a9e49a28 Properly handle common symbol and weak function
bfd/

	PR ld/14591
	* elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
	if the old symbol is weak.

	* elf32-sh-symbian.c (sh_symbian_relocate_section): Update
	_bfd_elf_merge_symbol call.

	* elflink.c (_bfd_elf_merge_symbol): Add an argument to return
	if the old symbol is weak.
	(_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
	call.
	(elf_link_add_object_symbols): Don't update symbol type from a
	weak definition.  Update symbol type from a common symbol when
	overriding a weak symbol.

ld/testsuite/

	PR ld/14591
	* ld-elf/comm-data.exp (run_ld_link_tests): Add comm-data3a and
	comm-data3b tests.

	* ld-ifunc/ifunc.exp (run_ld_link_exec_tests): New.

	* ld-elf/comm-data3.sd: New file.
	* ld-elf/comm-data3a.s: Likewise.
	* ld-elf/comm-data3b.s: Likewise.
	* ld-ifunc/ifunc-17a-i386.d: Likewise.
	* ld-ifunc/ifunc-17a-x86-64.d: Likewise.
	* ld-ifunc/ifunc-17a.s: Likewise.
	* ld-ifunc/ifunc-17b-i386.d: Likewise.
	* ld-ifunc/ifunc-17b-x86-64.d: Likewise.
	* ld-ifunc/ifunc-17b.s: Likewise.
	* ld-ifunc/ifunc-common-1.out: Likewise.
	* ld-ifunc/ifunc-common-1a.c: Likewise.
	* ld-ifunc/ifunc-common-1b.c: Likewise.
2012-09-19 00:53:30 +00:00
Alan Modra 5fd394c653 daily update 2012-09-19 00:00:06 +00:00
H.J. Lu fbdc86d9c9 Ignore discarded section when converting mov to lea
* elf32-i386.c (elf_i386_convert_mov_to_lea): Ignore discarded
	section.
	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
2012-09-18 00:41:59 +00:00
Alan Modra 7879129009 daily update 2012-09-18 00:00:04 +00:00
H.J. Lu cec7f46ac2 Replace return FALSE with abort in x86 finish_dynamic_symbol
* elf32-i386.c (elf_i386_finish_dynamic_symbol): Replace return
	FALSE with abort.
	* elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2012-09-17 18:31:15 +00:00
Walter Lee 5ec6137837 Remove unused got_base variable.
* elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused
	got_base variable.
	* elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
2012-09-17 18:01:18 +00:00
Walter Lee 901e60ca41 Fix computation of got relocations for when .got.plt section is merged
with .got.
	* elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation
	of got relocations for when .got.plt section is merged with .got.
	* elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
2012-09-17 10:53:38 +00:00
Alan Modra 53d121fb4e daily update 2012-09-17 00:00:04 +00:00
Alan Modra 32c617e596 daily update 2012-09-16 00:00:03 +00:00
David Edelsohn 6c9c0a5029 * configure: Regenerate. 2012-09-15 00:03:06 +00:00
Alan Modra 8aa2c966cb daily update 2012-09-15 00:00:04 +00:00
Alan Modra 6d63c930d3 daily update 2012-09-14 00:00:04 +00:00
Anthony Green e202fa84e7 Bi-endian patches for moxie 2012-09-13 22:24:51 +00:00
Richard Earnshaw 80c4bb52e5 Really commit regenerated files. 2012-09-13 11:09:02 +00:00
Alan Modra 8ea749260d daily update 2012-09-13 00:00:04 +00:00
Doug Kwan 31c766788a 2012-09-12 Doug Kwan <dougkwan@google.com>
* elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted
	relocation for stub lookup.
2012-09-12 22:56:05 +00:00
Richard Earnshaw f41aef5f6e 2012-09-11 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>
bfd/

	* bfd-in2.h: Regenerated.
	* elf64-aarch64.c
	(elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
	(elf64_aarch64_reloc_map): Add reloc entry.
	(aarch64_resolve_relocation): Likewise.
	(bfd_elf_aarch64_put_addend): Likewise.
	(aarch64_reloc_got_type): Likewise.
	(elf64_aarch64_final_link_relocate): Likewise.
	(lf64_aarch64_check_relocs): Likewise.
	(elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
	reloc.
	* libbfd.h: Regenerated.
	* reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.

	gas/

	* config/tc-aarch64.c
	(reloc_table): Add reloc to table entry.
	(parse_address_main): Add support for #:<reloc_op>:<symbol>.
	(parse_operands): Check for unused reloc.
	(md_apply_fix): New case for reloc.
	(aarch64_force_relocation): Likewise.

	gas/testsuite

	* gas/aarch64/reloc-insn.d
	(BFD_RELOC_AARCH64_GOT_LD_PREL19): Add expected asm for new reloc test.
	* gas/aarch64/reloc-insn.s
	(BFD_RELOC_AARCH64_GOT_LD_PREL19): Add test for reloc.

	include/

	* elf/aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc.

	ld/testsuite

	* ld-aarch64/aarch64-elf.exp: New reloc tests.
	* ld-aarch64/emit-relocs-309-low-bad.d: New file. Expected asm for test
	failure (lower bound overflow).
	* ld-aarch64/emit-relocs-309-low.d: New file. Expected asm for test
	success (lower bound).
	* ld-aarch64/emit-relocs-309-up-bad.d: New file. Expected asm for test
	failure (upper bound overflow).
	* ld-aarch64/emit-relocs-309-up.d: New file. Expected asm for test
	success (upper bound).
	* ld-aarch64/emit-relocs-309.s: New file. Asm for new reloc tests.
2012-09-12 16:25:51 +00:00
Alan Modra 1f2ea3d23b daily update 2012-09-12 00:00:05 +00:00
Alan Modra 2fada0f44c daily update 2012-09-11 00:00:04 +00:00
Alan Modra 00716ab174 * config.in: Disable sanity check for kfreebsd. 2012-09-10 22:30:57 +00:00
H.J. Lu 6d2920c847 Regenerate binutils configure
bfd/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

binutils/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

etc/

2010-11-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in (install-strip): New target.

gas/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

gold/

2012-09-09  Alan Modra  <amodra@gmail.com>

	* target.h (Target::gc_mark_symbol, do_gc_mark_symbol): New functions.

gprof/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

intl/

2010-06-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	PR bootstrap/44621

ld/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

libiberty/

2011-08-28  H.J. Lu  <hongjiu.lu@intel.com>

	* argv.c (dupargv): Replace malloc with xmalloc.  Don't check

opcodes/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.
2012-09-10 17:00:44 +00:00
Alan Modra cdd5a7a495 daily update 2012-09-10 00:00:04 +00:00
Alan Modra 01434335c8 daily update 2012-09-09 00:00:04 +00:00
Alan Modra 5eb2d77496 daily update 2012-09-08 00:00:04 +00:00
Alan Modra a924239e98 daily update 2012-09-07 00:00:04 +00:00
Alan Modra c04ca053c8 daily update 2012-09-06 00:00:05 +00:00
Alan Modra f54ae065b8 daily update 2012-09-05 00:00:04 +00:00
H.J. Lu b3e14edafc Add Intel Itanium Series 9500 support
bfd/

2012-09-04  Sergey A. Guriev <sergey.a.guriev@intel.com>

	* cpu-ia64-opc.c (ins_cnt6a): New function.
	(ext_cnt6a): Ditto.
	(ins_strd5b): Ditto.
	(ext_strd5b): Ditto.
	(elf64_ia64_operands): Add new operand types.

gas/

2012-09-04  Sergey A. Guriev  <sergey.a.guriev@intel.com>

	* config/tc-ia64.c (reg_symbol): Add a new register.
	(indirect_reg): Ditto.
	(pseudo_func): Add new symbolic constants.
	(operand_match): Add new operand types recognition.
	(operand_insn): Add new register recognition.
	(md_begin): Add new register definition.
	(specify_resource): Add new register recognition.

gas/testsuite/

2012-09-04  Sergey A. Guriev  <sergey.a.guriev@intel.com>

	* gas/testsuite/gas/ia64/psn.d: New file.
	* gas/testsuite/gas/ia64/psn.s: New file.
	* gas/testsuite/gas/ia64/ia64.exp: Add new testcase.
	* gas/testsuite/gas/ia64/opc-i.d: Fixed failing tests.
	* gas/testsuite/gas/ia64/opc-m.d: Ditto.

include/opcode/

2012-09-04  Sergey A. Guriev <sergey.a.guriev@intel.com>

	* ia64.h (ia64_opnd): Add new operand types.

opcodes/

2012-09-04  Sergey A. Guriev <sergey.a.guriev@intel.com>

	* ia64-asmtab.h (completer_index): Extend bitfield to full uint.
	* ia64-gen.c: Promote completer index type to longlong.
	(irf_operand): Add new register recognition.
	(in_iclass_mov_x): Add an entry for the new mov_* instruction type.
	(lookup_specifier): Add new resource recognition.
	(insert_bit_table_ent): Relax abort condition according to the
	changed completer index type.
	(print_dis_table): Fix printf format for completer index.
	* ia64-ic.tbl: Add a new instruction class.
	* ia64-opc-i.c (ia64_opcodes_i): Define new I-instructions.
	* ia64-opc-m.c (ia64_opcodes_m): Define new M-instructions.
	* ia64-opc.h: Define short names for new operand types.
	* ia64-raw.tbl: Add new RAW resource for DAHR register.
	* ia64-waw.tbl: Add new WAW resource for DAHR register.
	* ia64-asmtab.c: Regenerate.
2012-09-04 13:52:06 +00:00
H.J. Lu c6d8cab4ac Ignore section symbols without a BFD section
bfd/

	PR binutils/14493
	* elf.c (ignore_section_sym): Also ignore section symbols without
	a BFD section.

binutils/

	PR binutils/14493
	* readelf.c (get_symbol_index_type): Check bad section index.
2012-09-04 12:35:35 +00:00
Alan Modra bc36528588 daily update 2012-09-04 00:00:05 +00:00
Andreas Krebbel 31db78f6a3 2012-09-03 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for
	local and global ifunc symbols.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
2012-09-03 12:03:48 +00:00
Alan Modra a1846e5efd daily update 2012-09-03 00:00:04 +00:00
H.J. Lu 9637f6ef78 Add hdynamic to elf_link_hash_table for _DYNAMIC
* elf-bfd.h (elf_link_hash_table): Add hdynamic for the
	_DYNAMIC symbol.

	* elflink.c (_bfd_elf_link_create_dynamic_sections): Set
	hdynamic.

	* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
	hdynamic instead of "_DYNAMIC".
	* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
	* elf32-cr16.c (elf32_arm_finish_dynamic_symbol): Likewise.
	* elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
	* elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
	* elf32-i386.c (elf_i386_convert_mov_to_lea): Likewise.
	* elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
	* elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
	* elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
	* elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
	* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
	* elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
	* elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
	* elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
	* elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
	* elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
	* elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
	* elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
	* elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
	* elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
	* elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.

	* elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
	hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
	_PROCEDURE_LINKAGE_TABLE_.
	* elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
	* elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
2012-09-02 12:17:27 +00:00
Alan Modra 84af8ae704 daily update 2012-09-02 00:00:04 +00:00
H.J. Lu 3f65f59941 Don't optimize relocation against _DYNAMIC
bfd/

	* elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize
	_DYNAMIC.
	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.

ld/testsuite/

	* ld-i386/i386.exp: Run mov1a, mov1b.
	* ld-x86-64/x86-64.exp: Run mov1a, mov1b, mov1c, mov1d.

	* ld-i386/mov1.s: New file.
	* ld-i386/mov1a.d: Likewise.
	* ld-i386/mov1b.d: Likewise.
	* ld-x86-64/mov1.s: Likewise.
	* ld-x86-64/mov1a.d: Likewise.
	* ld-x86-64/mov1b.d: Likewise.
	* ld-x86-64/mov1c.d: Likewise.
	* ld-x86-64/mov1d.d: Likewise.
2012-09-01 02:50:14 +00:00
Alan Modra b26f964d46 daily update 2012-09-01 00:00:05 +00:00
H.J. Lu daa6760707 Convert mov to lea in size_dynamic_sections
bfd/

	* elf32-i386.c (elf_i386_convert_mov_to_lea): New.
	(elf_i386_size_dynamic_sections): Use it on input sections.
	(elf_i386_relocate_section): Don't convert
	"mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
	for local symbols here.

	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New.
	(elf_x86_64_size_dynamic_sections): Use it on input sections.
	(elf_x86_64_relocate_section): Don't convert
	"mov foo@GOTPCREL(%rip), %reg" to "lea foo@GOTOFF(%reg), %reg"
	for local symbols.

ld/testsuite/

	* ld-i386/i386.exp: Run lea1d, lea1f, lea1f.
	* ld-x86-64/x86-64.exp: Run lea1g, lea1h, lea1i, lea1j, lea1k,
	lea1l.

	* ld-ifunc/ifunc-13-i386.d: Remove R_386_RELATIVE entry.

	* ld-i386/lea1d.d: New file.
	* ld-i386/lea1e.d: Likewise.
	* ld-i386/lea1f.d: Likewise.
	* ld-x86-64/lea1g.d: Likewise.
	* ld-x86-64/lea1h.d: Likewise.
	* ld-x86-64/lea1i.d: Likewise.
	* ld-x86-64/lea1j.d: Likewise.
	* ld-x86-64/lea1k.d: Likewise.
	* ld-x86-64/lea1l.d: Likewise.
2012-08-31 20:41:41 +00:00
H.J. Lu 80d873266d Convert mov to lea for loading local function address
bfd/

	* elf32-i386.c (elf_i386_relocate_section): Convert
	"mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
	for local symbols.

	* elf64-x86-64.c (elf_x86_64_relocate_section): Convert
	"mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
	for local symbols.

ld/testsuite/

	* ld-i386/i386.exp: Run lea1a, lea1b, lea1c.
	* ld-x86-64/x86-64.exp: Run lea1a, lea1b, lea1c, lea1d, lea1e,
	lea1f.

	* ld-i386/lea1.s: New file.
	* ld-i386/lea1a.d: Likewise.
	* ld-i386/lea1b.d: Likewise.
	* ld-i386/lea1c.d: Likewise.
	* ld-x86-64/lea1.s: Likewise.
	* ld-x86-64/lea1a.d: Likewise.
	* ld-x86-64/lea1b.d: Likewise.
	* ld-x86-64/lea1c.d: Likewise.
	* ld-x86-64/lea1d.d: Likewise.
	* ld-x86-64/lea1e.d: Likewise.
	* ld-x86-64/lea1f.d: Likewise.
2012-08-31 04:26:17 +00:00
Alan Modra b69fdb4ec9 PR ld/14464
* elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined
	by a linker script in .opd to corresponding input .opd section.
2012-08-31 02:42:57 +00:00
Alan Modra 54e9ecdd08 daily update 2012-08-31 00:00:04 +00:00
Alan Modra a1ebec4d51 daily update 2012-08-30 00:00:04 +00:00
Alan Modra a8225a064a daily update 2012-08-29 00:00:05 +00:00
Maciej W. Rozycki 14acf4dcae * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is
not minus one.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2012-08-28 20:17:56 +00:00
Maciej W. Rozycki aed81c4e9c * elflink.c (_bfd_elf_merge_symbol): Also override the version
a dynamic symbol defaulted to if preempted with a hidden or
	internal definition.
2012-08-28 20:13:27 +00:00
Walter Lee 663b585012 Add padding to the plt section so that its size is a multiple of its
entry size.
	* elf32-tilepro.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
	of header.
	(tilepro_plt_entry_build): Account for new header size.
	(tilepro_elf_finish_dynamic_sections): Ditto.
	(tilepro_elf_plt_sym_val): Ditto.
	* elfxx-tilegx.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
	of header + tail.
	(tilegx_elf_finish_dynamic_sections): Account for new padding.
2012-08-28 06:28:31 +00:00
Walter Lee e5b95258d9 Add support for constructing pc-relative addresses to the plt, by
adding the necessary assembly operators and relocations.

bfd:
	* reloc.c (Add BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
	BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): new relocations.
	* elfxx-tilegx.c (tilegx_elf_howto_table): Handle new relocations.
	(tilegx_reloc_map): Ditto.
	(reloc_to_create_func): Ditto.
	(tilegx_elf_check_relocs): Ditto.
	(tilegx_elf_gc_sweep_hook): Ditto.
	(tilegx_elf_relocate_section): Ditto.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.

gas:
	* tc-tilegx.c (O_hw0_plt): Define operator.
	(O_hw1_plt): Ditto.
	(O_hw1_last_plt): Ditto.
	(O_hw2_last_plt): Ditto.
	(md_begin): Handle new operators.
	(emit_tilegx_instruction): Ditto.
	(md_apply_fix): Ditto.
	* doc/c-tilegx.texi: Document new operators.

include/elf:
	* tilegx.h (R_TILEGX_IMM16_X0_HW0_PLT_PCREL): New relocation.
	(R_TILEGX_IMM16_X1_HW0_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X0_HW1_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X1_HW1_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X0_HW2_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X1_HW2_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X0_HW3_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X1_HW3_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL): Ditto.
	(R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL	): Ditto.
	(R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): Ditto.
2012-08-28 02:43:22 +00:00
Alan Modra aedbcd6364 daily update 2012-08-28 00:00:04 +00:00
Alan Modra f4b8daea2a daily update 2012-08-27 00:00:04 +00:00
Alan Modra 1cad2cc312 daily update 2012-08-26 00:00:04 +00:00
Alan Modra 7ea030394b daily update 2012-08-25 00:00:05 +00:00
Matthew Gretton-Dann bca3892142 * bfd/elf32-arm.c (v8): New array.
(tag_cpu_arch_combine): Add support for ARMv8 attributes.
	(elf32_arm_merge_eabi_attributes): Likewise.
	(VFP_VERSION_COUNT): New define.
	* binutils/readelf.c (arm_attr_tag_CPU_arch): Update for ARMv8.
	(arm_attr_tag_FP_arch): Likewise.
	(arm_attr_tag_Advanced_SIMD_arch): Likewise.
	* gas/config/tc-arm.h (arm_ext_v8): New variable.
	(fpu_vfp_ext_armv8): Likewise.
	(fpu_neon_ext_armv8): Likewise.
	(fpu_crypto_ext_armv8): Likewise.
	(arm_archs): Add armv8-a.
	(arm_extensions): Add crypto, fp, and simd.
	(arm_fpus): Add fp-armv8, neon-fp-armv8, crypto-neon-fp-armv8.
	(cpu_arch_ver): Add support for ARMv8.
	(aeabi_set_public_sttributes): Likewise.
	* gas/doc/c-arm.texi (ARM Options): Document new architecture and
	extension options for ARMv8.
	* gas/testsuite/gas/arm/attr-march-all.d: Update for change in expected
	output.
	* gas/testsuite/gas/arm/attr-mfpu-vfpv4-d16.d: Likewise.
	* gas/testsuite/gas/arm/attr-mfpu-vfpv4.d: Likewise.
	* gas/testsuite/gas/arm/attr-march-armv8-a+crypto.d: New testcase.
	* gas/testsuite/gas/arm/attr-march-armv8-a+fp.d: Likewise.
	* gas/testsuite/gas/arm/attr-march-armv8-a+simd.d: Likewise.
	* gas/testsuite/gas/arm/attr-march-armv8-a.d: Likewise.
	* include/elf/arm.h (TAG_CPU_ARCH_V8): New define.
	(MAX_TAG_CPU_ARCH): Update.
	* include/opcode/arm.h (ARM_EXT_V8): New define.
	(FPU_VFP_EXT_ARMV8): Likewise.
	(FPU_NEON_EXT_ARMV8): Likewise.
	(FPU_CRYPTO_EXT_ARMV8): Likewise.
	(ARM_AEXT_V8A): Likewise.
	(FPU_VFP_ARMV8): Likwise.
	(FPU_NEON_ARMV8): Likewise.
	(FPU_CRYPTO_ARMV8): Likewise.
	(FPU_ARCH_VFP_ARMV8): Likewise.
	(FPU_ARCH_NEON_VFP_ARMV8): Likewise.
	(FPU_ARCH_CRYPTO_NEON_VFP_ARMV8): Likewise.
	(ARM_ARCH_V8A): Likwise.
	(ARM_ARCH_V8A_FP): Likewise.
	(ARM_ARCH_V8A_SIMD): Likewise.
	(ARM_ARCH_V8A_CRYPTO): Likewise.
	* ld/testsuite/ld-arm/arm-elf.exp: Add new testcases.
	* ld/testsuite/ld-arm/attr-merge-vfp-3.d: Update for change in expected
	output.
	* ld/testsuite/ld-arm/attr-merge-vfp-3r.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-4.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-4r.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-5.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-5r.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-7.d: New testcase.
	* ld/testsuite/ld-arm/attr-merge-vfp-7r.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-armv8-hard.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-armv8.s: Likewise.
2012-08-24 07:50:38 +00:00
Alan Modra e9a283e631 daily update 2012-08-24 00:00:05 +00:00
Alan Modra 7c2df51f4c daily update 2012-08-23 00:00:04 +00:00
Alan Modra 44de515932 daily update 2012-08-22 00:00:04 +00:00
Alan Modra 8fdefd9836 daily update 2012-08-21 00:00:05 +00:00
Tom Tromey 06e7acd76f * vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
areltdata.
	* opncls.c (_bfd_delete_bfd): Free arelt_data.
	* mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
	areltdata.
	* ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
	* coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
	areltdata.
	(xcoff_write_archive_contents_old): Likewise.
	(xcoff_write_archive_contents_big): Likewise.
	* archive64.c (bfd_elf64_archive_slurp_armap): Use free for
	areltdata.
	* archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
	free for areltdata.
	(_bfd_get_elt_at_filepos): Likewise.  Clear n_nfd->arelt_data on
	failure.
	(do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
	(do_slurp_coff_armap): Likewise.
	(_bfd_slurp_extended_name_table): Likewise.
	(bfd_slurp_bsd_armap_f2): Likewise.  Don't leak 'mapdata'.
2012-08-20 14:32:31 +00:00
Alan Modra f1d4a2242f daily update 2012-08-20 00:00:04 +00:00
Alan Modra f8aa133dce daily update 2012-08-19 00:00:04 +00:00
Alan Modra 1df9735d1c daily update 2012-08-18 00:00:05 +00:00