Commit Graph

8581 Commits

Author SHA1 Message Date
Alan Modra c9e60eabbf daily update 2010-08-08 00:00:05 +00:00
Alan Modra 8574ee7158 daily update 2010-08-07 00:00:06 +00:00
Alan Modra 5044134579 daily update 2010-08-06 00:00:06 +00:00
Alan Modra d983b7a0c3 * elf64-ppc.c (ha_reloc_match): Allow matches to other than r2.
(ppc64_elf_relocate_section): Nop out high part insn of large toc
	code sequence when the high part of offset is zero.
2010-08-05 14:37:30 +00:00
Alan Modra 24f928ebe1 daily update 2010-08-05 00:00:05 +00:00
Tristan Gingold 1bed7b84a2 Add a missing chunk. 2010-08-04 11:55:20 +00:00
Tristan Gingold 79326a5a88 2010-08-04 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_build_fixups): Write the EICP.
	(alpha_vms_bfd_final_link): Explicitly forbid relocatable links.
	Clear the SEC_RELOC flag.
2010-08-04 10:45:51 +00:00
Tristan Gingold 5f101a3d6f 2010-08-04 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_create_eisd_for_section): Make writable
	sections with relocs.
	(alpha_vms_add_fixup_lp): Set SEC_RELOC flag.
	(alpha_vms_add_fixup_ca): Ditto.
	(alpha_vms_add_fixup_qr): Ditto.
	Add comments.
2010-08-04 10:22:14 +00:00
Tristan Gingold 2e09dbaeac 2010-08-04 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_create_eisd_for_section): Do not make
	CODE sections writable.
2010-08-04 08:44:07 +00:00
Tristan Gingold 5369db0a6f 2010-08-04 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_add_lw_fixup): Renamed to ...
	(alpha_vms_add_fixup_lr): ... this for consistency.
	(alpha_vms_add_qw_fixup): Removed.
	Fix some comments.
	(vms_get_symbol_info): Adjust type for unknown sections.
2010-08-04 08:20:57 +00:00
Tristan Gingold 21e003e806 2010-08-04 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (_bfd_vms_slurp_egsd): Use the canonical absolute
	section for any absolute section.  Remove some debugging code.
2010-08-04 07:50:40 +00:00
DJ Delorie e1be4b136f * elf32-m32c.c (ELF_MAXPAGESIZE): Change page size to 256 bytes. 2010-08-04 03:42:45 +00:00
Alan Modra 7d1a222776 daily update 2010-08-04 00:00:05 +00:00
Tristan Gingold bfea910e97 2010-08-03 Tristan Gingold <gingold@adacore.com>
* vms-misc.c (vms_convert_to_var): Make it static.
	(_bfd_vms_convert_to_var_unix_filename): Make it public.
2010-08-03 15:18:51 +00:00
Tristan Gingold 1222b29101 bfd/
2010-08-03  Tristan Gingold  <gingold@adacore.com>

	* makefile.vms (OBJS): Update list.

gas/
Index: gas/ChangeLog
2010-08-03  Tristan Gingold  <gingold@adacore.com>

	* makefile.vms (OBJS): Add Add compress-debug.c.
2010-08-03 14:29:00 +00:00
Tristan Gingold 5621317228 2010-08-03 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (_bfd_vms_slurp_egsd): Do not set SEC_HAS_CONTENTS
	nor SEC_RELOC for empty sections.
2010-08-03 09:26:30 +00:00
Tristan Gingold d833fa0d58 2010-08-03 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (evax_section_flags): Fix flags for absolute
	section.  Remove useless parenthesis.
2010-08-03 09:21:09 +00:00
Tristan Gingold 22b6a042aa 2010-08-03 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (vms_lib_bread_raw): Change type of BUF argument.
	(vms_lib_bread, vms_lib_bopen): Adjust.
2010-08-03 08:49:01 +00:00
Alan Modra 12c04d6fab daily update 2010-08-03 00:00:06 +00:00
Alan Modra 85cfcbfb1a PR 11866
* elf.c (assign_file_positions_for_load_sections): Use p_vaddr to
	calculate off_adjust rather than first section vma.
2010-08-02 10:08:02 +00:00
Alan Modra 1245c354f3 daily update 2010-08-02 00:00:05 +00:00
Alan Modra 5098892f13 daily update 2010-08-01 00:00:05 +00:00
Alan Modra 7d7832c110 daily update 2010-07-31 00:00:06 +00:00
H.J. Lu b20dd2ce19 Add ATTRIBUTE_UNUSED to info in compute_bucket_count.
2010-07-30  H.J. Lu  <hongjiu.lu@intel.com>

	* elflink.c (compute_bucket_count): Add ATTRIBUTE_UNUSED to info.
2010-07-30 16:29:58 +00:00
Anthony Green e95c64cb3b Add moxie-rtems support 2010-07-30 07:32:18 +00:00
Alan Modra 401629057d daily update 2010-07-30 00:00:05 +00:00
Alan Modra d62b368413 * elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in
.toc section, even when none are used in relocs.
2010-07-29 07:35:58 +00:00
Alan Modra 69b4f92e2c daily update 2010-07-29 00:00:05 +00:00
Alan Modra 4a4a792cf3 daily update 2010-07-28 00:00:05 +00:00
Maciej W. Rozycki 9684f07814 * elfxx-mips.h: Include "elf/mips.h".
(gprel16_reloc_p): New static inline function.
	* elfxx-mips.c (_bfd_mips_elf_check_relocs)
	[R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]:
	Use got16_reloc_p.
	(_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use
	gprel16_reloc_p.
	* elf32-mips.c (mips_info_to_howto_rel): Likewise.
	* elfn32-mips.c (mips_info_to_howto_rel): Likewise.
2010-07-27 21:18:52 +00:00
Maciej W. Rozycki 2b2c11bd2d Fix up last ChangeLog entry in gas/ and bfd/. 2010-07-27 21:14:49 +00:00
Maciej W. Rozycki 667bf02aed * elf64-mips.c (mips_elf64_howto_table_rela)
[R_MIPS_TLS_DTPMOD64]: Clear partial_inplace.
	[R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
	[R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
	[R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise.
	[R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
	* elfn32-mips.c (elf_mips_howto_table_rela)
	[R_MIPS_TLS_DTPMOD32]: Likewise.
	[R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
	[R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
	[R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise.
	[R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
2010-07-27 21:08:33 +00:00
Alan Modra ad0a41197c daily update 2010-07-26 00:00:05 +00:00
Alan Modra bcd065d860 daily update 2010-07-25 00:00:05 +00:00
Alan Modra dfe5355771 daily update 2010-07-24 00:00:05 +00:00
Nick Clifton 1cd986c585 Add support for v850E2 and v850E2V3 2010-07-23 14:52:54 +00:00
Alan Modra 3895431c5c daily update 2010-07-23 00:00:05 +00:00
Alan Modra 21fd2dbd9c * archive.c (_bfd_archive_bsd44_construct_extended_name_table):
Correct format specifier.
2010-07-22 14:48:54 +00:00
Alan Modra c6a3cf87fb * ecoff.c: Don't include aout/ranlib.h.
(_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs.
	(_bfd_ecoff_write_armap): Output ar_date and ar_size using
	_bfd_ar_spacepad.
2010-07-22 14:29:15 +00:00
Alan Modra 4c1534c7a2 * aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
relocs.
2010-07-22 14:07:10 +00:00
Alan Modra cdb3517eda daily update 2010-07-22 00:00:05 +00:00
Alan Modra 9e4c26773e daily update 2010-07-21 00:00:05 +00:00
Alan Modra f463846733 include/elf/
* internal.h (ELF_TBSS_SPECIAL): New macro, extracted from..
	(ELF_SECTION_SIZE): ..here.
	(ELF_SECTION_IN_SEGMENT_1): Add "strict" arg.
	(ELF_SECTION_IN_SEGMENT_STRICT): New macro.
bfd/
	* elf.c (assign_file_positions_for_load_sections): Check that
	zero size sections are allocated in segments too.
	(assign_file_positions_for_non_load_sections): Warn if zero
	size alloc sections are found here.
	(copy_elf_program_header): Don't drop zero size sections from
	segment map.
	(copy_private_bfd_data): Check for changes in zero size sections.
binutils/
	* readelf.c (process_program_headers): Don't ignore all zero size
	sections.
ld/testsuite/
	* ld-powerpc/tlsexe.r: Update.
	* ld-powerpc/tlsexetoc.r: Update.
	* ld-powerpc/tlsso.r: Update.
	* ld-powerpc/tlstocso.r: Update.
2010-07-20 14:08:32 +00:00
Alan Modra 64d56c1bab daily update 2010-07-20 00:00:05 +00:00
Alan Modra 06e700d6a2 daily update 2010-07-19 00:00:05 +00:00
Alan Modra 7903b87cf2 daily update 2010-07-18 00:00:05 +00:00
Alan Modra b559959291 * elf.c (_bfd_elf_map_sections_to_segments): Force new segment
for sections with overlapping LMAs.
	(assign_file_positions_for_load_sections): Catch overlap for
	sections that wrap around the address space.  Replace a
	warning that duplicates ld's --check-sections error with a
	warning that lma has been adjusted for overlapping sections.
2010-07-17 03:10:50 +00:00
Alan Modra 34220e965e daily update 2010-07-17 00:00:05 +00:00
Alan Modra a522592fd2 daily update 2010-07-16 00:00:05 +00:00
Alan Modra 26e57e79fe daily update 2010-07-15 00:00:05 +00:00
Cary Coutant 8c2ccebd6b PR ld/11817
* dwarf2.c (read_section): Revert patch for compressed debug sections.
	(find_line): Likewise.
	(read_and_uncompress_section): Remove.
2010-07-14 22:18:07 +00:00
H.J. Lu a7b16ceb92 Don't allocate .got.plt section if there are no GOT nor PLT entries.
bfd/

2010-07-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11812
	* elf32-i386.c (elf_i386_size_dynamic_sections): Don't
	 allocate .got.plt section if there are no GOT nor PLT
	 entries.
	 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.

ld/testsuite/

2010-07-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11812
	* ld-elf/exclude3b.d: Don't run on ia64-*-*.  Replace .got with
	.dynamic.

	* ld-elf/exclude3d.d: New.
	* ld-i386/nogot1.d: Likewise.
	* ld-i386/nogot1.s: Likewise.
	* ld-x86-64/nogot1.d: Likewise.
	* ld-x86-64/nogot1.s: Likewise.

	* ld-i386/i386.exp: Run nogot1.
	* ld-x86-64/x86-64.exp: Likewise.
2010-07-14 00:30:57 +00:00
Alan Modra 6ae10a3087 daily update 2010-07-14 00:00:05 +00:00
H.J. Lu bb1cb422ae Support garbage collection against STT_GNU_IFUNC symbols.
bfd/

2010-07-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11791
	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support
	garbage collection against STT_GNU_IFUNC symbols.

	* elf32-i386.c (elf_i386_get_local_sym_hash): Don't set
	elf.plt.offset/elf.got.offset to -1.
	(elf_i386_tls_transition): Skip TLS transition for functions.
	(elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols.

	* elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set
	elf.plt.offset/elf.got.offset to -1.
	(elf64_x86_64_tls_transition): Skip TLS transition for functions.
	(elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols.

ld/testsuite/

2010-07-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11791
	* ld-ifunc/ifunc-10-i386.d: New.
	* ld-ifunc/ifunc-10-i386.s: Likewise.
	* ld-ifunc/ifunc-10-x86-64.d: Likewise.
	* ld-ifunc/ifunc-10-x86-64.s: Likewise.
	* ld-ifunc/ifunc-11-i386.d: Likewise.
	* ld-ifunc/ifunc-11-i386.s: Likewise.
	* ld-ifunc/ifunc-11-x86-64.d: Likewise.
	* ld-ifunc/ifunc-11-x86-64.s: Likewise.
2010-07-13 16:59:14 +00:00
Alan Modra b4d0d1cbc6 daily update 2010-07-13 00:00:05 +00:00
H.J. Lu 9fff0c3957 Re-indent elf32-i386.c.
2010-07-12  H.J. Lu  <hongjiu.lu@intel.com>

	* elf32-i386.c (elf_i386_check_relocs): Re-indent.
	(elf_i386_relocate_section): Likewise.
2010-07-12 21:13:24 +00:00
Alan Modra 33b86f95af daily update 2010-07-12 00:00:06 +00:00
Alan Modra 5fda0a8ef7 daily update 2010-07-11 00:00:05 +00:00
Alan Modra 6115433e78 daily update 2010-07-10 00:00:06 +00:00
Alan Modra 9818e16ce9 daily update 2010-07-09 00:00:05 +00:00
Alan Modra c2397eaa93 daily update 2010-07-08 00:00:05 +00:00
Alan Modra 9176f4dfdc daily update 2010-07-07 00:00:07 +00:00
H.J. Lu f5296ddc5e Initialize prev_line.
2010-07-06  H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2.c (add_line_info): Initialize prev_line.
2010-07-06 21:13:57 +00:00
Alan Modra 50248c890f bfd/
* elf32-ppc.c (ppc_elf_relax_section): Insert branch around
	trampolines only for .init and .fini sections.
ld/testsuite/
	* ld-powerpc/relax.s: Add branch back to _start.
	* ld-powerpc/relax.d: Update.
	* ld-powerpc/relaxr.d: Update.
2010-07-06 09:29:47 +00:00
Alan Modra bf501491ea daily update 2010-07-06 00:00:05 +00:00
Alan Modra 5b9144488e * elf32-ppc.c: Formatting.
(ppc_elf_finish_dynamic_sections): Don't make plt_entry var static.
2010-07-05 13:34:27 +00:00
Alan Modra 541f9b9bd3 daily update 2010-07-05 00:00:05 +00:00
Alan Modra 93ebf8cec2 daily update 2010-07-04 00:00:04 +00:00
Cary Coutant 0acf065b19 bfd/ChangeLog:
* compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED.
	* dwarf2.c (read_and_uncompress_section): New function.
	(read_section): Call it.
	(find_line): Likewise.

binutils/ChangeLog:

	* objdump.c (load_specific_debug_section): Decompress section contents
	before applying relocations.
	* readelf.c (load_specific_debug_section): Update section size after
	decompression.

gas/ChangeLog:

	* Makefile.am: Add compress-debug.c and compress-debug.h.
	* Makefile.in: Regenerate.
	* config.in: Add HAVE_ZLIB_H.
	* configure.in: Check for zlib.h.
	* configure: Regenerate.

	* as.c (parse_args): Add --compress-debug-sections and
	--nocompress-debug-sections.
	* as.h (flag_compress_debug): New variable.
	* compress-debug.c: New file.
	* compress-debug.h: New file.
	* write.c: Include compress-debug.h.
	(compress_frag): New function.
	(compress_debug): New function.
	(write_object_file): Compress debug sections if requested.
2010-07-03 20:52:24 +00:00
Alan Modra d66fd647e6 daily update 2010-07-03 00:00:05 +00:00
Alan Modra fd2ec336c8 daily update 2010-07-02 00:00:05 +00:00
Alan Modra 726d3ab069 * elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_CALLS_LOCAL rather
than SYMBOL_REFERENCES_LOCAL.
	(ppc64_elf_relocate_section): Likewise.
2010-07-01 09:48:26 +00:00
Alan Modra bddc25c9ca * elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs. 2010-07-01 04:12:29 +00:00
Alan Modra 4355d58b1e daily update 2010-07-01 00:00:05 +00:00
Alan Modra 039ba22f21 daily update 2010-06-30 00:00:05 +00:00
Alan Modra 360cfc9c8b remove maxq-coff port 2010-06-29 04:17:34 +00:00
Alan Modra 2ffb598f47 daily update 2010-06-29 00:00:04 +00:00
Alan Modra 3f062f4418 * compress.c (bfd_uncompress_section_contents): Use ATTRIBUTE_UNUSED
to silence gcc warning.
2010-06-28 14:41:11 +00:00
Alan Modra fc63f3ec4e daily update 2010-06-28 00:00:06 +00:00
Alan Modra 6bee8834bf * elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data.
(group_sections): Likewise.
2010-06-27 08:37:22 +00:00
Alan Modra c7e2358a88 fix set but unused variable warnings 2010-06-27 04:07:55 +00:00
Alan Modra 1addfd92eb daily update 2010-06-27 00:00:05 +00:00
Alan Modra 3c1b3731d3 daily update 2010-06-26 00:00:05 +00:00
Tristan Gingold 4ba2ab9fc3 2010-06-25 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with
	its flags.  Create an absolute section if needed.
2010-06-25 15:37:43 +00:00
Tristan Gingold 1b3d1dbfad 2010-06-25 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (_bfd_vms_write_egsd): Set target_index field of
	sections.  Mark .vmsdebug section as SEC_DEBUGGING.  Do not create
	dummy psect anymore.  Adjust.
	(_bfd_vms_write_eeom): Adjust (use target_index instead of index)
	(_bfd_vms_write_etir): Ditto.
	(start_etir_or_etbt_record): Test for SEC_DEBUGGING instead of
	section name.  Adjust.
2010-06-25 15:21:48 +00:00
Tristan Gingold 9714ee4866 2010-06-25 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_write_exec): Set linktime field.
2010-06-25 14:54:19 +00:00
Alan Modra ba761f19f5 include/elf/
* ppc64.h (R_PPC64_LO_DS_OPT): Define.
bfd/
	* elf64-ppc.c (toc_skip_enum): Define.
	(ppc64_elf_edit_toc): Use two low bits of skip array as markers.
	Optimize largetoc sequences.
	(adjust_toc_syms): Update for skip array change.
	(ppc64_elf_relocate_section): Handle R_PPC64_LO_DS_OPT.
ld/
	* emultempl/ppc64elf.em (prelim_size_sections): New function.
	(ppc_before_allocation): Use it.  Size sections before toc edit too.
2010-06-25 05:20:57 +00:00
Alan Modra 854b41e7c1 * elf64-ppc.c (is_static_defined): New function.
(get_tls_mask, ppc_type_of_stub): Use it here.
	(ppc64_elf_edit_opd): Ensure we only attempt to edit ppc64 input.
	(ppc64_elf_tls_setup): Typo fix.
	(adjust_toc_syms): Correctly handle symbols defined past the end
	of the toc.  Move syms on removed entries to next entry rather
	than to start of toc.
	(ppc64_elf_edit_toc): Likewise.  Ensure we only attempt to
	edit ppc64 input.  Allocate one extra word in skip array.
	Honour info->keep_memory when reading relocs if we can.
	Adjust toc relocs after adjusting symbols.
2010-06-25 03:46:04 +00:00
Alan Modra 591094244f daily update 2010-06-25 00:00:04 +00:00
Alan Modra 2721bf3de3 daily update 2010-06-24 00:00:08 +00:00
Nathan Sidwell 61e8a5ea17 * archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun
when scaning map.
2010-06-23 10:21:16 +00:00
Alan Modra 3fe1017350 daily update 2010-06-23 00:00:05 +00:00
Alan Modra 25af11d544 daily update 2010-06-22 00:00:05 +00:00
Alan Modra 89e38f6b1a daily update 2010-06-21 00:00:05 +00:00
Alan Modra d02ea25b1f daily update 2010-06-20 00:00:05 +00:00
Alan Modra 9d05e900fc daily update 2010-06-19 00:00:05 +00:00
Alan Modra ba71cf6fa1 daily update 2010-06-18 00:00:04 +00:00
Tristan Gingold 24df9a516a 2010-06-17 Tristan Gingold <gingold@adacore.com>
* Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ...
	(BFD64_BACKENDS_CFILES): ... here.
	(BFD32_BACKENDS): Move vms-alpha.lo to ...
	(BFD64_BACKENDS): ... here.
	* Makefile.in: Regenerate.
2010-06-17 08:19:14 +00:00
Alan Modra dfeb34fb1a daily update 2010-06-17 00:00:05 +00:00
Joseph Myers 59e6276b64 bfd:
* elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2.
	* elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type,
	elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes,
	elf32_tic6x_merge_private_bfd_data): New.
	(bfd_elf32_bfd_merge_private_bfd_data,
	elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section,
	elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor):
	Define.
	* elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare.

binutils:
	* readelf.c (display_tic6x_attribute, process_tic6x_specific):
	New.
	(process_arch_specific): Call process_tic6x_specific for
	EM_TI_C6000.

gas:
	* config/tc-tic6x.c: Include elf/tic6x.h.
	(tic6x_arch_attribute, tic6x_seen_insns): New.
	(tic6x_arch_table, tic6x_arches): Add attribute values.
	(tic6x_use_arch): Handle attribute settings.
	(tic6x_attributes_set_explicitly, s_tic6x_c6xabi_attribute,
	tic6x_attribute_table, tic6x_attributes,
	tic6x_convert_symbolic_attribute): New.
	(md_pseudo_table): Add c6xabi_attribute.
	(md_assemble): Set tic6x_seen_insns and tic6x_arch_attribute.
	(tic6x_set_attribute_int, tic6x_set_attributes): New.
	(tic6x_end): Call tic6x_set_attributes.
	* config/tc-tic6x.h (CONVERT_SYMBOLIC_ATTRIBUTE): Define.
	(tic6x_convert_symbolic_attribute): Declare.

gas/testsuite:
	* gas/elf/elf.exp: Set target_machine for tic6x-*-*.
	* gas/elf/section2.e-tic6x, gas/tic6x/attr-arch-directive-1.d,
	gas/tic6x/attr-arch-directive-1.s,
	gas/tic6x/attr-arch-directive-2.d,
	gas/tic6x/attr-arch-directive-2.s,
	gas/tic6x/attr-arch-directive-3.d,
	gas/tic6x/attr-arch-directive-3.s,
	gas/tic6x/attr-arch-directive-4.d,
	gas/tic6x/attr-arch-directive-4.s,
	gas/tic6x/attr-arch-directive-5.d,
	gas/tic6x/attr-arch-directive-5.s,
	gas/tic6x/attr-arch-opts-c62x.d, gas/tic6x/attr-arch-opts-c64x+.d,
	gas/tic6x/attr-arch-opts-c64x.d, gas/tic6x/attr-arch-opts-c674x.d,
	gas/tic6x/attr-arch-opts-c67x+.d, gas/tic6x/attr-arch-opts-c67x.d,
	gas/tic6x/attr-arch-opts-none-1.d,
	gas/tic6x/attr-arch-opts-none-2.d,
	gas/tic6x/attr-arch-opts-override-1.d,
	gas/tic6x/attr-arch-opts-override-2.d, gas/tic6x/empty.s: New.

include/elf:
	* tic6x-attrs.h: New.
	* tic6x.h: Include elf/tic6x-attrs.h for attribute table.
	(C6XABI_Tag_CPU_arch_none, C6XABI_Tag_CPU_arch_C62X,
	C6XABI_Tag_CPU_arch_C67X, C6XABI_Tag_CPU_arch_C67XP,
	C6XABI_Tag_CPU_arch_C64X, C6XABI_Tag_CPU_arch_C64XP,
	C6XABI_Tag_CPU_arch_C674X): Define.

ld:
	* emulparams/elf32_tic6x_le.sh (ATTRS_SECTIONS): Define.

ld/testsuite:
	* ld-elf/orphan3.d: Allow section names starting '_'.
	* ld-tic6x/attr-arch-c62x-c62x.d, ld-tic6x/attr-arch-c62x-c64x+.d,
	ld-tic6x/attr-arch-c62x-c64x.d, ld-tic6x/attr-arch-c62x-c674x.d,
	ld-tic6x/attr-arch-c62x-c67x+.d, ld-tic6x/attr-arch-c62x-c67x.d,
	ld-tic6x/attr-arch-c62x.s, ld-tic6x/attr-arch-c64x+-c62x.d,
	ld-tic6x/attr-arch-c64x+-c64x+.d, ld-tic6x/attr-arch-c64x+-c64x.d,
	ld-tic6x/attr-arch-c64x+-c674x.d,
	ld-tic6x/attr-arch-c64x+-c67x+.d, ld-tic6x/attr-arch-c64x+-c67x.d,
	ld-tic6x/attr-arch-c64x+.s, ld-tic6x/attr-arch-c64x-c62x.d,
	ld-tic6x/attr-arch-c64x-c64x+.d, ld-tic6x/attr-arch-c64x-c64x.d,
	ld-tic6x/attr-arch-c64x-c674x.d, ld-tic6x/attr-arch-c64x-c67x+.d,
	ld-tic6x/attr-arch-c64x-c67x.d, ld-tic6x/attr-arch-c64x.s,
	ld-tic6x/attr-arch-c674x-c62x.d, ld-tic6x/attr-arch-c674x-c64x+.d,
	ld-tic6x/attr-arch-c674x-c64x.d, ld-tic6x/attr-arch-c674x-c674x.d,
	ld-tic6x/attr-arch-c674x-c67x+.d, ld-tic6x/attr-arch-c674x-c67x.d,
	ld-tic6x/attr-arch-c674x.s, ld-tic6x/attr-arch-c67x+-c62x.d,
	ld-tic6x/attr-arch-c67x+-c64x+.d, ld-tic6x/attr-arch-c67x+-c64x.d,
	ld-tic6x/attr-arch-c67x+-c674x.d,
	ld-tic6x/attr-arch-c67x+-c67x+.d, ld-tic6x/attr-arch-c67x+-c67x.d,
	ld-tic6x/attr-arch-c67x+.s, ld-tic6x/attr-arch-c67x-c62x.d,
	ld-tic6x/attr-arch-c67x-c64x+.d, ld-tic6x/attr-arch-c67x-c64x.d,
	ld-tic6x/attr-arch-c67x-c674x.d, ld-tic6x/attr-arch-c67x-c67x+.d,
	ld-tic6x/attr-arch-c67x-c67x.d, ld-tic6x/attr-arch-c67x.s: New.
2010-06-16 00:36:04 +00:00
Alan Modra 52c51c16aa daily update 2010-06-16 00:00:06 +00:00
Joseph Myers 3de4a297ec * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define.
(struct elf_backend_data): Update comment on obj_attrs_order.
	* elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents,
	_bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
	instead of hardcoded 4.
	* elf32-arm.c (elf32_arm_obj_attrs_order): Use
	LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1
	instead of hardcoded 4 and 5.
	(elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
	instead of hardcoded 4.
2010-06-15 23:10:10 +00:00
Alan Modra d70546dee9 daily update 2010-06-15 00:00:05 +00:00
Kevin Buettner 84477db9a3 * elf32-h8300.c (elf_symbol_leading_char): Define. 2010-06-14 18:43:46 +00:00
Alan Modra edee3f9217 daily update 2010-06-14 00:00:10 +00:00
Alan Modra ecfa514996 daily update 2010-06-13 00:00:07 +00:00
Alan Modra 4f0ac8288f daily update 2010-06-12 00:00:05 +00:00
Jan Kratochvil dddb0e800c bfd/
* vms-alpha.c (_bfd_vms_write_egsd): Make sname const.
2010-06-11 21:12:11 +00:00
Tristan Gingold f654f403d3 2010-06-11 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
	sections to 0.
2010-06-11 15:30:38 +00:00
Tristan Gingold ff150b92be 2010-06-11 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
2010-06-11 15:21:15 +00:00
Tristan Gingold 81bb31c0d9 2010-06-11 Tristan Gingold <gingold@adacore.com>
* vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
	Adjust cast.
	(_bfd_vms_output_dump): Make DATA argument const, adjust cast.
	* vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
	* vms-alpha.c (evax_section_flags): Make it const.
	(vms_secflag_by_name): Remove unused ABFD argument.
	Make SECTION_FLAGS and NAME arguments const. Clarify comment.
	(vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
	(_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
	(_bfd_vms_write_egsd): Remove useless cast.
2010-06-11 15:13:32 +00:00
Alan Modra 9d56a630c7 daily update 2010-06-11 00:00:05 +00:00
Tristan Gingold cb3aabc79c 2010-06-10 Tristan Gingold <gingold@adacore.com>
* config.bfd: Remove #if/#endif so that som can be compiled on any
	host.
	* targets.c (_bfd_target_vector): Remove #if/#endif so that som
	can be used on any host.
2010-06-10 09:02:23 +00:00
Tristan Gingold e1f000f69c bfd/
2010-06-10  Tristan Gingold  <gingold@adacore.com>

	* som.c: Can now be compiled on any host.
	Include bfd headers instead of system one.
	(som_compute_checksum): Parameter is now a pointer to a
	som_external_header structure.  Adjust.
	(struct section_to_type): Field section is now const.
	(R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional
	definition.
	(R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto.
	(R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto.
	(som_swap_clock_in, som_swap_clock_out): New functions.
	(som_swap_header_in, som_swap_header_out): Likewise.
	(som_swap_space_dictionary_in): Likewise.
	(som_swap_space_dictionary_out): Likewise.
	(som_swap_subspace_dictionary_in): Likewise.
	(som_swap_subspace_dictionary_record_out): Likewise.
	(som_swap_aux_id_in, som_swap_aux_id_out): Likewise.
	(som_swap_string_auxhdr_out): Likewise.
	(som_swap_compilation_unit_out): Likewise.
	(som_swap_exec_auxhdr_in): Likewise.
	(som_swap_exec_auxhdr_out): Likewise.
	(som_swap_lst_header_in): Likewise.
	(som_object_setup): Adjust parameter type using bfd types.
	(setup_sections): Likewise.  Ditto for object file types.
	Use intermediate variables for external representation and use the
	swap functions to convert.
	(som_object_p): Ditto.  Remove #ifdef/#endif on always defined
	macros.
	(som_prep_headers): Likewise.
	(som_write_symbol_strings): Likewise.
	(som_begin_writing): Likewise.
	(som_finish_writing): Likewise.
	(som_build_and_write_symbol_table): Likewise.
	(bfd_section_from_som_symbol): Likewise.
	(som_slurp_symbol_table): Likewise.
	(som_bfd_print_private_bfd_data): Likewise.
	(bfd_som_attach_aux_hdr): Likewise.  Clear the padding.
	(bfd_som_attach_compilation_unit): Likewise.
	(som_bfd_count_ar_symbols): Likewise.
	(som_bfd_fill_in_ar_symbols): Likewise.
	(som_slurp_armap): Likewise.
	(som_bfd_ar_write_symbol_stuff): Likewise.
	(som_write_armap): Likewise.  Use _bfd_ar_spacepad instead of
	sprintf to write header fields.
	* som.h: Include bfd headers instead of system one.
	(FILE_HDR_SIZE, AUX_HDR_SIZE): Removed.
	(struct somdata): Use bfd structures instead of system ones.
	(struct som_section_data_struct): Likewise.
	(struct som_subspace_dictionary_record): Removed (now in
	include/som/internal.h)

gas/
2010-06-10  Tristan Gingold  <gingold@adacore.com>

	* config/obj-som.h: Includes som/reloc.h
2010-06-10 08:51:46 +00:00
Tristan Gingold 318cadba83 2010-06-10 Tristan Gingold <gingold@adacore.com>
* targets.c (bfd_target_list): Remove hp/ux compiler work-around
	as bfd requires an ANSI-C compiler.
2010-06-10 08:16:11 +00:00
Alan Modra e6b8bb55c2 daily update 2010-06-10 00:00:05 +00:00
Tristan Gingold f0b3dbfc47 2010-06-09 Tristan Gingold <gingold@adacore.com>
* bfdio.c (bfd_bread): Fix the code to prevent reading past the
	end of archive members.
2010-06-09 13:28:31 +00:00
Alan Modra 34516caa2e daily update 2010-06-09 00:00:05 +00:00
Tristan Gingold 7da73d69b0 2010-06-08 Tristan Gingold <gingold@adacore.com>
* som.c (som_bfd_free_cached_info): Do not free relocations as
	they were allocated with bfd_zalloc.
2010-06-08 15:43:38 +00:00
Tristan Gingold cba3addf0c 2010-06-08 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment
	for the first block.
2010-06-08 14:04:25 +00:00
Tristan Gingold 09266d1a64 2010-06-08 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function.
	* libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare.
	* libbfd.h: Regenerate.
	* elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS.
	(bfd_elfNN_mkarchive): Ditto.
2010-06-08 08:26:01 +00:00
Alan Modra 67007fa88f daily update 2010-06-08 00:00:05 +00:00
Alan Modra b4cdd2637c daily update 2010-06-07 00:00:05 +00:00
Alan Modra 101f76c16e daily update 2010-06-06 00:00:05 +00:00
Alan Modra 852844c29c daily update 2010-06-05 00:00:07 +00:00
Alan Modra fbfa44fc35 daily update 2010-06-04 00:00:08 +00:00
Alan Modra 92ae5b9a84 daily update 2010-06-03 00:00:05 +00:00
Tristan Gingold d0ef7741c5 2010-06-02 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant.
2010-06-02 08:01:30 +00:00
Alan Modra 2eb3f47c52 daily update 2010-06-02 00:00:06 +00:00
Ralf Wildenhues a009f2e775 Sync toplevel files from GCC.
/:
        Sync from GCC:

        2010-05-05  Sebastian Pop  <sebastian.pop@amd.com>
        * configure.ac: Allow all the versions greater than 0.10 of PPL.
        * configure: Regenerated.

        2010-04-20  Eric Botcazou  <ebotcazou@adacore.com>
        * configure.ac (BUILD_CONFIG): Redirect output to /dev/null.
        * configure: Regenerate.

        2010-04-17  Ralf Corsépius  <ralf.corsepius@rtems.org>
        * configure.ac (*-*-rtems*): Add target-libiberty to $skipdirs.
        * configure: Regenerate.

        2010-04-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
        * configure.ac: Check for elf_getshdrstrndx or elf_getshstrndx
        separately.
        * configure: Regenerate.

        2010-04-13  Steve Ellcey  <sje@cup.hp.com>
        * configure: Regenerate after change to elf.m4.

        2010-04-02  Sebastian Pop  <sebastian.pop@amd.com>
        * configure.ac: Add brackets around AC_TRY_COMPILE alternative.
        * configure: Regenerated.

        2010-04-02  Sebastian Pop  <sebastian.pop@amd.com>
        * configure.ac: Print "buggy but acceptable" when CLooG
        revision is less than 9.
        * configure: Regenerated.

config/:
        Sync from GCC:

        2010-04-13  Steve Ellcey  <sje@cup.hp.com>
        * elf.m4: Add hppa[12]*-*-hpux* to list of non-elf platforms.

        2010-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
        * stdint.m4 (GCC_HEADER_STDINT): Don't typedef uint8_t etc. if
        corresponding macros already exist.

bfd/:
        * configure: Regenerate.
2010-06-01 17:28:12 +00:00
Tristan Gingold 46d00b8af1 bfd/
2010-06-01  Tristan Gingold  <gingold@adacore.com>

	* vms-alpha.c (struct vms_private_data_struct): Add
	transfer_address field.  Remove unused dst_info field.
	(alpha_vms_write_exec): Use transfer_address.
	(_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE.
	(alpha_vms_bfd_final_link): Set transfer_address.

ld/
2010-06-01  Tristan Gingold  <gingold@adacore.com>

	* scripttempl/alphavms.sc: Add comments. Move $LINK$ to the
	readonly output-section. Handle LIB$INITIALIZE and sections
	created by gcc.
	* emultempl/vms.em (vms_place_orphan): Add comments.
2010-06-01 09:52:28 +00:00
Alan Modra b1797dc84a daily update 2010-06-01 00:00:06 +00:00
Tristan Gingold 7d5ee7d7b7 2010-05-31 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (credat_lo, credat_hi): New fields.
	(vms_read_block): Adjust comments.
	(vms_write_block): New function.
	(_bfd_vms_lib_archive_p): Decode majorid once.  Replace some
	hard-coded values with constants.  Set credat_lo and credat_hi.
	(_bfd_vms_lib_mkarchive): Add argument kind.
	Set ver, mhd_size and type according to kind.
	(_bfd_vms_lib_alpha_mkarchive): New function.
	(struct lib_index): Renamed from struct vms_index
	(lib_index_cmp): Renamed from vms_index_cmp.  Adjusted.
	(get_idxlen): Type of idx argument adjusted.  Add is_elfidx
	argument and handle it.
	(vms_write_index): Adjust argument idx.  Handle elf indexes.
	(_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
	(_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
	use it.  Handle elf indexes.  Set credat.
	* libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
	(_bfd_vms_lib_alpha_mkarchive): ... this.
	* libbfd.h: Regenerated.
	* vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
2010-05-31 15:03:14 +00:00
Alan Modra 345fa3f624 daily update 2010-05-31 00:00:07 +00:00
Alan Modra 407c157995 daily update 2010-05-30 00:00:05 +00:00
Alan Modra 93e34e3238 daily update 2010-05-29 00:00:05 +00:00
Sterling Augustine 7aa091969e 2010-05-28 Sterling Augustine <sterling@tensilica.com>
* elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount
        of code to change the bits in the instructions to match the changes
        in the relocations.  Declare dest_addr and sym_sec to help.
2010-05-28 18:10:45 +00:00
Jan Kratochvil 81c5c866a5 bfd/
Workaround GCC PR middle-end/4210.
	* vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
	and val[3].
2010-05-28 09:57:03 +00:00
Alan Modra 6a1fd1aac7 daily update 2010-05-28 00:00:06 +00:00
Tristan Gingold 953b49ed13 2010-05-27 Tristan Gingold <gingold@adacore.com>
* vms-misc.c: Define __NEW_STARLET.  Remove trailing spaces.
	(VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros.
	(vms_time_to_time_t): Use them instead of local const.
	(vms_time_t_to_vms_time): New function.
	(vms_get_time): Likewise.
	(vms_raw_get_time): Likewise.
	* vms.h	(vms_time_t_to_vms_time): New declaration.
	(vms_get_time): Likewise.
	(vms_raw_get_time): Likewise.
2010-05-27 13:43:44 +00:00
Alan Modra 65f08db7b3 daily update 2010-05-27 00:00:06 +00:00
Tristan Gingold f9eeb9c926 2010-05-26 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c: Update comments.
	(alpha_vms_write_exec): Set lnkflags.  Write the GST.
	(alpha_vms_link_output_symbol): New function.
	(alpha_vms_bfd_final_link): Generate the VMS symbol table.
	Set dst_section private field.
	(alpha_vms_bfd_final_link): Remove code that set dst_section.
2010-05-26 08:55:22 +00:00
Tristan Gingold 65077aa815 2010-05-25 Tristan Gingold <gingold@adacore.com>
* bfdio.c: Declare and define _bfd_memory_iovec.
	(bfd_bread): Move code for BFD_IN_MEMORY...
	(bfd_bwrite): ... Ditto ...
	(bfd_tell): ... Ditto ...
	(bfd_flush): ... Ditto ...
	(bfd_stat): ... Ditto ...
	(bfd_seek): ... Ditto ...
	(bfd_get_size): ... Ditto ...
	(bfd_mmap): ... Ditto ...
	(memory_bread): ... to these new functions.
	(memory_bwrite): Ditto.
	(memory_btell): Ditto.
	(memory_bseek): Ditto.
	(memory_bflush): Ditto.
	(memory_bstat): Ditto.
	(memory_bmmap): Ditto.
	(memory_bclose): New function.
	* peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY.
	* xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto.
	* opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case.
	(bfd_make_writable): Use _bfd_memory_iovec.
	* elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec.
	* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use
	_bfd_memory_iovec.
	(alpha_ecoff_openr_next_archived_file): Use proxy_origin
	instead of origin.
	* libbfd.h: Regenerate.
2010-05-26 07:37:36 +00:00
Alan Modra d6c8a379d3 daily update 2010-05-26 00:00:05 +00:00
Nick Clifton 8e45593ff3 2010-05-21 Daniel Jacobowitz <dan@codesourcery.com>
Joseph Myers  <joseph@codesourcery.com>
            Andrew Stubbs  <ams@codesourcery.com>

        bfd/
        * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add
        bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs.
        * configure.in: Handle FDPIC vectors.
        * elf32-sh-relocs.h: Add FDPIC and movi20 relocations.
        * elf32-sh.c (DEFAULT_STACK_SIZE): Define.
        (SYMBOL_FUNCDESC_LOCAL): Define.  Use it instead of
        SYMBOL_REFERENCES_LOCAL for function descriptors.
        (fdpic_object_p): New.
        (sh_reloc_map): Add FDPIC and movi20 relocations.
        (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid
        range.
        (struct elf_sh_plt_info): Add got20 and short_plt.  Update all
        definitions.
        (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define.
        (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New.
        (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define.
        (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le)
        (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts):
        New.
        (get_plt_info): Handle FDPIC.
        (MAX_SHORT_PLT): Define.
        (get_plt_index, get_plt_offset): Handle short_plt.
        (union gotref): New.
        (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to
        got_type and adjust all uses.  Add GOT_FUNCDESC.
        (struct sh_elf_obj_tdata): Add local_funcdesc.  Rename
        local_got_tls_type to local_got_type.
        (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type.  All
        users changed.
        (sh_elf_local_funcdesc): Define.
        (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p,
        and srofixup.
        (sh_elf_link_hash_newfunc): Initialize new fields.
        (sh_elf_link_hash_table_create): Set fdpic_p.
        (sh_elf_omit_section_dynsym): New.
        (create_got_section): Create .got.funcdesc, .rela.got.funcdesc
        and .rofixup.
        (allocate_dynrelocs): Allocate local function descriptors and space
        for R_SH_FUNCDESC-related relocations, and for rofixups.
        Handle GOT_FUNCDESC.  Create fixups.  Handle GOT entries which
        require function descriptors.
        (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize.
        (sh_elf_modify_program_headers): New.
        (sh_elf_size_dynamic_sections): Allocate function descriptors for
        local symbols.  Allocate .got.funcdesc contents.  Allocate rofixups.
        Handle local GOT entries of type GOT_FUNCDESC.  Create fixups for
        local GOT entries.  Ensure that FDPIC libraries always have a PLTGOT
        entry in the .dynamic section.
        (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc)
        (sh_elf_add_rofixup, sh_elf_osec_to_segment)
        (sh_elf_osec_readonly_p, install_movi20_field): New functions.
        (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC,
        R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC.  Use sh_elf_got_offset
        and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_.  Add rofixup
        read-only section warnings.  Handle undefined weak symbols.  Generate
        fixups for R_SH_DIR32 and GOT entries.  Check for cross-segment
        relocations and clear EF_SH_PIC.  Handle 20-bit relocations.
        Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
        (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20,
        R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC.
        Handle 20-bit relocations.
        (sh_elf_copy_indirect_symbol): Copy function descriptor reference
        counts.
        (sh_elf_check_relocs): Handle new relocations.  Make symbols
        dynamic for FDPIC relocs.  Account for rofixups.  Error for FDPIC
        symbol mismatches.  Allocate a GOT for R_SH_DIR32. Allocate fixups
        for R_SH_DIR32.
        (sh_elf_copy_private_data): Copy PT_GNU_STACK size.
        (sh_elf_merge_private_data): Copy initial flags.  Do not clobber
        non-mach flags.  Set EF_SH_PIC for FDPIC.  Reject FDPIC mismatches.
        (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries
        here.  Rename sgot to sgotplt and srel to srelplt.  Handle short_plt,
        FDPIC descriptors, and got20.  Create R_SH_FUNCDESC_VALUE for FDPIC.
        Use install_movi20_field.  Rename srel to srelgot.  Always generate
        R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
        (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup.
        Do not fill in reserved GOT entries for FDPIC.  Correct DT_PLTGOT.
        Rename sgot to sgotplt.  Assert that the right number of rofixups
        and dynamic relocations were allocated.
        (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New.
        (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym.
        (elf_backend_can_make_relative_eh_frame)
        (elf_backend_can_make_lsda_relative_eh_frame)
        (elf_backend_encode_eh_address): Define.
        (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM)
        (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed):
        Redefine for FDPIC vector.
        * reloc.c: Add SH FDPIC and movi20 relocations.
        * targets.c (_bfd_target_vector): Add FDPIC vectors.
        * configure, bfd-in2.h, libbfd.h: Regenerated.

        binutils/
        * readelf.c (get_machine_flags): Handle EF_SH_PIC and EF_SH_FDPIC.

        gas/
        * config/tc-sh.c (sh_fdpic): New.
        (sh_check_fixup): Handle relocations on movi20.
        (parse_exp): Do not reject PIC operators here.
        (build_Mytes): Check for unhandled PIC operators here.  Use
        sh_check_fixup for movi20.
        (enum options): Add OPTION_FDPIC.
        (md_longopts, md_parse_option, md_show_usage): Add --fdpic.
        (sh_fix_adjustable, md_apply_fix): Handle FDPIC and movi20 relocations.
        (sh_elf_final_processing): Handle --fdpic.
        (sh_uclinux_target_format): New.
        (sh_parse_name): Handle FDPIC relocation operators.
        * config/tc-sh.h (TARGET_FORMAT): Define specially for TE_UCLINUX.
        (sh_uclinux_target_format): Declare for TE_UCLINUX.
        * configure.tgt (sh-*-uclinux* | sh[12]-*-uclinux*): Set
        em=uclinux.
        * doc/c-sh.texi (SH Options): Document --fdpic.

        gas/testsuite/
        * gas/sh/basic.exp: Run new tests.  Handle uClinux like Linux.
        * gas/sh/fdpic.d: New file.
        * gas/sh/fdpic.s: New file.
        * gas/sh/reg-prefix.d: Force big-endian.
        * gas/sh/sh2a-pic.d: New file.
        * gas/sh/sh2a-pic.s: New file.
        * lib/gas-defs.exp (is_elf_format): Include sh*-*-uclinux*.

        include/elf/
        * sh.h (EF_SH_PIC, EF_SH_FDPIC): Define.
        (R_SH_FIRST_INVALID_RELOC_6, R_SH_LAST_INVALID_RELOC_6): New.  Adjust
        other invalid ranges.
        (R_SH_GOT20, R_SH_GOTOFF20, R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20)
        (R_SH_GOTOFFFUNCDESC, R_SH_GOTOFFFUNCDESC20, R_SH_FUNCDESC)
        (R_SH_FUNCDESC_VALUE): New.

        ld/
        * Makefile.am (ALL_EMULATIONS): Add eshelf_fd.o and eshlelf_fd.o.
        (eshelf_fd.c, eshlelf_fd.c): New rules.
        * Makefile.in: Regenerate.
        * configure.tgt (sh-*-uclinux*): Add shelf_fd and shlelf_fd
        emulations.
        * emulparams/shelf_fd.sh: New file.
        * emulparams/shlelf_fd.sh: New file.
        * emulparams/shlelf_linux.sh: Update comment.

        ld/testsuite/
        * ld-sh/sh.exp: Handle uClinux like Linux.
        * lib/ld-lib.exp (is_elf_format): Include sh*-*-uclinux*.
        * ld-sh/fdpic-funcdesc-shared.d: New file.
        * ld-sh/fdpic-funcdesc-shared.s: New file.
        * ld-sh/fdpic-funcdesc-static.d: New file.
        * ld-sh/fdpic-funcdesc-static.s: New file.
        * ld-sh/fdpic-gotfuncdesc-shared.d: New file.
        * ld-sh/fdpic-gotfuncdesc-shared.s: New file.
        * ld-sh/fdpic-gotfuncdesc-static.d: New file.
        * ld-sh/fdpic-gotfuncdesc-static.s: New file.
        * ld-sh/fdpic-gotfuncdesci20-shared.d: New file.
        * ld-sh/fdpic-gotfuncdesci20-shared.s: New file.
        * ld-sh/fdpic-gotfuncdesci20-static.d: New file.
        * ld-sh/fdpic-gotfuncdesci20-static.s: New file.
        * ld-sh/fdpic-goti20-shared.d: New file.
        * ld-sh/fdpic-goti20-shared.s: New file.
        * ld-sh/fdpic-goti20-static.d: New file.
        * ld-sh/fdpic-goti20-static.s: New file.
        * ld-sh/fdpic-gotofffuncdesc-shared.d: New file.
        * ld-sh/fdpic-gotofffuncdesc-shared.s: New file.
        * ld-sh/fdpic-gotofffuncdesc-static.d: New file.
        * ld-sh/fdpic-gotofffuncdesc-static.s: New file.
        * ld-sh/fdpic-gotofffuncdesci20-shared.d: New file.
        * ld-sh/fdpic-gotofffuncdesci20-shared.s: New file.
        * ld-sh/fdpic-gotofffuncdesci20-static.d: New file.
        * ld-sh/fdpic-gotofffuncdesci20-static.s: New file.
        * ld-sh/fdpic-gotoffi20-shared.d: New file.
        * ld-sh/fdpic-gotoffi20-shared.s: New file.
        * ld-sh/fdpic-gotoffi20-static.d: New file.
        * ld-sh/fdpic-gotoffi20-static.s: New file.
        * ld-sh/fdpic-plt-be.d: New file.
        * ld-sh/fdpic-plt-le.d: New file.
        * ld-sh/fdpic-plt.s: New file.
        * ld-sh/fdpic-plti20-be.d: New file.
        * ld-sh/fdpic-plti20-le.d: New file.
        * ld-sh/fdpic-stack-default.d: New file.
        * ld-sh/fdpic-stack-size.d: New file.
        * ld-sh/fdpic-stack.s: New file.
2010-05-25 14:12:43 +00:00
Tristan Gingold a928f1d7a2 2010-05-25 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (struct vms_symbol_entry): Field section is
	now an asection pointer.  Ditto for code_section.
	(_bfd_vms_slurp_egsd): Adjust for above change.
	(vms_get_symbol_info): Ditto.
	(alpha_vms_convert_symbol): Ditto.  Remove special dwarf2 case.
	Remove commented out code.
	(alpha_vms_get_synthetic_symtab): Simplify thanks to the above
	change.
	(alpha_vms_get_sym_value): Remove struct alpha_vms_link_hash_entry
	parameter.  Simplify the code.
	(_bfd_vms_slurp_etir): Adjust for above change.
2010-05-25 12:41:16 +00:00
Nick Clifton 9fcd9da679 PR ld/11624
* archive.c (_bfd_calloc_wrapper): New function.
        (_bfd_add_bfd_to_archive_cache): Use it.

        * configure.in: Add alpha*-*-*vms* to list of natives.
        * configure: Regenerate.

        * vms-misc.c: Define globalref if necessary.
        (vms_convert_to_var_unix_filename): Rename to
        _bfd_vms_convert_to_var_unix_filename and export.
        * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
        * vms-alpha.c (vms_close_and_cleanup): Update invocation of
        vms_convert_to_var_unix_filename.
2010-05-25 10:14:16 +00:00
Alan Modra f0e2c7920d daily update 2010-05-25 00:00:05 +00:00
Tristan Gingold ce76e55c68 2010-05-24 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (add_symbol_entry): New function extrated from ...
	(add_symbol): ... adjusted.
2010-05-24 10:50:27 +00:00
Tristan Gingold c734eb83b8 2010-05-24 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (struct vms_private_data_struct): Add section_max
	field.
	(_bfd_vms_slurp_egsd): Put PSC into the sections array.
	(vms_new_section_hook): Do not put section in the sections
	array.
2010-05-24 10:41:52 +00:00