Commit Graph

7653 Commits

Author SHA1 Message Date
Christophe Lyon 82b5c97a79 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
	branch to an undef weak symbol into a jump to next instruction if
	a PLT entry will be created.

	testsuite/
	* ld-arm/arm-elf.exp: Add 1 more test to check undef weak
	reference with PLT in ARM mode.
	* ld-arm/thumb2-bl-undefweak1.d, ld-arm/thumb2-bl-undefweak1.s:
	New files.
2009-04-15 13:49:54 +00:00
Alan Modra 93af4360e4 daily update 2009-04-15 01:00:04 +00:00
Dave Korn 0408dee693 bfd/ChangeLog
* coffgen.c (make_a_section_from_file):  Set the backend long
	section names enable if long section names found on input.
	* coffcode.h:  Extend long section names documentation to match.

binutils/ChangeLog

	* objcopy.c (enum long_section_name_handling):  New enum type.
	(enum command_line_switch):  Add OPTION_LONG_SECTION_NAMES.
	(copy_options[]):  Add entry for --long-section-names option.
	(copy_usage):  Document it.
	(set_long_section_mode):  New subroutine.
	(copy_file):  Call it.
	(copy_main):  Accept OPTION_LONG_SECTION_NAMES and parse arg.
	* doc/binutils.texi:  Update objcopy documentation with details
	of new option.
2009-04-14 09:47:44 +00:00
Alan Modra 5171a1d110 daily update 2009-04-14 01:00:05 +00:00
Alan Modra 2e80c30680 daily update 2009-04-13 01:00:05 +00:00
Alan Modra 3c34593a24 daily update 2009-04-12 01:00:05 +00:00
Alan Modra ae50636032 daily update 2009-04-11 01:00:04 +00:00
Alan Modra ea6906eee3 daily update 2009-04-10 01:00:05 +00:00
Alan Modra b08bbc4b81 daily update 2009-04-09 01:00:04 +00:00
H.J. Lu a0c402a564 bfd/
2009-04-08  H.J. Lu  <hongjiu.lu@intel.com>

	* elflink.c (elf_link_add_object_symbols): Warn alternate ELF
	machine code.

include/

2009-04-08  H.J. Lu  <hongjiu.lu@intel.com>

	* bfdlink.h (bfd_link_info): Add warn_alternate_em.

ld/

2009-04-08  H.J. Lu  <hongjiu.lu@intel.com>

	* lexsup.c (option_values): Add OPTION_WARN_ALTERNATE_EM.
	(ld_options): Likewise.
	(parse_args): Likewise.

	* ld.texinfo: Document --warn-alternate-em.

	* NEWS: Mention --warn-alternate-em.
2009-04-08 16:04:50 +00:00
DJ Delorie 4d28413b40 [include/elf]
* mep.h (EF_MEP_CPU_C5): New.
[bfd]
	* archures.c: Add bfd_mach_mep_c5.
	* bfd-in2.h: Likewise.
	* cpu-mep.c: Add bfd_c5_arch.
	* elf32-mep.c: Support it.
[gas]
	* config/tc-mep.c: Add UCI/DSP instruction support.  Add C5 support.
	(md_show_usage): Change default endian to little.
	* config/tc-mep.h (TARGET_BYTES_BIG_ENDIAN): Change default to little.
[ld]
	* emulparams/elf32mep.sh: Change default endian to little.
2009-04-08 02:24:23 +00:00
Alan Modra e0edc2d941 daily update 2009-04-08 01:00:09 +00:00
H.J. Lu bb6198d224 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (_bfd_elf_section_already_linked): Add `\n' for
	info->callbacks->einfo.
	* linker.c (_bfd_generic_section_already_linked): Likewise.
2009-04-07 20:04:08 +00:00
DJ Delorie bcb012d3f5 [bfd]
* elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
[gas]
	* tc-h8300.c (do_a_fix_imm): Pass the insn, force relocs for MOVA
	immediates.
	(build_bytes): Pass insn to do_a_fix_imm.
[include/opcode]
	* h8300.h: Add relaxation attributes to MOVA opcodes.
2009-04-07 18:21:22 +00:00
Alan Modra d28e2c2419 daily update 2009-04-07 01:00:05 +00:00
H.J. Lu db1fe6e9e5 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
* coff-x86_64.c (bfd_pe_print_pdata): Defined to
	_bfd_pex64_print_pdata only if PE is defined.

	* libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
	(_bfd_pex64_print_pdata): This.

	* peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
	(_bfd_pex64_print_pdata): This.  Defined only if COFF_WITH_pex64
	is defined.
2009-04-06 16:48:36 +00:00
Alan Modra 35d35f1f4e daily update 2009-04-06 01:00:05 +00:00
Kai Tietz c7c7219d3a 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
* coff-x86_64.c (bfd_pe_print_pdata): Define as
        _bfd_pep_print_x64_pdata.
        * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
        * peXXigen.c (_bfd_pep_print_x64_pdata): New.
2009-04-05 18:12:21 +00:00
Alan Modra bab7ee3b35 daily update 2009-04-05 01:00:05 +00:00
Alan Modra c38faaf736 daily update 2009-04-04 00:00:05 +00:00
Sterling Augustine 3df502ae79 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
* elf32-xtensa.c (relax_property_section): Always set r_offset
	to zero.
2009-04-03 16:06:40 +00:00
Alan Modra 41c7472acd daily update 2009-04-03 00:00:05 +00:00
Christophe Lyon d3626fb08b 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
	elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
	branch stubs.
	(elf32_arm_stub_type): New enum values for the two new stubs.
	(arm_type_of_stub): Make use of the two new stubs.
	(arm_size_one_stub): Handle the two new stubs.

	testsuite/
	* ld-arm/farcall-thumb-thumb-pic-veneer.d: Update expected
	results.
	* ld-arm/farcall-thumb-thumb.d: Likewise.
2009-04-02 14:12:46 +00:00
Matt Thomas fe723c8722 2009-04-01 Matt Thomas <matt@netbsd.org>
* elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
	hidden symbols into the GOT or PLT.GOT.
	(elf_vax_relocate_section): Do not emit a PCREL reloc
	into a shared object if it is against a hidden symbol.
2009-04-02 00:20:42 +00:00
Alan Modra 9ad7ca0088 daily update 2009-04-02 00:00:08 +00:00
Richard Sandiford ee69830047 bfd/
* xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
	and know_contains_shared_object_p.
	(xcoff_archive_contains_shared_object_p): Add an "info" parameter.
	Cache the result in the archive_info table.
	(xcoff_auto_export_p): Add an "info" parameter and update the
	call to xcoff_archive_contains_shared_object_p.
	(xcoff_mark_auto_exports): Update accordingly.
	(xcoff_post_gc_symbol): Likewise.
2009-04-01 20:13:10 +00:00
Richard Sandiford 54e2dbe0fc bfd/
* xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
	rather than C_EXT.

ld/testsuite/
	* ld-powerpc/aix-gc-1.nd: New test.
	* ld-powerpc/aix52.exp: Run it.
2009-04-01 20:09:03 +00:00
Richard Sandiford 2e470849cc bfd/
* coff-rs6000.c (member_layout): New structure.
	(archive_iterator): Likewise.
	(member_layout_init): New function.
	(archive_iterator_begin): Likewise.
	(archive_iterator_next): Likewise.
	(xcoff_write_armap_old): Use the new iterator functions.
	(do_shared_object_padding): Delete.
	(xcoff_write_armap_big): Use the new iterator functions.  Simplify
	handling of arch_info.
	(xcoff_write_archive_contents_old): Allocate arelt_data in the
	first loop rather than the second.  Allocate a member header if
	there isn't one, then work out the stat information and length
	in the first loop too.  Use the new iterators for the second loop.
	(xcoff_write_archive_contents_big): Likewise.
2009-04-01 20:04:28 +00:00
Richard Sandiford 24c611d1c4 bfd/
* bfd-in.h (bfd_xcoff_split_import_path): Declare.
	(bfd_xcoff_set_archive_import_path): Likewise.
	* bfd-in2.h: Regenerate.
	* xcofflink.c: Include libiberty.h.
	(xcoff_archive_info): New structure.
	(xcoff_archive_info_hash): New function.
	(xcoff_archive_info_eq): Likewise.
	(xcoff_get_archive_info): Likewise.
	(_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
	(bfd_xcoff_split_import_path): New function.
	(bfd_xcoff_set_archive_import_path): Likewise.
	(xcoff_set_import_path): Move earlier in file.
	(xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
	object to the the directory part of the bfd's filename.  Get the
	import path and filename of an archive object from the archive's
	xcoff_tdata, initializing it if necessary.  Update use of
	import_file_id.
	(bfd_link_input_bfd): Update use of import_file_id.
	(xcoff_write_global_symbol): Likewise.

ld/
	* emultempl/aix.em (gld${EMULATION_NAME}_open_dynamic_archive): New
	function.
	(ld_${EMULATION_NAME}_emulation): Use it.
2009-04-01 19:53:53 +00:00
Richard Sandiford d286971a6b include/coff/
* xcoff.h (xcoff_link_hash_table): Move to bfd/xcofflink.c.

bfd/
	* xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
2009-04-01 19:38:11 +00:00
Richard Sandiford b3d1832c34 bfd/
* xcofflink.c (xcoff_link_create_extra_sections): Don't create
	a .loader section for relocatable links.
	(xcoff_need_ldrel_p): New function.
	(xcoff_mark): Use it.
	(bfd_xcoff_link_count_reloc): Only count loader relocs if there's
	a loader section.
	(xcoff_build_ldsym): New function, split out from...
	(xcoff_build_ldsyms): ...here.  Rename to...
	(xcoff_post_gc_symbol): ...this.  Only export symbols, and only
	call xcoff_build_ldsym, if there's a loader section.
	(xcoff_build_loader_section): New function, extracted verbatim from...
	(bfd_xcoff_size_dynamic_sections): ...here.  Only call it if
	there's a loader section.  Only add an __rtinit loader symbol
	if there's a loader section.  Update after above name change.
	(xcoff_symbol_section, xcoff_create_ldrel): New functions.
	(bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
	and xcoff_create_ldrel.
	(xcoff_write_global_symbol): Use xcoff_create_ldrel.
	(xcoff_reloc_link_order): Likewise, but only call it if there's
	a loader section.  Use xcoff_symbol_section.
	(_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
	if there's a loader section.

ld/testsuite/
	* ld-powerpc/aix-rel-1.s, ld-powerpc/aix-rel-1.od: New test.
	* ld-powerpc/aix52.exp: Run it.
2009-04-01 19:27:38 +00:00
Richard Sandiford 8707bb8715 bfd/
* xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
2009-04-01 19:05:53 +00:00
Christophe Lyon e780aef286 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (group_sections): Rewrite loops for better
	readability.
2009-04-01 15:34:12 +00:00
Alan Modra a54217b469 daily update 2009-04-01 00:00:04 +00:00
DJ Delorie c301e70067 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
relocs when doing a relocatable link.
2009-03-31 01:42:29 +00:00
Alan Modra 4a19ce7eb9 daily update 2009-03-31 00:00:09 +00:00
Alan Modra 3d474056d3 daily update 2009-03-30 00:00:05 +00:00
Alan Modra f6bd35909f daily update 2009-03-29 00:00:06 +00:00
Mark Mitchell 3895f85287 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
"ERROR:", in error messages.
	* cpu-arm.c (bfd_arm_merge_machines): Likewise.
	* elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
	* elf32-arm.c (tag_cpu_arch_combine): Likewise.
	(elf32_arm_merge_eabi_attributes): Likewise.
	(elf32_arm_merge_private_bfd_data): Likewise.
2009-03-28 23:19:00 +00:00
Alan Modra 4af38be89b daily update 2009-03-28 00:00:05 +00:00
Nick Clifton ea882e8744 * section.c (bfd_get_section_contents): Detect and handle the case
where a section has the SEC_IN_MEMORY flag set but no actual
        contents allocated.
2009-03-27 11:38:30 +00:00
Alan Modra cafcb80735 daily update 2009-03-27 00:00:10 +00:00
Alan Modra 9433b9b16e PR 6494
* elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
	p_filesz and p_memsz are equal.  Use p_memsz as the segment size.
	(assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
	if we don't find matching PT_LOAD when copying.
2009-03-26 12:23:52 +00:00
Alan Modra b7ab523c0d daily update 2009-03-26 00:00:04 +00:00
M R Swami Reddy dc1aa7347f 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
* elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
        the reloc descriptions.
2009-03-25 08:08:36 +00:00
M R Swami Reddy 3614d36bc7 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
* elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
	the reloc descriptions.
2009-03-25 08:05:57 +00:00
Hans-Peter Nilsson 34d3d6b922 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
<R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
	<case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
2009-03-25 03:03:40 +00:00
Alan Modra b5fe7cfc58 daily update 2009-03-25 00:00:09 +00:00
H.J. Lu 34274ccc6a 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
* cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
	(bfd_i386_arch_intel_syntax): Likewise.
	(i8086_arch): Likewise.
	(bfd_x86_64_arch): Likewise.
2009-03-24 18:07:14 +00:00
Hans-Peter Nilsson 6718f446da * elf32-cris.c (cris_elf_relocate_section): <case
R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
	symbols for non-allocated sections.  Don't check whether to
	generate R_CRIS_DTPMOD for non-allocated sections.
	(cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
	handle relocation GC:ing if applied to non-allocated section.
	(cris_elf_check_relocs): Similar.
2009-03-24 07:57:21 +00:00
Hans-Peter Nilsson 019c5a2e3f * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
<R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
	when emitting a known TP offset in the GOT.
2009-03-24 03:32:31 +00:00
Alan Modra d739bf0069 daily update 2009-03-24 00:00:04 +00:00
Alan Modra ffcfec52d7 * elf64-ppc.c (synthetic_opd): Delete.
(compare_symbols): Look for .opd name rather than section match.
	(ppc64_elf_get_synthetic_symtab): Likewise.
2009-03-23 13:35:46 +00:00
Alan Modra 70e1777909 daily update 2009-03-23 00:00:05 +00:00
Alan Modra 292d06103a daily update 2009-03-22 00:00:04 +00:00
Alan Modra c6dd29cec2 * elf32-ppc.c (is_pic_glink_stub): Delete.
(is_nonpic_glink_stub): New function.
	(ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
	than first pic one.
	(struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
2009-03-21 02:35:27 +00:00
Alan Modra b914d385dd daily update 2009-03-21 00:00:04 +00:00
Andreas Krebbel 8c21ca2102 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
        macros for visibilty and locality checks.
	(elf_s390_adjust_dynamic_symbol): Likewise.
	(allocate_dynrelocs): Likewise.
	(elf_s390_relocate_section): Likewise.
	(elf_s390_finish_dynamic_symbol): Likewise.
	* elf64-s390.c (elf_s390_check_relocs): Likewise.
	(elf_s390_adjust_dynamic_symbol): Likewise.
	(allocate_dynrelocs): Likewise.
	(elf_s390_relocate_section): Likewise.
	(elf_s390_finish_dynamic_symbol): Likewise.
2009-03-20 12:57:15 +00:00
Alan Modra ed720d0ea3 daily update 2009-03-20 00:00:04 +00:00
Kai Tietz 156621f344 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
* bfd-in2.h: Regenerated.
        * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
        for debugging sections and map memory read/write dependent on
        SEC_COFF_NOREAD.
        (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
        without memory read flags set.
        * section.c: Add SEC_COFF_NOREAD to section flags.
2009-03-19 11:02:09 +00:00
Andreas Schwab d1fa68d3c8 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
for format string.
2009-03-19 10:40:06 +00:00
Alan Modra ad2adbc8be bfd/
* elf32-spu.c (spu_elf_find_overlays): Separate error return from
	"no overlays" return.  If there are overlays, create overlay
	manager entry symbols here, so that..
	(spu_elf_build_stubs): ..we don't need to set them up here.
	Simplify entry symbol tests.
	* elf32-spu.h (spu_elf_find_overlays): Update prototype.
ld/
	* emultempl/spuelf.em (spu_before_allocation): Report errors from
	spu_elf_find_overlays.
2009-03-19 07:04:12 +00:00
Alan Modra 5d52395511 daily update 2009-03-19 00:00:04 +00:00
Nick Clifton 02b1cb404a * Makefile.am (BFD32_BACKENDS): Remove elf32-score and
elf32-score7 files.
        (BFD32_BACKEND_CFILES): Likewise.
        (BFD64_BACKENDS): Add elf32-score and elf32-score7 files.
        (BFD64_BACKENDS_CFILES): Likewise.
        * Makefile.in: Regenerate.
        * config.bfd: More Score targets into BFD64 list.
        * configure.in: Move score vectors to 64-bit list.
        * targets.c: Likewise.

        * score-dis.c: Only compile when 64-bit bfds are enabled.
2009-03-18 16:58:33 +00:00
Mark Kettenis 67cc50334e * elf.c (elfcore_grok_openbsd_procinfo)
(elfcore_grok_openbsd_note): New functions.
(elf_parse_notes): Handle notes from OpenBSD ELF core files.
2009-03-18 16:26:54 +00:00
Alan Modra 3889c459bb bfd/
* vms-hdr.c: Don't include alloca.h.
opcodes/
	* cgen-opc.c: Include alloca-conf.h rather than alloca.h.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
2009-03-18 11:47:18 +00:00
Alan Modra 8d25cc3de0 include/
* alloca-conf.h: Revise based on autoconf-2.61, autoconf-2.13
	documentation.
bfd/
	* elf32-m68hc1x.c: Include alloca-conf.h.
	* xsym.c: Likewise.
	* elf64-hppa.c: Likewise.  Remove existing #if's handling alloca.
	* som.c: Likewise.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
binutils/
	* sysdep.h: Include alloca-conf.h instead of config.h and remove
	existing #if's handling alloca.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
gas/
	* as.h: Include alloca-conf.h instead of config.h and remove
	existing #if's handling alloca.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
opcodes/
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
	* openrisc-opc.c: Regenerate.
ld/
	* ld.h: Remove alloca handling.
2009-03-18 11:27:18 +00:00
Alan Modra 8d38aea0a7 daily update 2009-03-18 00:00:05 +00:00
Daniel Jacobowitz a89e647837 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test. 2009-03-17 14:50:48 +00:00
Alan Modra a7e11ee1d2 bfd/
* elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
	Add compact_stub.
	(emum _ovly_flavour): Delete ovly_compact, ovly_none.
	* elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
	ovly_return fields with ovly_entry[2].  Adjust all users.
	(spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
	when soft-icache.
	(spu_elf_build_stubs): Likewise.
	(ovl_stub_size): Change arg to spu_elf_params pointer.  Adjust for
	ovly_flavour changes.  Update all callers.
	(ovl_stub_size_log2): New function.
	(build_stub): Handle compact icache stubs.  Use different manager
	entry point for stubs in non-icache area.
	(spu_elf_size_stubs): Don't allocate space for indirect branch
	descriptors.
	(spu_elf_build_stubs): And don't built them.
ld/
	* emultempl/spu_icache.S: Add new entry to dummy handler.
	* emultempl/spu_icache.o_c: Regenerate.
	* emultempl/spuelf.em (params): Init new field.
	(no_overlays): New static var.
	(spu_before_allocation): Use it.
	(OPTION_SPU_COMPACT_STUBS): Define.
	(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add compact-stubs.
	(PARSE_AND_LIST_ARGS_CASES): Handle compact-stubs.  Adjust no-overlays
	handling.
ld/testsuite/
	* ld-spu/icache1.d: Update for fixed set_id, new manager entry, and
	reduced data.
2009-03-17 12:46:19 +00:00
Alan Modra f13d903a9c daily update 2009-03-17 00:00:08 +00:00
Andrew Stubbs 607a83c943 Move changelog entry to the right file.
Sorry folks.
2009-03-16 12:50:42 +00:00
Andrew Stubbs bc66479972 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
* dwarf2.c (read_section): Always use rawsize, if available.
2009-03-16 12:41:26 +00:00
Alan Modra 588f62fc96 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
of rawsize and size for buffer.
2009-03-16 00:52:37 +00:00
Alan Modra 8538abaf3b daily update 2009-03-16 00:00:05 +00:00
Ulrich Weigand a14c90c1e7 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
parameter just because fixed sections fit into local store.
	(spu_elf_auto_overlay): Do not declare as "noreturn".  Skip
	generating overlays if fixed sections plus reserved stack
	and heap space fit into local store.
2009-03-15 15:15:29 +00:00
Alan Modra 30c665df3f * elf32-spu.c (build_stub): Correct icache set_id.
(spu_elf_relocate_section): Likewise.
2009-03-15 03:28:51 +00:00
Alan Modra 67aceaa070 daily update 2009-03-15 00:00:04 +00:00
Richard Sandiford f95942a33e bfd/
* xcofflink.c (xcoff_link_check_archive_element): Only free the
	symbol table if it was created by the current call.
2009-03-14 09:36:38 +00:00
Richard Sandiford 670562e9d1 bfd/
* xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
	class XMC_DS rather than XMC_UA.
2009-03-14 09:36:11 +00:00
Richard Sandiford b64232cca5 include/coff/
* xcoff.h (XCOFF_EXPALL, XCOFF_EXPFULL): New flags.
	(xcoff_loader_info): Add auto_export_flags.

bfd/
	* bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
	bfd_boolean export_defineds parameter with an unsigned int
	auto_export_flags parameter.
	* bfd-in2.h: Regenerate.
	* xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
	split out from xcoff_build_ldsyms.
	(xcoff_covered_by_expall_p): New function.
	(xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
	but with extra code to handle -bexpfull and -bexpall.
	(xcoff_mark_auto_exports): New function.
	(xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
	a function should be automatically exported.
	(bfd_xcoff_size_dynamic_sections): Replace the export_defineds
	parameter with an auto_export_flags parameter.  Update ldinfo
	accordingly.  Use xcoff_mark_auto_exports to mark all automatically-
	exported symbols.

ld/
	* emultempl/aix.em (auto_export_flags): New variable.
	(explicit_auto_export_flags): Likewise.
	(OPTION_EXPALL, OPTION_EXPFULL): New enum values.
	(OPTION_NOEXPALL, OPTION_NOEXPFULL): Likewise.
	(gld${EMULATION_NAME}_add_options): Add -bexpall, -bexpfull,
	-bnoexpall and -bnoexpfull.
	(gld${EMULATION_NAME}_handle_option): Handle them.
	(gld${EMULATION_NAME}_before_allocation): Update the call to
	bfd_size_dynamic_sections.

ld/testsuite/
	* ld-powerpc/aix-export-1-all.dd, ld-powerpc/aix-export-1-full.dd,
	ld-powerpc/aix-export-1a.s, ld-powerpc/aix-export-1b.s: New tests.
	* ld-powerpc/aix52.exp: Run them.
2009-03-14 09:35:46 +00:00
Richard Sandiford 7d504122ef bfd/
* xcofflink.c (xcoff_mark_symbol_by_name): New function.
	(bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
	init and fini functions.  Do garbage collection for objects
	without an entry point too.

ld/testsuite/
	* ld-powerpc/aix-gc-1.s, ld-powerpc/aix-gc-1.ex,
	ld-powerpc/aix-gc-1-32.dd, ld-powerpc/aix-gc-1-64.dd,
	ld-powerpc/aix-weak-1-gcdso.dnd, ld-powerpc/aix-weak-1-gcdso.hd,
	ld-powerpc/aix-weak-1-gcdso.nd: New tests.
	* ld-powerpc/aix52.exp: Run them.
2009-03-14 09:35:06 +00:00
Richard Sandiford 8602d4fea6 include/coff/
* internal.h (C_AIX_WEAKEXT): New macro.
	(C_WEAKEXT): Use the GNU definition in the generic part of the file,
	and conditionally reset it to C_AIX_WEAKEXT in the XCOFF part of
	the file.
	(CSECT_SYM_P): New macro.
	* xcoff.h (L_WEAK): Define.
	(EXTERN_SYM_P): New macro.

bfd/
	* coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
	check whether a symbol has csect information.
	(coff_print_aux): Likewise.
	* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
	information for C_AIX_WEAKEXT too.
	(_bfd_xcoff_swap_aux_out): Likewise.
	(xcoff_reloc_type_br): Handle defweak symbols too.
	* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
	information for C_AIX_WEAKEXT too.
	(_bfd_xcoff64_swap_aux_out): Likewise.
	(xcoff64_reloc_type_br): Handle defweak symbols too.
	* coffgen.c (coff_print_symbol): Handle auxillary function
	information for C_AIX_WEAKEXT too.
	* xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
	instead of BSF_GLOBAL if the L_WEAK flag is set.
	(xcoff_dynamic_definition_p): New function.
	(xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
	defines h.  Don't change h if ldsym isn't the definition.  Otherwise,
	always take the symbol class from the ldsym.  Use weak bfd symbol
	types for weak ldsyms.
	(xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
	Fix the check for whether a definition is from a shared object.
	Allow redefinitions of weak symbols.
	(xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
	(xcoff_keep_symbol_p): Likewise.
	(bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
	(xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
	Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
	but mark them as L_WEAK.
	(xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
	instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.

gas/
	* config/tc-ppc.c (ppc_frob_symbol): Add csect information for
	C_AIX_WEAKEXT too.

ld/testsuite/
	* ld-powerpc/aix-glink-2a.s, ld-powerpc/aix-glink-2a.ex,
	ld-powerpc/aix-glink-2b.s, ld-powerpc/aix-glink-2c.s,
	ld-powerpc/aix-glink-2c.ex, ld-powerpc/aix-glink-2d.s,
	ld-powerpc/aix-glink-2-32.dd, ld-powerpc/aix-glink-2-64.dd,
	ld-powerpc/aix-weak-1a.s, ld-powerpc/aix-weak-1b.s,
	ld-powerpc/aix-weak-1-rel.hd, ld-powerpc/aix-weak-1-rel.nd,
	ld-powerpc/aix-weak-1-dso.hd, ld-powerpc/aix-weak-1-dso.nd,
	ld-powerpc/aix-weak-1-dso.dnd, ld-powerpc/aix-weak-1.ex,
	ld-powerpc/aix-weak-2a.s, ld-powerpc/aix-weak-2a.ex,
	ld-powerpc/aix-weak-2a.nd, ld-powerpc/aix-weak-2b.s,
	ld-powerpc/aix-weak-2b.nd, ld-powerpc/aix-weak-2c.s,
	ld-powerpc/aix-weak-2c.ex, ld-powerpc/aix-weak-2c.nd,
	ld-powerpc/aix-weak-2c.od, ld-powerpc/aix-weak-3a.s,
	ld-powerpc/aix-weak-3a.ex, ld-powerpc/aix-weak-3b.s,
	ld-powerpc/aix-weak-3b.ex, ld-powerpc/aix-weak-3-32.d,
	ld-powerpc/aix-weak-3-32.dd, ld-powerpc/aix-weak-3-64.d,
	ld-powerpc/aix-weak-3-64.dd: New tests.
	* ld-powerpc/aix52.exp: Run them.  Replace tmp/aix-* with
	tmp/aix64-* in 64-bit ld options.
2009-03-14 09:34:27 +00:00
Richard Sandiford 5b49f6dc39 include/coff/
* xcoff.h (XCOFF_ALLOCATED): New flag.

bfd/
	* xcofflink.c (xcoff_mark): When walking the relocations,
	only mark the target symbol or the target section, not both.
	(xcoff_final_definition_p): New function.
	(xcoff_keep_symbol_p): Use it to check whether an external XCOFF
	symbol is a valid definition of the associated output symbol.
	Use XCOFF_ALLOCATED to stop the same hash table entry having
	two output symbols.
	(bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
	keeping a symbol.
	(xcoff_link_input_bfd): Use xcoff_final_definition_p.

ld/testsuite/
	* ld-powerpc/aix-no-dup-syms-1a.s, ld-powerpc/aix-no-dup-syms-1b.s,
	ld-powerpc/aix-no-dup-syms-1.ex, ld-powerpc/aix-no-dup-syms-1.im,
	ld-powerpc/aix-no-dup-syms-1-dso.dnd,
	ld-powerpc/aix-no-dup-syms-1-dso.drd,
	ld-powerpc/aix-no-dup-syms-1-dso.nd,
	ld-powerpc/aix-no-dup-syms-1-dso.rd,
	ld-powerpc/aix-no-dup-syms-1-rel.nd,
	ld-powerpc/aix-no-dup-syms-1-rel.rd: New tests.
	* ld-powerpc/aix52.exp: Run them.
2009-03-14 09:33:39 +00:00
Richard Sandiford c4037431e0 bfd/
* xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
	symbols as XMC_XO.

ld/testsuite/
	* ld-powerpc/aix-abs-branch-1.nd,
	ld-powerpc/aix-abs-reloc-1.nd: New tests.
	* ld-powerpc/aix52.exp: Run them.
2009-03-14 09:32:56 +00:00
Richard Sandiford 3df13c4a63 bfd/
* libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
	* libcoff.h: Regenerate.
	* xcofflink.c (xcoff_link_add_symbols): Record per-symbol
	line-number counts in the bfd's lineno_counts field.
	Don't keep per-csect line-number counts.
	(xcoff_sweep): Don't update per-csect line-number counts.
	(bfd_xcoff_size_dynamic_sections): Count the number of line-number
	entries in each output section.
	(xcoff_link_input_bfd): Get the number of line numbers from
	the bfd's lineno_counts field, rather than recalculating it
	from scratch.  Fix the range check when updating C_BINCL and
	C_EINCL symbols.
	(_bfd_xcoff_bfd_final_link): Don't count the output line numbers
	here.  Don't expect csects to have line-number counts.

ld/testsuite/
	* ld-powerpc/aix-lineno-1.s, ld-powerpc/aix-lineno-1.txt,
	ld-powerpc/aix-lineno-1a.dd, ld-powerpc/aix-lineno-1a.nd,
	ld-powerpc/aix-lineno-1b.dd, ld-powerpc/aix-lineno-1b.nd: New tests.
	* ld-powerpc/aix52.exp: Run them.  Copy aix-lineno-1.txt to tmpdir.
2009-03-14 09:32:33 +00:00
Richard Sandiford e450936a6f bfd/
* libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
	* libcoff.h: Regenerate.
	* xcofflink.c (xcoff_keep_symbol_p): New function, using the
	"skip" logic from xcoff_link_input_bfd.
	(bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
	objects in a dynamic link, rather than checking whether csectpp
	is null.  Always allocate debug_index for other objects,
	and always go through the loop.  Update the type of debug_index
	after the change above.  Read the auxillary csect information
	and use xcoff_keep_symbol_p to decide whether a symbol should
	be kept.  Set its debug_index to -2 if not.
	(xcoff_link_input_bfd): Update the type of debug_index after
	the change above and always expect it to be nonnull.  Use it to
	test whether a symbol should be stripped, rather than making the
	decision here.  Postpone all symbol creation to the second pass.
2009-03-14 09:32:06 +00:00
Richard Sandiford 47dfb2ca05 bfd/
* xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
	creating a descriptor.
	(xcoff_sweep): Don't mark toc_section unless it's needed.
	(bfd_xcoff_size_dynamic_sections): Skip the toc_section
	when marking every bfd.
	(xcoff_link_input_bfd): Skip all TOC anchors.
	(xcoff_toc_section_p, xcoff_find_tc0): New functions.
	(_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
	to -1; call xcoff_find_tc0 instead.

ld/testsuite/
	* ld-powerpc/aix-toc-1.ex, ld-powerpc/aix-toc-1a.s,
	ld-powerpc/aix-toc-1b.s, ld-powerpc/aix-toc-1-32.dd,
	ld-powerpc/aix-toc-1-64.dd: New tests.
	* ld-powerpc/aix52.exp: Run them.
2009-03-14 09:18:22 +00:00
Richard Sandiford 4cc02a022b bfd/
* libcoff-in.h (xcoff_section_tdata): Update commentary.
	* libcoff.h: Regenerate.
	* xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
	symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
	the previous symbol's csect.  Treat last_symndx as an inclusive value
	and simplify its handling.
	(xcoff_mark): Treat last_symndx as an inclusive value.  Only mark
	symbols with the right csect.  Don't mark rsec when processing
	relocations against undefined or absolute sections.
	(bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
	of bfd_und_section_ptr.
	(xcoff_link_input_bfd): Likewise.
2009-03-14 09:17:56 +00:00
Richard Sandiford 858ef0ce3b include/coff/
* xcoff.h (XCOFF_CALLED, XCOFF_IMPORT): Update comments.
	(XCOFF_WAS_UNDEFINED): New flag.
	(xcoff_link_hash_table): Add an "rtld" field.

bfd/
	* coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
	against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
	flag is set.  Assert that all undefined symbols are either
	imported or defined by a dynamic object.
	* coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
	* xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
	handling to all relocations.  Only set XCOFF_CALLED for function
	symbols.
	(xcoff_find_function): New function, split out from...
	(bfd_xcoff_export_symbol) ...here.
	(xcoff_set_import_path): New function, split out from...
	(bfd_xcoff_import_symbol): ...here.  Remove assertion for old
	meaning of XCOFF_CALLED.
	(xcoff_mark_symbol): If we mark an undefined and unimported
	symbol, find some way of defining it.  If the symbol is a function
	descriptor, fill in its definition automatically.  If the symbol
	is a function, mark its descriptor and allocate room for global
	linkage code.  Otherwise mark the symbol as implicitly imported.
	Move the code for creating function descriptors from...
	(xcoff_build_ldsyms): ...here.  Use XCOFF_WAS_UNDEFINED to
	check for symbols that were implicitly defined.
	(xcoff_mark): Don't count any dynamic relocations against
	function symbols.
	(bfd_xcoff_size_dynamic_sections): Save the rtld parameter
	in the xcoff link info.
	(xcoff_link_input_bfd): Remove handling of undefined and
	unexported symbols.

ld/
	* emultempl/aix.em (gld${EMULATION_NAME}_handle_option): Make
	-berok and -bernotok control link_info.unresolved_syms_in_objects
	and link_info.unresolved_syms_in_shared_libs instead of
	force_make_executable.

ld/testsuite/
	* ld-powerpc/aix-glink-1.ex, ld-powerpc/aix-glink-1.s,
	ld-powerpc/aix-glink-1-32.dd, ld-powerpc/aix-glink-1-64.dd,
	ld-powerpc/aix-glink-1-32.d, ld-powerpc/aix-glink-1-64.d: New tests.
	* ld-powerpc/aix52.exp: Run them.
2009-03-14 09:17:32 +00:00
Richard Sandiford 12b2cce914 bfd/
* coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
	if the target is absolute.  Fix comment typo.
	(xcoff_ppc_relocate_section): Remove FIXME.
	* coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
	if the target is absolute.

ld/testsuite/
	* ld-powerpc/aix-abs-branch-1.im, ld-powerpc/aix-abs-branch-1.ex,
	ld-powerpc/aix-abs-branch-1.s,
	ld-powerpc/aix-abs-branch-1.dd: New test.
	* ld-powerpc/aix52.exp: Run it.
2009-03-14 09:16:01 +00:00
Richard Sandiford 0e3212aded bfd/
* xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
	R_POS and R_NEG relocations against absolute symbols to the
	.loader section.

ld/testsuite/
	* ld-powerpc/aix-abs-reloc-1.ex, ld-powerpc/aix-abs-reloc-1.im,
	ld-powerpc/aix-abs-reloc-1.od, ld-powerpc/aix-abs-reloc-1.s: New test.
	* ld-powerpc/aix52.exp: Run it.
2009-03-14 09:15:34 +00:00
Richard Sandiford d19d97e928 bfd/
* coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
	to 2 for bfd_mach_ppc_620.
2009-03-14 09:14:57 +00:00
Richard Sandiford e52315924b bfd/
* config.bfd: Treat AIX 6+ in the same way as AIX 5.
	* configure.in: Likewise.
	* configure: Regenerate.

binutils/
	* configure.tgt: Extend AIX 5 behavior to AIX 6 and above.
	* configure.in: Likewise.
	* configure: Regenerate.

gas/
	* configure.tgt: Extend AIX 5 behavior to AIX 6 and above.
	* configure.in: Likewise.
	* configure: Regenerate.

ld/
	* configure.tgt: Extend AIX 5 behavior to AIX 6 and above.
2009-03-14 09:11:38 +00:00
Alan Modra 57898e0296 daily update 2009-03-14 00:00:09 +00:00
H.J. Lu 3516e9841c bfd/
2009-03-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/9945
	* elf.c (assign_section_numbers): Generate symbol table if there
	is any relocation in output.
	(_bfd_elf_compute_section_file_positions): Likewise.

binutils/

2009-03-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/9945
	* objcopy.c (copy_object): Clear HAS_RELOC when stripping all.
2009-03-13 13:39:57 +00:00
Nick Clifton ce98a316e9 PR 9934
* elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
        * elflink.c (elf_link_read_relocs_from_section): Use
        NUM_SHDR_ENTRIES.  Gracefully handle the case where there are
        relocs but no symbol table.
        * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2009-03-13 11:34:43 +00:00
Alan Modra f8abd13f3d daily update 2009-03-13 00:00:04 +00:00
H.J. Lu c4fb387b7c 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
PR ld/9938
	* elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
	to check ___tls_get_addr.

	* elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
	strncmp to check __tls_get_addr.
2009-03-12 17:13:41 +00:00
Andrew Stubbs 53638231ad 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
* dwarf2.c (read_section): Always check the offset, even when the
	section has been read before.
2009-03-12 10:57:18 +00:00
Alan Modra b937c27c4e daily update 2009-03-12 00:00:09 +00:00
H.J. Lu 09e8c3bf89 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
	comments.
2009-03-11 16:42:23 +00:00
Chris Demetriou 36e4dce69d [bfd/ChangeLog]
2009-03-11  Chris Demetriou  <cgd@google.com>

	* bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
	* bfd-in2.h: Regenerate.
	* archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
	flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
	mode.
	(bsd_write_armap): Likewise.
	(_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
	flag is set, do nothing.
	(coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
	for timestamp.

[binutils/ChangeLog]
2009-03-11  Chris Demetriou  <cgd@google.com>

	* ar.c (deterministic): New global variable.
	(main): Recognize new 'D' option, which enables 'deterministic mode'.
	(usage): Document new 'D' option.
	(write_archive): Set BFD_DETERMINISTIC_OUTPUT in output archive's
	flags if deterministic mode was requested.
	* doc/binutils.texi (ar): Document deterministic mode ('D' option).

[binutils/testsuite/ChangeLog]
2009-03-11  Chris Demetriou  <cgd@google.com>

	* binutils-all/ar.exp (deterministic_archive): New test.
2009-03-11 04:36:40 +00:00
Ulrich Weigand 9b175a76d1 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
used to update stack pointer.
2009-03-11 00:18:02 +00:00
Alan Modra 881e1e5652 daily update 2009-03-11 00:00:04 +00:00
Alan Modra 7598b09291 daily update 2009-03-10 00:00:08 +00:00
Alan Modra 8ac6d8b9dd daily update 2009-03-09 00:00:04 +00:00
Alan Modra db37ab6c7c daily update 2009-03-08 00:00:04 +00:00
Dave Anglin f501de170c PR binutils/9921
* som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
	for unknown symbols in absolute section.
2009-03-07 23:38:13 +00:00
Alan Modra b264ba2c90 daily update 2009-03-07 00:00:04 +00:00
Nick Clifton d11fd24905 Updated Spanish translations. 2009-03-06 12:14:40 +00:00
Christophe Lyon 8cd931b713 09-03-05 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (group_sections): Take next section size into
	account before accepting to group it.

	testsuite/
	* ld-arm/arm-elf.exp: Add new farcall-group-limit test.
	* ld-arm/farcall-group-limit.d: New file.
	* ld-arm/farcall-group3.s: New file.
	* ld-arm/farcall-group4.s: New file.
2009-03-06 08:57:58 +00:00
Alan Modra a4616131b3 daily update 2009-03-06 00:00:04 +00:00
Christophe Lyon 5fa9e92f74 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (arm_type_of_stub): Handle long branches targetting
	PLT entries.
	(elf32_arm_final_link_relocate): Likewise.

	testsuite/
	* ld-arm/arm-elf.exp: Add 2 more tests to check long branch stubs
	in PLT context.
	* ld-arm/farcall-mixed-app-v5.d: New file.
	* ld-arm/farcall-mixed-app.d: Likewise.
	* ld-arm/farcall-mixed-app.r: Likewise.
	* ld-arm/farcall-mixed-app.s: Likewise.
	* ld-arm/farcall-mixed-app.sym: Likewise.
	* ld-arm/farcall-mixed-lib.d: Likewise.
	* ld-arm/farcall-mixed-lib.r: Likewise.
2009-03-05 17:28:21 +00:00
Alan Modra b92997d66d PR 9923
* peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
2009-03-05 01:04:56 +00:00
Alan Modra b9deb64656 daily update 2009-03-05 00:00:04 +00:00
Alan Modra 727fc41e07 include/elf/
* ppc.h (R_PPC_TLSGD, R_PPC_TLSLD): Add new relocs.
	* ppc64.h (R_PPC64_TLSGD, R_PPC64_TLSLD): Add new relocs.
bfd/
	* reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
	* section.c (struct bfd_section): Add has_tls_get_addr_call.
	(BFD_FAKE_SECTION): Init new flag.
	* ecoff.c (bfd_debug_section): Likewise.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
	* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
	(ppc_elf_reloc_type_lookup): Handle new relocs.
	(ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
	without marker relocs.
	(ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
	if section has no old-style calls.
	(ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
	Don't try to optimize new-style __tls_get_addr call when handling
	arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
	relocs.
	* elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
	(ppc64_elf_reloc_type_lookup): Handle new relocs.
	(ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
	without marker relocs.
	(ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
	if section has no old-style calls.  Set toc_ref for new relocs as
	appropriate.
	(ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
	Don't try to optimize new-style __tls_get_addr call when handling
	arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
	relocs.
gas/
	* config/tc-ppc.c (ppc_elf_suffix): Error if ppc32 tls got relocs
	have non-zero addend.
	(md_assemble): Parse args of __tls_get_addr calls.
	(md_apply_fix): Handle BFD_RELOC_PPC_TLSGD and BFD_RELOC_PPC_TLSLD.
ld/testsuite/
	* ld-powerpc/tlsmark.s, * ld-powerpc/tlsmark.d: New test.
	* ld-powerpc/tlsmark32.s, * ld-powerpc/tlsmark32.d: New test.
	* ld-powerpc/powerpc.exp: Run them.
2009-03-04 05:50:50 +00:00
Alan Modra 51dec22749 bfd/
PR 6768
	* configure.in: Test for ld --as-needed support.  Link shared
	libbfd against libm.
	* configure: Regenerate.
opcodes/
	PR 6768
	* configure.in: Test for ld --as-needed support.  Link shared
	libopcodes against libm.
	* configure: Regenerate.
2009-03-04 02:10:34 +00:00
Alan Modra a1f7ca36bf missing from make dep-am commit 2009-03-04 01:16:15 +00:00
Alan Modra f2ee4e3518 daily update 2009-03-04 00:00:05 +00:00
Alan Modra 500b1f4473 make dep-am and regen
opcodes/
	* Makefile.am (HFILES): Move lm32-desc.h and lm32-opc.h from..
	(CFILES): ..here.
2009-03-03 02:41:14 +00:00
Alan Modra 3f1a2bb360 daily update 2009-03-03 00:00:07 +00:00
Nick Clifton c3b7224ae4 Add support for Score7 architecture. 2009-03-02 10:33:08 +00:00
Alan Modra c493b4aa97 daily update 2009-03-02 00:00:04 +00:00
Ralf Wildenhues 58e2467181 Backport from git Libtool:
2009-01-19  Robert Millan  <rmh@aybabtu.com>
	Support GNU/kOpenSolaris.
	* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
	(_LT_CHECK_MAGIC_METHOD, _LT_COMPILER_PIC, _LT_LINKER_SHLIBS)
	(_LT_LANG_CXX_CONFIG) [kopensolaris*-gnu]: Recognize
	GNU/kOpenSolaris.

binutils/
	* configure: Regenerate.

opcodes/
	* configure: Regenerate.

bfd/
	* configure: Regenerate.

gas/
	* configure: Regenerate.

gprof/
	* configure: Regenerate.

ld/
	* configure: Regenerate.
2009-03-01 18:57:19 +00:00
Dave Anglin d45b7d7459 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
(elf32_hppa_check_relocs): Use it.
2009-03-01 18:15:53 +00:00
Dave Anglin 5887528b24 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
elf64-hppa.c.
	(elf_hppa_unmark_useless_dynamic_symbols): Likewise.
	(elf_hppa_remark_useless_dynamic_symbols): Likewise.
	(elf_hppa_is_dynamic_loader_symbol): Likewise.
	(elf_hppa_record_segment_addrs): Likewise.
	(elf_hppa_final_link): Likewise.
	(elf_hppa_relocate_insn): Likewise.
	(elf_hppa_final_link_relocate): Likewise.
	(elf64_hppa_relocate_section): Likewise.
	* elf64-hppa.c: Insert above.
2009-03-01 17:08:54 +00:00
Dave Anglin a03bd320bd * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
(elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
	(elf_hppa_relocate_section): Likewise.
	* elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
	from struct elf_link_hash_entry.  Add count field.
	(struct elf64_hppa_dyn_hash_table): Delete.
	(struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
	(elf64_hppa_hash_table): Rename to hppa_link_hash_table.
	(hppa_elf_hash_entry, eh_name): Define.
	(elf64_hppa_new_dyn_hash_entry): Delete.
	(elf64_hppa_dyn_hash_lookup): Delete.
	(elf64_hppa_dyn_hash_traverse): Delete.
	(get_dyn_name): Delete.
	(elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
	of struct elf64_hppa_dyn_hash_entry *.
	(elf64_hppa_finalize_dlt, llocate_global_data_dlt,
	allocate_global_data_plt, allocate_global_data_stub,
	allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
	Likewise.
	(hppa64_link_hash_newfunc): New.
	(elf64_hppa_hash_table_create): Rework.
	(count_dyn_reloc): Likewise.
	(hppa64_elf_local_refcounts): New.
	(elf64_hppa_check_relocs): Rework using standard technique for recording
	local DLT, PLT and OPD reference counts.
	(elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
	elf_link_hash_entry *.
	(elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
	allocate_global_data_plt, allocate_global_data_stub,
	allocate_global_data_opd, allocate_dynrel_entries,
	elf64_hppa_adjust_dynamic_symbol,
	elf64_hppa_mark_milli_and_exported_functions): Likewise.
	(elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
	Use hppa_link_hash_table.  Rework.
	(elf64_hppa_link_output_symbol_hook): Rework.
	(elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
	elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
	elf64_hppa_finish_dynamic_sections): Likewise.
2009-03-01 02:10:49 +00:00
Alan Modra a8a886ba79 daily update 2009-03-01 00:00:05 +00:00
Alan Modra 8ca6feb110 daily update 2009-02-28 00:00:05 +00:00
Alan Modra 933f52b463 daily update 2009-02-27 00:00:08 +00:00
Christophe Lyon ebe24dd4f8 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (stub_reloc_type): Removed.
	(insn_sequence): Renamed reloc_type field to r_type.
	(elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
	(elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
	(elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
	(elf32_arm_stub_type): Add new enum entries for the new stubs.
	(arm_stub_is_thumb): Catch new stubs.
	(arm_type_of_stub): Handle new stubs.
	(arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
	(bfd_elf32_arm_process_before_allocation): Remove useless
	condition.

	testsuite/
	* ld-arm/arm-elf.exp: Add 3 tests for the 3 new stubs.
	* ld-arm/farcall-thumb-arm-pic-veneer.d: New expected result, the
	test is now expected to pass.
	* ld-arm/farcall-thumb-thumb-m-pic-veneer.d: Likewise.
	* ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise.
2009-02-26 15:37:53 +00:00
Alan Modra 5be39b1ebe daily update 2009-02-26 00:00:10 +00:00
Tristan Gingold a60a89d65d Update contributors list for update of alpha-vms bfd.
(Sorry).
2009-02-25 16:50:01 +00:00
H.J. Lu b9d678e09f 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (elf_find_function): Use is_function_type to check
	function symbol.
2009-02-25 14:39:35 +00:00
Alan Modra 6fe0eb5ea5 daily update 2009-02-25 00:00:05 +00:00
Sterling Augustine 56fb374922 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
* xtensa-modules.c: Revert to previous version 1.11 due
	to inadvertent commit.
2009-02-24 23:26:40 +00:00
Sterling Augustine 658ff9936c 2009-02-24 Sterling Augustine <sterling@tensilica.com>
* elf32-xtensa.c (text_action_add): Separate test for action
	type.  Break if saved action is ta_widen_insn at same offset.
2009-02-24 22:51:10 +00:00
Daniel Jacobowitz cf3eccff18 bfd/
* elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
	to elf32_arm_stub_long_branch_any_arm_pic.
	(elf32_arm_stub_long_branch_any_thumb_pic): New.
	(enum elf32_arm_stub_type, arm_type_of_stub)
	(arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
	separately.

	ld/testsuite/
	* ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
	ld-arm/farcall-arm-thumb-pic-veneer.d,
	ld-arm/farcall-thumb-thumb-blx-pic-veneer.d: Update for fixed
	Thumb PIC stub.
2009-02-24 22:44:18 +00:00
Daniel Jacobowitz 07d72278cd 2009-02-24 Joseph Myers <joseph@codesourcery.com>
bfd/
	* elf32-arm.c (PREV_SEC): Update comment.
	(group_sections): Rename argument to stubs_always_after_branch.
	Reverse the list and place stubs at the end of input sections.
	Undefine NEXT_SEC.
	(elf32_arm_size_stubs): Update to use stubs_always_after_branch.

	ld/
	* ld.texinfo (ARM): Document changed meaning of --stub-group-size.
	* emultempl/armelf.em (hook_in_stub): Insert after the input section.
	(elf32_arm_add_stub_section): Update comment.
	(PARSE_AND_LIST_OPTIONS): Update help for --stub-group-size.

2009-02-24  Daniel Jacobowitz  <dan@codesourcery.com>

	ld/testsuite/
	* ld-arm/arm-elf.exp (armeabitests): Update duplicate test names.
	Use normal output files for big-endian.
	* ld-arm/farcall-arm-arm-be.d, ld-arm/farcall-thumb-arm-be.d: Delete.
	* ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d,
	ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
	ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d,
	ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d,
	ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d,
	ld-arm/farcall-thumb-arm-be8.d,
	ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
	ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm-short.d,
	ld-arm/farcall-thumb-arm.d,
	ld-arm/farcall-thumb-thumb-blx-pic-veneer.d,
	ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d,
	ld-arm/farcall-thumb-thumb.d, ld-arm/thumb2-bl-as-thumb1-bad.d,
	ld-arm/thumb2-bl-bad.d: Update for moved stubs.
2009-02-24 22:43:10 +00:00
Daniel Jacobowitz 4e31c73195 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
Fix formatting.
	(arm_size_one_stub): Remove unnecessary break.
	(arm_map_one_stub): Fix formatting.  Return after BFD_FAIL.
2009-02-24 00:26:40 +00:00
Alan Modra c75c7ccd14 daily update 2009-02-24 00:00:05 +00:00
Daniel Jacobowitz 461a49caca 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (stub_insn_type): New type.
	(stub_reloc_type): Likewise.
	(insn_sequence): Likewise.
	(elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
	(elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
	(elf32_arm_stub_long_branch_thumb_only): Likewise.
	(elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
	(elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
	(elf32_arm_stub_long_branch_any_any_pic): Likewise.
	(elf32_arm_stub_hash_entry): Add new helper fields.
	(stub_hash_newfunc): Initialize these new fields.
	(arm_build_one_stub): Encode Arm and Thumb instructions separately
	to take endianness into account.
	(arm_size_one_stub): Compute size of stubs using insn_sequence.
	(arm_map_one_stub): Code is now more generic, thanks to
	insn_sequence.

	ld/testsuite/
	* ld-arm/arm-elf.exp: Add new farcall-thumb-arm-be8 test.
	* ld-arm/farcall-thumb-arm-be8.d: New expected result.
	* ld-arm/farcall-arm-arm-be8.d: Replace wildcards by instructions.
2009-02-23 21:48:53 +00:00
Christophe Lyon c2b4a39dd2 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
	code.
	(elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
	(arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
	BLX is not available. Fix typo in warning message. Add comments
	and improve formatting.
	(arm_build_one_stub): Adjust to new
	elf32_arm_stub_long_branch_v4t_thumb_arm stub.
	(arm_map_one_stub): Likewise.

	testsuite/
	* ld-arm/arm-elf.exp: Rewrite non-EABI variants of
	thumb2-bl-as-thumb1-bad and thumb2-bl-bad tests, which now
	pass. farcall-thumb-thumb now passes in EABI mode.
	* ld-arm/farcall-thumb-arm-pic-veneer.d: Fixed name, source, as
	and ld flags to match intended test.
	* ld-arm/farcall-thumb-arm.d: New expected result.
	* ld-arm/farcall-thumb-thumb-m.d: Likewise.
	* ld-arm/farcall-thumb-thumb-m-pic-veneer.d: Fixed name and ld
	flags.
	* ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise.
	* ld-arm/farcall-thumb-thumb.d: New expected result, this test is
	now expected to pass.
	* ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d: Likewise.
	* ld-arm/thumb2-bl-bad-noeabi.d: Likewise.
	* ld-arm/thumb2-bl-as-thumb1-bad.d: Update addresses according to
	new use.
	* ld-arm/thumb2-bl-as-thumb1-bad.s: Update comment.
2009-02-23 10:03:47 +00:00
Tristan Gingold 0c37646508 2009-02-23 Tristan Gingold <gingold@adacore.com>
* vms.h: Update copyright year, fix comments, reorder declarations.
	(_bfd_save_vms_section): Remove the prototype.
	(EGPS_S_V_NO_SHIFT): New constant.
	(bfd_vms_set_section_flags): New prototype.
	(EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
	constants.
	(EGSY_S_W_FLAGS): Ditto.
	(EGSY_S_V_QUAD_VAL): Ditto.
	(ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
	(EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
	EGST_S_B_NAMLNG): Ditto.
	(ESRF_S_B_NAMLNG): Ditto.
	(ETIR_S_C_HEADER_SIZE): Ditto.
	(EGPS_S_V_ALLOC_64BIT): Ditto.
	(DST_S_C_EPILOG): Ditto.
	(DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
	(DST_S_C_SRC_INCRLNUM_B): Ditto.
	(DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
	(DST_S_L_PCLINE_UNSLONG): Ditto.
	(DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
	(DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
	(DST_S_C_SOURCE_HEADER_SIZE): Ditto.
	(DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
	(DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
	(DST_S_B_SRC_UNSBYTE): Ditto.
	(DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
	Add prototypes.
	(vms_section, vms_reloc): Remove types.
	(hdr_struc): Replaced by ...
	(hdr_struct): ... new type.
	(EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
	(EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
	(EMH_DATE_LENGTH): Ditto.
	(eom_struc): Replaced by ...
	(eom_struct): ... new type.
	(EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
	(EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
	(EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
	(EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
	(EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
	(EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
	(EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
	(EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
	(EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
	(EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
	(EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
	(EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
	(EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
	(EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
	(EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
	(DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
	(DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
	(DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
	(DBG_S_C_DMT_PSECT_SIZE): Ditto.
	(enum file_type_enum): New type.
	(struct location_struct): Removed.
	(struct fileinfo, struct srecinfo, struct lineinfo): New types.
	(struct funcinfo, struct module): Ditto.
	(struct vms_private_data_struct): Update fields.
	(struct vms_section_data_struct): New type.

	* vms.c: Update copyright year, fix comments,
	Fix includes for DECC, add prototypes.
	(vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
	some initializers.
	Use flavour to set is_vax, location_stack is removed.
	(struct pair): Declare.
	(fill_section_ptr): Initialize variables at declaration.
	Add guard to set SECTION_SYM flag, handlde und section.
	(vms_fixup_sections): Use struct pair for fill_section_ptr argument.
	(_bfd_vms_slurp_object_records): New function, replaces previous
	vms_object_p.
	(vms_slurp_module): New function.
	(vms_slurp_image): Ditto.
	(vms_object_p): Complete rewrite.
	(vms_mkobject): Use is_vax field to slect architecture.
	(free_reloc_stream): New function.
	(vms_convert_to_var): Ditto.
	(vms_convert_to_var_1): Ditto.
	(vms_convert_to_var_unix_filename): Ditto.
	(vms_close_and_cleanup): Call free_reloc_stream, convert file to
	VAR format on VMS.
	(vms_new_section_hook): Set alignment to 0, allocate private data.
	(vms_get_section_contents): Load content.
	(vms_get_symbol_info): Handle undefined section.
	(vms_find_nearest_line): Handle.
	(alloc_reloc_stream): New function.
	(vms_slurp_reloc_table): Ditto.
	(vms_get_reloc_upper_bound): Make it real.
	(vms_canonicalize_reloc): Do the real work.
	(alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
	ALPHA_R_BOH.
	(vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
	(vms_set_arch_mach): Check arch.
	(vms_set_section_contents): Copy the content after allocation.
	(vms_alpha_vec): Update object flags.

	* vms-tir.c: Update copyright year, fix comments,
	add prototypes for new functions.
	(dst_define_location): New function.
	(dst_restore_location): New function.
	(dst_retrieve_location): New function.
	(dst_check_allocation): New function.
	(image_dump): Call dst_check_allocation.
	(image_write_b): Ditto.
	(image_write_w): Ditto.
	(image_write_l): Ditto.
	(image_write_q): Ditto.
	(cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
	STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
	CTL_STKDL.
	Call error handler instead of abort if name is not known.
	(etir_sta): Add quarter_relocs argument and set it.
	Fix cast.
	(etir_sto): Ditto.
	(etir_opr): Ditto, return FALSE in case of error.
	(etir_ctl): Add quarter_relocs argument and set it, fix cast.
	Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
	(etir_stc): Add quarter_relocs argument and set it, fix cast.
	Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
	Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
	Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
	Return FALSE in case of error.
	(tir_sta): Change sign of psect.
	(tir_ctl): Ditto.
	(tir_cmd): Fix cast. Makes tir_table static const.
	(etir_cmd): Add quarter_relocs argument, makes etir_table const,
	add argument to explain.
	(analyze_etir): Initialize maxptr, add quarter_relocs
	declaration, move some declarations into inner scopes.
	Handle quarter_relocs and STO_IMM.
	(_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
	(_bfd_vms_slurp_relocs): New function.
	(_bfd_vms_decode_relocs): New function.
	(sto_imm): Rewritten.
	(start_first_etbt_record): New function.
	(start_another_etbt_record): Ditto.
	(etir_output_check): Ditto.
	(defer_reloc_p): Ditto.
	(_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
	a for-loop.  Correctly deals with contents, deals with .vmsdebug,
	rewritte relocations handling.
	(_bfd_vms_write_tbt): Removed.
	(_bfd_vms_write_dbg): Ditto.

	* vms-misc.c: Update copyright year, Fix comments.
	(_bfd_vms_get_header_values): Use 'size' instead of 'length'.
	(maybe_adjust_record_pointer_for_object): New function.
	(_bfd_vms_get_first_record): New function, replaces ...
	(_bfd_vms_get_record): ..  removed.
	(_bfd_vms_get_object_record): New function.
	(_bfd_vms_get_object_record): New function.
	(vms_get_remaining_object_record): New function, replaces ...
	(_bfd_vms_get_next_record): ... removed.
	(add_new_contents): Removed.
	(_bfd_save_vms_section): Removed.
	(_bfd_get_vms_section): Removed.
	(_bfd_vms_output_flush): Write in VAR format.
	(new_symbol): Don't make UND section.

	* vms-hdr.c: Update copyright year, update list of record handled.
	(_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
	(_bfd_vms_write_hdr): Strip vms and unix patches,
	add comments, truncate module name at 31 characters,
	use constants instead of hard-coded value,
	write BFD version instead of a fixed string.
	(_bfd_vms_slurp_ihd): New function.
	(_bfd_vms_slurp_isd): Ditto.
	(_bfd_vms_slurp_ihs): Ditto.
	(new_module): Ditto.
	(parse_module): Ditto
	(build_module_list): Ditto.
	(module_find_nearest_line): Ditto.
	(_bfd_vms_find_nearest_dst_line): Ditto.
	(vms_slurp_debug): Ditto.
	(_bfd_vms_slurp_dbg): Ditto.
	(_bfd_vms_slurp_tbt): Ditto.
	(_bfd_vms_write_dbg): Ditto.
	(_bfd_vms_write_tbt): Ditto.

	* vms-gsd.c: Update copyright year, update list of records handled.
	(EVAX_LITERALS_NAME): New macro.
	(evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
	(gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
	(register_universal_symbol): New function and prototype.
	(_bfd_vms_slurp_gsd): Fix indentations and casts,
	improve debug messages,
	use constants instead of hard-coded value,
	fix missing endianness conversion,
	handle global symbol (SYMG).
	(bfd_vms_set_section_flags): New function.
	(_bfd_vms_write_gsd): Don't write .vmsdebug section,
	handle section literals,
	fix indentation,
	handle section bfd and vms flags,
	don't output LIB$INITIALIZE symbol,
	fix handling of weak symbols,
	fix evax vs vax procedure descriptor,
	handle absolute symbols.

	* reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
	BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.

	* makefile.vms (DEFS): Fix flags for VMS.

	* bfdio.c (real_fopen): Handle multiple VMS fopen attributes.

	* bfd-in2.h: Regenerated.
	* libbfd.h: Regenerated.
2009-02-23 09:28:43 +00:00
Alan Modra ac671e4fb5 daily update 2009-02-23 00:00:05 +00:00
Alan Modra 11b0103b5d daily update 2009-02-22 00:00:05 +00:00
Alan Modra 9ee52d15fa daily update 2009-02-21 00:00:05 +00:00
Cary Coutant 4714925452 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
in struct stat.
2009-02-20 18:53:12 +00:00
Alan Modra 24ad731bef daily update 2009-02-20 00:00:04 +00:00
Alan Modra 02e6c11cc4 daily update 2009-02-19 00:00:09 +00:00
Dave Korn 6b1cecf3a4 PR gas/7059
* coffcode.h (coff_write_object_contents):  Don't let the string
	table offset overflow the s_name field when using long section names.
2009-02-18 18:38:06 +00:00
Dave Korn 8818386922 bfd/ChangeLog
* coff-alpha.c (alpha_ecoff_backend_data):  Initialise fields which
	control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
	* coff-mips.c (mips_ecoff_backend_data):  Likewise.
	* coff-rs6000.c (bfd_xcoff_backend_data):  Initialise fields which
	control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
	(bfd_pmac_xcoff_backend_data):  Likewise.
	* coff64-rs6000.c (bfd_xcoff_backend_data):  Likewise.
	(bfd_xcoff_aix5_backend_data):  Likewise.
	(xcoff64_write_object_contents):  Delete unused long_section_names
	local variable.
	* coff-sh.c (bfd_coff_small_swap_table):  Initialise long section
	name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
	struct non-const.
	* coffcode.h (documentation):  Update to describe long section names.
	(COFFLONGSECTIONCATHELPER):  New helper macro.
	(BLANKOR1TOODD):  Likewise.
	(COFF_ENABLE_LONG_SECTION_NAMES):  Likewise.
	(COFF_LONG_SECTION_NAMES_SETTER):  Likewise.
	(COFF_DEFAULT_LONG_SECTION_NAMES):  Likewise.
	(bfd_coff_set_long_section_names_allowed):  New function.
	(bfd_coff_set_long_section_names_disallowed):  Likewise.
	(struct bfd_coff_backend_data):  Add new backend hook function
	pointer _bfd_coff_set_long_section_names.
	(bfd_coff_set_long_section_names):  New backend hook.
	(coff_write_object_contents):  Only generate long section names if
	bfd_coff_long_section_names() indicates they are currently enabled.
	(bfd_coff_std_swap_table):  Make non-const, and initialise long
	section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
	(ticoff0_swap_table):  Likewise to both.
	(ticoff1_swap_table):  Again, likewise to both.
	* coffgen.c (make_a_section_from_file):  Allow long section names
	as inputs even if not currently allowed for outputs.
	* ecoff.c (_bfd_ecoff_no_long_sections):  New function.
	* efi-app-ia32.c (COFF_LONG_SECTION_NAMES):  Define to 0, not blank.
	* efi-app-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* efi-app-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* pei-arm.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* pei-i386.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* pei-mcore.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* pei-mips.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* pei-ppc.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* pei-sh.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* pei-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
	* libcoff-in.h:  Update copyright year to cause updated copyright
	year in generated libcoff.h, and fix typo.
	* libcoff.h:  Regenerated.
	* libecoff.h (ECOFF_NO_LONG_SECTION_NAMES):  New macro.
	(_bfd_ecoff_no_long_sections):  Add prototype.
	* libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES):  New macro.
	* pe-mips.c (COFF_LONG_SECTION_NAMES):  Define empty if not already
	defined by an including .c file.
	* ticoff.h (ticoff0_swap_table):  Make non-const, and initialise
	long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
	(ticoff1_swap_table):  Likewise to both.

ld/ChangeLog

	* ld.texinfo:  Update to mention long section name options.
	* NEWS:  Mention new behaviour and command-line options.
	* pe-dll.c (pe_use_coff_long_section_names):  New global variable.
	(pe_output_file_set_long_section_names):  New function.
	(pe_dll_build_sections):  Call it on output BFDs.
	(pe_exe_build_sections):  Likewise.
	(pe_dll_fill_sections):  Likewise.
	(pe_exe_fill_sections):  Likewise.
	* pe-dll.h (pe_use_coff_long_section_names):  Declare extern.
	(pe_output_file_set_long_section_names):  Add prototype.
	* pep-dll.c (pe_use_coff_long_section_names):  Define pep_ alias.
	(pe_output_file_set_long_section_names):  Likewise.
	* pep-dll.h (pep_use_coff_long_section_names):  Declare extern.
	(pep_output_file_set_long_section_names):  Add prototype.
	* pe.em (OPTION_ENABLE_LONG_SECTION_NAMES):  New getopt value macro.
	(OPTION_DISABLE_LONG_SECTION_NAMES):  Likewise.
	(gld${EMULATION_NAME}_add_options):  Add new options to xtra_long[].
	(gld_${EMULATION_NAME}_list_options):  Describe them.
	(gld${EMULATION_NAME}_handle_option):  Set or clear global
	pe_use_coff_long_section_names flag when options recognised.
	(gld_${EMULATION_NAME}_after_open):  En/disable long section names
	for main output bfd by calling pe_output_file_set_long_section_names.
	* pep.em (enum options):  Extend enum with new getopt option values.
	(gld${EMULATION_NAME}_add_options):  Add new options to xtra_long[].
	(gld_${EMULATION_NAME}_list_options):  Describe them.
	(gld${EMULATION_NAME}_handle_option):  Set or clear global
	pe_use_coff_long_section_names flag when options recognised.
	(gld_${EMULATION_NAME}_after_open):  En/disable long section names
	for main output bfd by calling pep_output_file_set_long_section_names.

ld/testsuite/ChangeLog

	* ld-pe/longsecn-1.d:  New test file.
	* ld-pe/longsecn-2.d:  Likewise.
	* ld-pe/longsecn-3.d:  Likewise.
	* ld-pe/longsecn-4.d:  Likewise.
	* ld-pe/longsecn-5.d:  Likewise.
	* ld-pe/longsecn.d:  Likewise.
	* ld-pe/longsecn.exp:  New test control script.
	* ld-pe/longsecn.s:  New test source file.
2009-02-18 18:23:08 +00:00
Christophe Lyon 90d8a22ca2 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
	stub. Catch default case error.
	(arm_map_one_stub): Add missing Thumb mapping symbol.

	testsuite/
	* ld-arm/farcall-arm-arm-pic-veneer.d,
	ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
	ld-arm/farcall-arm-thumb-pic-veneer.d,
	ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
	ld-arm/farcall-thumb-thumb-blx-pic-veneer.d: Fix expected stub
	target.
2009-02-18 16:56:37 +00:00
Nick Clifton 121230679f PR 9841
* elf32-avr.c: Handle case where no local symbos exist correctly.
2009-02-18 15:28:56 +00:00
Christophe Lyon fea2b4d6bd 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (arm_long_branch_stub,
	arm_thumb_v4t_long_branch_stub,
	arm_thumb_thumb_long_branch_stub,
	arm_thumb_arm_v4t_long_branch_stub,
	arm_thumb_arm_v4t_short_branch_stub,
	arm_pic_long_branch_stub):
	Renamed to elf32_arm_stub_long_branch_any_any,
	elf32_arm_stub_long_branch_v4t_arm_thumb,
	elf32_arm_stub_long_branch_thumb_only,
	elf32_arm_stub_long_branch_v4t_thumb_arm,
	elf32_arm_stub_short_branch_v4t_thumb_arm,
	elf32_arm_stub_long_branch_any_any_pic.
	(arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
	arm_thumb_thumb_stub_long_branch,
	arm_thumb_arm_v4t_stub_long_branch,
	arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
	Renamed to arm_stub_long_branch_any_any,
	arm_stub_long_branch_v4t_arm_thumb,
	arm_stub_long_branch_thumb_only,
	arm_stub_long_branch_v4t_thumb_arm,
	arm_stub_short_branch_v4t_thumb_arm,
	arm_stub_long_branch_any_any_pic.
2009-02-18 12:45:38 +00:00
Alan Modra eae54b053e daily update 2009-02-18 00:00:04 +00:00
Alan Modra 238a0ff1bd daily update 2009-02-17 00:00:06 +00:00
Alan Modra d0a63aa7a1 daily update 2009-02-16 00:00:09 +00:00
Dave Anglin 13e0a87495 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
in branch offset check.
2009-02-15 19:39:44 +00:00
Alan Modra 3a71aa26df * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
add toc.symndx and toc.add.
	(ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
	Set up toc.add.
	(get_tls_mask): Add toc_addend param, set from toc.add.  Adjust all
	callers.
	(ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
	(branch_reloc_hash_match): New function, extracted from..
	(ppc64_elf_tls_optimize): ..here.
	(ppc64_elf_relocate_section): Properly set addends when optimizing
	tls sequences.  Avoid unnecessary reading and writing of insns.
	Only redo reloc when symbol changed.  Bypass symbol checks when
	using tlsld_got.
	* elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
	(branch_reloc_hash_match): New function, extracted from..
	(ppc_elf_tls_optimize): ..here.
	(ppc_elf_relocate_section): Avoid unnecessary reading of insns.
	Don't clear addend on zapped __tls_get_addr reloc.
2009-02-15 12:14:14 +00:00
Alan Modra f007ec5895 daily update 2009-02-15 00:00:04 +00:00
Alan Modra 5b1ac8299f daily update 2009-02-14 00:00:04 +00:00
Alan Modra 0e164fa65d daily update 2009-02-12 23:59:29 +00:00
Nick Clifton 2c2b4ed43a PR 9827
* elflink.c (bfd_elf_final_link): When counting the relocations,
        if the header size has not been set yet then assume that it will
        match the output section's reloc type.
2009-02-12 15:06:55 +00:00
Nathan Sidwell 453f5985b1 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
relocatable link.
2009-02-12 08:28:19 +00:00
Alan Modra 1284f375b6 daily update 2009-02-11 23:59:30 +00:00
Alan Modra 454c49d7bf daily update 2009-02-10 23:59:32 +00:00
Alan Modra bb64c27c7f daily update 2009-02-09 23:59:33 +00:00
Alan Modra 3209bffac6 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
(find_function): Likewise.
	(pasted_function): Don't error if no prior function found.
	(discover_functions): Revert 2008-12-10 change.  Extend first
	function range to start of section.
2009-02-09 14:24:41 +00:00
Alan Modra 35b1761710 daily update 2009-02-08 23:59:35 +00:00
Dave Anglin 813c8a3ca4 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
functions to C90.
	* elf64-hppa.h: Likewise.
2009-02-08 17:08:31 +00:00
Alan Modra c14b2fbe6d daily update 2009-02-07 00:00:04 +00:00
Joseph Myers 2d0f9ad979 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
.sbss handling.
2009-02-06 14:11:00 +00:00
Alan Modra adbb1303f3 daily update 2009-02-06 00:00:09 +00:00
Alan Modra 1314c5237c daily update 2009-02-05 00:00:04 +00:00
Alan Modra 50e009621f * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
2009-02-04 02:42:57 +00:00
Alan Modra 54f9485f32 daily update 2009-02-03 23:59:38 +00:00
Joseph Myers 52b6b6b972 bfd:
2009-02-03  Sandip Matte  <sandip@rmicorp.com>

	* aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
	* archures.c (bfd_mach_mips_xlr): Define.
	* bfd-in2.h: Regenerate.
	* cpu-mips.c (I_xlr): Define.
	(arch_info_struct): Add XLR entry.
	* elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
	(mips_set_isa_flags): Handle bfd_mach_mips_xlr
	(mips_mach_extensions): Add XLR entry.

binutils:
2009-02-03  Sandip Matte  <sandip@rmicorp.com>

	* readelf.c (get_machine_flags): Handle E_MIPS_MACH_XLR.

gas:
2009-02-03  Sandip Matte  <sandip@rmicorp.com>

	* config/tc-mips.c (macro): Handle M_MSGSND, M_MSGLD, M_MSGLD_T,
	M_MSGWAIT and M_MSGWAIT_T.
	(mips_cpu_info_table): Add XLR entry.
	* doc/c-mips.texi (-march): Document xlr.

gas/testsuite:
2009-02-03  Sandip Matte  <sandip@rmicorp.com>

	* gas/mips/mips.exp (xlr): New architecture.
	(xlr-ext): Run test.
	* gas/mips/xlr-ext.d, gas/mips/xlr-ext.s: New.

include/elf:
2009-02-03  Sandip Matte  <sandip@rmicorp.com>

	* mips.h (E_MIPS_MACH_XLR): Define.

include/opcode:
2009-02-03  Sandip Matte  <sandip@rmicorp.com>

	* mips.h (INSN_XLR): Define.
	(INSN_CHIP_MASK): Update.
	(CPU_XLR): Define.
	(OPCODE_IS_MEMBER): Update.
	(M_MSGSND, M_MSGLD, M_MSGLD_T, M_MSGWAIT, M_MSGWAIT_T): Define.

opcodes:
2009-02-03  Sandip Matte  <sandip@rmicorp.com>

	* mips-dis.c (mips_cp0_names_xlr, mips_cp0sel_names_xlr): Define.
	(mips_arch_choices): Add XLR entry.
	* mips-opc.c (XLR): Define.
	(mips_builtin_opcodes): Add XLR instructions.
2009-02-03 18:16:04 +00:00
Eric B. Weddington 654c3c9fa5 /bfd:
2009-02-03  Eric B. Weddington  <eric.weddington@atmel.com>

	* elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
2009-02-03 17:21:02 +00:00
Joseph Myers 31dd3154f4 bfd:
2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.in: AC_SUBST pdfdir.
	* Makefile.am: Add install-pdf, install-pdf-am
	and install-pdf-recursive targets. Define pdfdir.
	* doc/Makefile.am: Define pdf__strip_dir. Add
	install-pdf and install-pdf-am targets.
	* po/Make-in: Add install-pdf target.
	* configure: Regenerate.
	* Makefile.in: Regenerate
	* doc/Makefile.in: Regenerate.

binutils:
2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.in: AC_SUBST pdfdir.
	* Makefile.am: Add install-pdf, install-pdf-am,
	and install-pdf-recursive targets.
	* doc/Makefile.am: Define pdf__strip_dir. Add
	install-pdf and install-pdf-am targets.
	* po/Make-in: Add install-pdf target.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.

etc:
2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.in: AC_SUBST pdfdir.
	* configure: Regenerate.

gas:
2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.in: AC_SUBST pdfdir.
	* Makefile.am: Add install-pdf, install-pdf-am,
	and install-pdf-recursive targets.
	* doc/Makefile.am: Define pdf__strip_dir. Add
	install-pdf and install-pdf-am targets.
	* po/Make-in: Add install-pdf target.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.

gprof:
2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.in: AC_SUBST pdfdir.
	* Makefile.am: Add install-pdf, install-pdf-am,
	and install-pdf-recursive targets. Define pdf__strip_dir.
	* po/Make-in: Add install-pdf target.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

ld:
2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.in: AC_SUBST pdfdir.
	* Makefile.am: Add install-pdf, install-pdf-am,
	and install-pdf-recursive targets. Define pdf__strip_dir.
	* po/Make-in: Add install-pdf target.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

opcodes:
2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.am: Add install-pdf target.
	* po/Make-in: Add install-pdf target.
	* Makefile.in: Regenerate.
2009-02-03 15:54:05 +00:00
Nick Clifton cf869cce62 M68K TLS support.
ld/testsuite/
        * ld-m68k/got-multigot-12-13-14-34-35-ok.d: Update.
        * ld-m68k/got-multigot-14-ok.d: Update.
        * ld-m68k/m68k-got.exp: Update.
        * ld-m68k/got-negative-12-13-14-34-ok.d: Update.
        * ld-m68k/got-negative-14-ok.d: Update.
        * ld-m68k/tls-gd-1.d, ld-m68k/tls-gd-2.d: New tests.
        * ld-m68k/tls-gd-ie-1.d, ld-m68k/tls-ie-1.d: New tests.
        * ld-m68k/tls-ld-1.d, ld-m68k/tls-ld-2.d: New tests.
        * ld-m68k/tls-ld-1.s, ld-m68k/tls-ld-2.s, ld-m68k/tls-le-1.s:
        New test sources.
        * ld-m68k/tls-no-1.s, ld-m68k/tls-gd-ie-1.s, ld-m68k/tls-gd-1.s:
        New test sources.
        * ld-m68k/tls-gd-2.s, ld-m68k/tls-ie-1.s: New test sources.
        * ld-m68k/m68k.exp: Run new tests.
        (merge isa-a isa-a:nodiv): Fix.

        gas/testsuite/
        * gas/m68k/tls-gd-3.d, gas/m68k/tls-gd-3.s: New test.
        * gas/m68k/all.exp: Run it.

        gas/
        * config/m68k-parse.h (enum pic_relocation): Add values for TLS
        relocations.
        * config/m68k-parse.y (yylex): Parse TLS relocations.
        * config/tc-m68k.c (m68k_elf_cons): New static function.
        (md_pseudo_table): Use it.
        (get_reloc_code, tc_m68k_fix_adjustable, tc_gen_reloc): Handle TLS
        relocations.
        (md_apply_fix): Fix to set thread local flag.
        (m68k_elf_suffix): New static function; helper for m68k_elf_cons.

        include/elf/
        * m68k.h: Map TLS relocations to numbers.

        bfd/
        * bfd-in2.h: Regenerate.
        * elf32-m68k.c: Handle 2-slot GOT entries.  Rename variables and
        fields from n_entries to n_slots where appropriate, update comments.
        (HOWTO): Add TLS relocations.
        (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
        (enum elf_m68k_got_offset_size): New enum.
        (struct elf_m68k_got_entry.type): Move field to ...
        (struct elf_m68k_got_entry_key): ... here.  Update all uses.
        (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
        functions.
        (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
        functions.
        (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
        fields into n_entries array.  Update comments.
        (elf_m68k_init_got): Simplify, update all uses.
        (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
        (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
        GOT entries; update name, update all uses.
        (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
        (elf_m68k_get_got_entry): Update.
        (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
        simplify.
        (elf_m68k_remove_got_entry_type): Simplify.
        (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
        (elf_m68k_can_merge_gots): Update.
        (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
        (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
        GOT entries, simplify.
        (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
        (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
        field, remove obsoleted local_n_entries field.
        (elf_m68k_partition_multi_got_2): New static function.
        (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
        update.
        (elf_m68k_remove_got_entry_type): Update.
        (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
        (elf_m68k_check_relocs): Handle TLS relocations.  Remove unnecessary
        update of sgot->size and srelgot->size.
        (elf_m68k_gc_sweep_hook): Update.
        (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
        (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
        TLS relocations.
        * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
        * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
2009-02-03 14:36:47 +00:00
DJ Delorie c1a0a41faa * elf32-mep.c (config_names): Regenerate configuration.
* mep-asm.c: Regenerate.
* mep-desc.c: Regenerate.
* mep-desc.h: Regenerate.
* mep-dis.c: Regenerate.
* mep-ibld.c: Regenerate.
* mep-opc.c: Regenerate.
* mep-opc.h: Regenerate.
2009-02-03 02:15:57 +00:00
Alan Modra b6b5e91cdd daily update 2009-02-03 00:00:04 +00:00
Alan Modra 72a80a16c6 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
(bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
	* elf.c (bfd_elf_get_str_section): Make static.
	(bfd_elf_find_section): Delete.
	* libbfd.h: Regenerate.
2009-02-02 03:52:38 +00:00
Alan Modra b856a10369 daily update 2009-02-02 00:00:05 +00:00
Jan Kratochvil 273f4430f8 bfd/
* elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
	(_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.

ld/testsuite/
	* ld-elf/eh-group2.s: New `.cfi_lsda' referencing `.gcc_except_table'.
	* ld-elf/eh-group.exp: New test and conditional defininiton of `ELF64'.
2009-02-01 12:05:25 +00:00
Alan Modra 42c26fd59b daily update 2009-02-01 00:00:09 +00:00
Alan Modra 010e5ae26e binutils/
* NEWS: Mention --as-needed change.
ld/
	* ld.texinfo (--as-needed): Update.
bfd/
	* elflink.c (on_needed_list): New function.
	(elf_link_add_object_symbols): Link in --as-needed libs if they
	satisfy undefined symbols in other libs.
2009-01-31 11:44:38 +00:00
Alan Modra 457395c350 daily update 2009-01-31 00:00:05 +00:00
Joseph Myers 33a7ffc270 2009-01-30 Julian Brown <julian@codesourcery.com>
* elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
	EXEC_P or DYNAMIC flags, and skip sections which are being linked
	with --just-symbols (-R).
2009-01-30 01:32:25 +00:00
Adam Nemet 13d72a148e * dwarf2.c (read_rangelist): Use read_address to read low_pc and
high_pc in order to properly sign-extend VMAs.
2009-01-30 01:04:47 +00:00
Alan Modra 55b0d6e3cf daily update 2009-01-30 00:00:31 +00:00
Joseph Myers d334575b76 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
Mark Shinwell  <shinwell@codesourcery.com>
            Catherine Moore  <clm@codesourcery.com>

	* elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
2009-01-29 16:35:03 +00:00
Alan Modra 2211be76e9 daily update 2009-01-29 00:00:09 +00:00
Catherine Moore 528aeb629f * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
SEC_LOAD for dynamic relocation sections.
2009-01-28 16:35:13 +00:00
Alan Modra 1c6a06b1d6 daily update 2009-01-28 00:00:04 +00:00
Hans-Peter Nilsson f6f0598346 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
(info)->tls_size, not elf_hash_table (info)->tls_sec->size for
	the size of local TLS data.
2009-01-27 22:28:22 +00:00
Andreas Schwab 27cc28f94b * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
architectures in the archive.
2009-01-27 16:37:10 +00:00
Hans-Peter Nilsson f551b6f0ce * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
<R_CRIS_32_DTPREL>: Correct relocation value.
2009-01-27 07:06:36 +00:00
Hans-Peter Nilsson b3bf42d83b * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
<R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
	symbols with non-default visibility.
2009-01-27 06:07:54 +00:00
Alan Modra 5c0dc37763 daily update 2009-01-27 00:00:05 +00:00
Nathan Sidwell 9bc4e62bdc * ld-powerpc/powerpc.exp: Add vxworks relax testcase.
* ld-powerpc/vxworks-relax.s, ld-powerpc/vxworks-relax.rd: New.
	* ld-powerpc/vxworks1.ld: Add .pad and .far input sections.
	* ld-powerpc/vxworks1.rd: Correct regexp for undefined symbols.
2009-01-26 15:27:04 +00:00
Alan Modra 3d4771abc5 daily update 2009-01-26 00:00:05 +00:00
Dave Anglin aeaf654094 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
	and R_PARISC_PCREL12F relocations.
2009-01-25 23:05:20 +00:00
Alan Modra 293f4bb59e daily update 2009-01-25 00:00:09 +00:00
Alan Modra 1e8fa21e6d PR 6022
* elflink.c (find_version_for_sym): New function split out from,
	but without export_dynamic test, ..
	(_bfd_elf_link_assign_sym_version): ..here.
	(_bfd_elf_export_symbol): Use it.
2009-01-24 03:10:43 +00:00
Alan Modra 2e15dc9095 daily update 2009-01-24 00:00:06 +00:00
Alan Modra 28caa1861d * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
(struct elf_info_failed, struct elf_find_verdep_info): Move to..
	* elflink.c: ..here, somewhat modified.
	* elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
	_bfd_elf_link_find_version_dependencies,
	_bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
	_bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
	_bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
	declare..
	* elflink.c: ..and make static here.
	(_bfd_elf_link_find_version_dependencies): Adjust for removal
	of output_bfd from struct elf_find_verdep_info.
	(_bfd_elf_link_assign_sym_version): Similarly adjust to use
	struct elf_info_failed.
	(bfd_elf_size_dynamic_sections): Adjust.
2009-01-23 12:15:27 +00:00
Alan Modra 099d5149f4 daily update 2009-01-23 00:00:09 +00:00
Alan Modra be04437d39 PR 6832
* dwarf2.c (find_line): Don't update stash->sec_info_ptr until
	after comp_unit_find_line call.
2009-01-22 08:54:20 +00:00
Alan Modra a17a20e0da daily update 2009-01-22 00:00:05 +00:00
Nick Clifton 58f9615ce4 PR 9769
* vmsutil.c (vms_file_stats_name): Remove use of unsupported
        tm_gmtoff field in struct tm.
2009-01-21 11:58:05 +00:00
Alan Modra fb266b8bce bfd/
* elf32-spu.h (struct spu_elf_params): Add non_ia_text.
	* elf32-spu.c (mark_overlay_section): Only include .text.ia.*
	sections in soft-icache lines unless non_ia_text.  Don't add
	rodata if doing so would exceed line size.
ld/
	* emultempl/spuelf.em (params): Init new field.
	(OPTION_SPU_NON_IA_TEXT): Define.
	(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --non-ia-text.
	(PARSE_AND_LIST_ARGS_CASES): Handle OPTION_SPU_NON_IA_TEXT.
2009-01-21 02:27:13 +00:00
Alan Modra 7dee81593c daily update 2009-01-21 00:00:10 +00:00
Alan Modra 4d19a8f23a daily update 2009-01-20 00:00:04 +00:00
Hans-Peter Nilsson 451ffe6311 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
types than bfd_link_hash_indirect, before early return, call
	_bfd_elf_link_hash_copy_indirect.
2009-01-19 17:32:59 +00:00
Andrew Stubbs 5aa6ff7ca4 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
bfd/
	* elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
	* elf-bfd.h (elf_backend_data): Add obj_attrs_order.
	* elf32-arm.c (elf32_arm_obj_attrs_order): New function.
	(elf_backend_obj_attrs_order): New define.
	* elfxx-target.h (elf_backend_obj_attrs_order): New define.
	(elfNN_bed): Add elf_backend_obj_attrs_order.

	gas/testsuite/
	* gas/arm/attr-order.d: New file.
	* gas/arm/attr-order.s: New file.
2009-01-19 12:14:05 +00:00
Andrew Stubbs 3483fe2e0b 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
bfd/
	* elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
	(obj_attr_size): Likewise.
	(write_obj_attribute): Likewise.
	(_bfd_elf_copy_obj_attributes): Likewise.
	(_bfd_elf_parse_attributes): Likewise.
	* elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
	(ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
	(ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
	(ATTR_TYPE_HAS_NO_DEFAULT): New define.
	* elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
	with macros.
2009-01-19 11:55:35 +00:00
Andrew Stubbs 2d0bb7614b 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
bfd/
	* elf-attrs.c (is_default_attr): Support defaultless attributes.
	(bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
	(bfd_elf_add_obj_attr_string): Likewise.
	(bfd_elf_add_obj_attr_int_string): Likewise.
	(_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
	* elf-bfd.h (struct obj_attribute): Document new flag bit.
	* elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
	Tag_nodefaults has no default value.
	(elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
	comment to reflect the new state.

	gas/
	* read.c (s_vendor_attribute): Allow for unknown flag bits in type.
2009-01-19 11:50:31 +00:00
Alan Modra a77e83b76e PR 9695
* pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
	(some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
	(adjust_z_magix): Delete dead code handling QMAGIC.
2009-01-19 06:11:22 +00:00
Alan Modra a90b386908 daily update 2009-01-19 00:00:05 +00:00
Alan Modra 4fdbf872b5 daily update 2009-01-18 00:00:04 +00:00
Alan Modra 4a47c25017 daily update 2009-01-17 00:00:04 +00:00
Kai Tietz f6d29e26d6 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
* coffcode.h (styp_to_sec_flags): Correct interpretation of
	IMAGE_SCN_MEM_DISCARDABLE.
2009-01-16 15:09:20 +00:00
Alan Modra 29670fb929 bfd/
* Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
	SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
	* configure.in (commonbfdlib): Delete.
	(SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
	(SHARED_LIBADD): Rename from WIN32LIBADD.  Add pic libiberty if such
	is available, not just for linux.
	* po/SRC-POTFILES.in: Regenerate.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
opcodes/
	* configure.in (commonbfdlib): Delete.
	(SHARED_LIBADD): Add pic libiberty if such is available.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
binutils/
	* configure.in (commonbfdlib): Delete.
	* configure: Regenerate.
gas/
	* configure.in (commonbfdlib): Delete.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
2009-01-16 08:02:29 +00:00
Alan Modra e39a0a65cf daily update 2009-01-16 00:00:04 +00:00
Andrew Stubbs 91e22acdfa 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
Julian Brown   <julian@codesourcery.com>

	bfd/
	* elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
	ARM attributes in ABI 2.07.
	* elf32-arm.c (get_secondary_compatible_arch): New function.
	(set_secondary_compatible_arch): New function.
	(tag_cpu_arch_combine): New function.
	(elf32_arm_copy_one_eabi_other_attribute): Delete function.
	(elf32_arm_copy_eabi_other_attribute_list): Delete function.
	(elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
	make it fit with order_01243.
	Add support for Tag_also_compatible_with,
	Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
	Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
	Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
	Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
	Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
	Tag_VFP_arch and Tag_ABI_FP_16bit_format.
	Rework the way unknown attributes are handled.
	Defer errors until all attributes have been processed.

	gas/
	* config/tc-arm.c (cpu_arch): Change ARM_ARCH_V6M to 11.

	include/elf/
	* arm.h (TAG_CPU_ARCH_V6_M, TAG_CPU_ARCH_V6S_M): New defines.
	(MAX_TAG_CPU_ARCH, TAG_CPU_ARCH_V4T_PLUS_V6_M): New defines.
	(Tag_NEON_arch): Rename to Tag_Advanced_SIMD_arch to match ARM ABI
	version 2.07.
	(Tag_undefined39, Tag_nodefaults): New enum values.
	(Tag_also_compatible_with, Tag_T2EE_use): Likewise.
	(Tag_conformance, Tag_Virtualization_use): Likewise.
	(Tag_undefined69, Tag_MPextension_use): Likewise.
2009-01-15 18:00:49 +00:00
Nick Clifton cc2420d5bb oops - forgot to commit with the previous delta 2009-01-15 13:30:00 +00:00
Andrew Stubbs 7b86a9faa6 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
bfd/
	* elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
	bfd_elf_add_obj_attr_int_string.
	Read Tag_compatibility from its new location in the attribute array,
	rather than the attribute list.
	(_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
	bfd_elf_add_obj_attr_int_string.
	(_bfd_elf_parse_attributes): Likewise.
	(_bfd_elf_merge_object_attributes): There's now only one
	Tag_compatibility, and it's in the array, not the list.
	* elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
	Tag_compatibility.
	(bfd_elf_add_obj_attr_compat): Rename to
	bfd_elf_add_obj_attr_int_string.
	(bfd_elf_add_proc_attr_compat): Rename to
	bfd_elf_add_proc_attr_int_string.
	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
	Tag_compatibility.

	gas/
	* read.c (s_vendor_attribute): bfd_elf_add_obj_attr_compat ->
	bfd_elf_add_obj_attr_int_string.
2009-01-15 13:03:05 +00:00
Nick Clifton 01e1a5bc12 * include/elf/ia64.h (SHT_IA_64_VMS_DISPLAY_NAME_INFO,
EF_IA_64_ARCHVER_1): New macros. Minor reformatting.

        * bfd/Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
        (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
        (vmsutil.lo): Add dependency rule
        * bfd/Makefile.in: Regenerate
        * bfd/config.bfd (ia64*-*-*vms*): Add case.
        * bfd/configure.in (bfd_elf64_ia64_vms_vec): Add case.
        * bfd/configure: Regenerate
        * bfd/vmsutil.[ch]: New files
        * bfd/elf-bfd.h (struct bfd_elf_special_section): Change type of
        attr to bfd_vma.
        * bfd/elfxx-ia64.c (elfNN_vms_post_process_headers,
        elfNN_vms_section_processing, elfNN_vms_final_write_processing,
        elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
        elfNN_vms_object_p): New functions
        * bfd/targets.c (bfd_elf64_ia64_vms_vec): New target.

        * gas/configure.tgt(ia64-*-*vms*): New target.
        * gas/dwarf2dbg.h (dwarf2_loc_mark_labels): Make extern.
        * gas/tc.h (md_number_to_chars): Declare iff undefined.
        * gas/config/obj-elf.c (obj_elf_change_section): Change type of
        arg attr to bfd_vma.
        (obj_elf_parse_section_letters): Return a bfd_vma. Change type of
        variables attr, md_attr to bfd_vma.
        (obj_elf_section_word): Likewise.
        (obj_elf_section): Change type of variable attr to bfd_vma
        * gas/config/obj-elf.h (obj_elf_change_section): Change type of
        arg attr to bfd_vma
        * gas/config/tc-ia64.c (bfdver.h,time.h): Include.
        (ia64_elf_section_letter): Now returns a bfd_vma.
        Handle VMS specific attributes.
        (ia64_elf_section_flags): Arg attr now a bfd_vma.
        (ia64_init): Don't turn on dependency checking for VMS.
        (ia64_target_format): Check for VMS flag bit.
        (do_alias): Hande decc$ functions.
        (get_vms_time): New function.
        (ia64_vms_note): New function.
        * gas/config/tc-ia64.h (ia64_elf_section_letter): Now returns a bfd_vma.
        (ia64_elf_section_flags): Arg attr now a bfd_vma.
        (tc_init_after_args): Define for VMS.
        * gas/config/tc-alpha.c (alpha_elf_section_letter): Return a bfd_vma.
        (alpha_elf_section_flags): Change type of arg attr to bfd_vma.
        * gas/config/tc-alpha.h: Likewise.
        * gas/config/tc-i386.c (x86_64_section_letter): Return a bfd_vma.
        (x86_64_section_word): Return a bfd_vma.
        * gas/config/tc-i386.h: Likewise.
        * gas/config/tc-ip2k.c (ip2k_elf_section_flags): Change type of arg
        attr to bfd_vma.
        * gas/config/tc-ip2k.h: Likewise.
        * gas/config/tc-mep.c (mep_elf_section_letter): Return a bfd_vma.
        (mep_elf_section_flags): Change type of arg attr to bfd_vma.
        * gas/config/tc-mep.h: Likewise.
        * gas/config/tc-ppc.c  (ppc_section_letter): Return a bfd_vma.
        (ppc_section_word): Return a bfd_vma.
        (ppc_section_flags): Change type of arg attr to bfd_vma.
        * gas/config/tc-ppc.h: Likewise.
        * gas/config/te-vms.h (DWARF2_DIR_SHOULD_END_WITH_SEPARATOR,
        DWAR2_FILE_TIME_NAME, DWARF2_FILE_SIZE_NAME, DWARF2_FILEN_NAME):
        New file with new macros
        * gas/dwarf2dbg.c (get_filenum, out_file_list): Default and call new
        macros.
2009-01-15 12:42:52 +00:00
Alan Modra d7e35f3e6e daily update 2009-01-15 00:00:05 +00:00
H.J. Lu a33dafc30d bfd/
2009-01-14  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/9727
	* elflink.c (elf_gc_sweep): Exclude the group section if the
	first member of the section group is excluded.

ld/testsuite/

2009-01-14  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/9727
	* ld-elf/group8.s: New.
	* ld-elf/group8a.d: Likewise.
	* ld-elf/group8b.d: Likewise.
	* ld-elf/group9.s: Likewise.
	* ld-elf/group9a.d: Likewise.
	* ld-elf/group9b.d: Likewise.
2009-01-14 21:52:49 +00:00
Alan Modra 43d9f96e40 daily update 2009-01-14 00:00:05 +00:00
Alan Modra 13c0e96780 PR 9735
* syms.c (_bfd_stab_section_find_nearest_line): Don't free
	saved filename, use bfd_alloc rather than bfd_malloc for it.
2009-01-13 23:44:45 +00:00
Alan Modra 51261839b6 daily update 2009-01-13 00:00:05 +00:00
Alan Modra 460e679b12 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute. 2009-01-12 14:13:03 +00:00
Alan Modra 25076afa95 * elf32-spu.c (remove_cycles): Always set call->max_depth. 2009-01-12 13:56:03 +00:00
Alan Modra 37107878d3 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask. 2009-01-12 04:09:43 +00:00
Alan Modra cd4a7468c9 bfd/
* elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
	num_lines_log2.
	(struct got_entry): Add br_addr.
	(struct call_info): Add priority.
	(struct function_info): Add lr_store and sp_adjust.
	(spu_elf_setup): Init line_size_log2 and num_lines_log2.
	(spu_elf_find_overlays): For soft-icache, mark any section within cache
	area as an overlay, and check that no other overlays exist.  Look up
	icache overlay manager entry sym.
	(BRA_STUBS, BRA, BRASL): Define.
	(enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
	(needs_ovl_stub): Adjust for soft-icache.  Return priority encoded
	in branch insn.
	(count_stub, build_stub): Support soft-icache.
	(build_spuear_stubs, process_stubs): Adjust build_stub call.
	(spu_elf_size_stubs): Size soft-icache stubs.
	(overlay_index): New function.
	(spu_elf_build_stubs): Make static.  Support soft-icache.
	(spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
	(find_function_stack_adjust): Save lr store and stack adjust insn
	offsets.
	(maybe_insert_function): Adjust find_function_stack_adjust call.
	(mark_functions_via_relocs): Retrieve priority.
	(remove_cycles): Only warn about pruned arcs when stack_analysis.
	(sort_calls): Sort by priority first.
	(mark_overlay_section): Ignore .ovl.init.
	(sum_stack): Only print when stack_analysis.
	(print_one_overlay_section): New function, extracted from..
	(spu_elf_auto_overlay): ..here.  Support soft-icache overlays.
	(spu_elf_stack_analysis): Only print when htab->stack_analysis.
	(spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
	analysis.  Call spu_elf_build_stubs.
	(spu_elf_relocate_section): For soft-icache encode overlay index
	into addresses.
	(spu_elf_output_symbol_hook): Support soft-icache.
	(spu_elf_modify_program_headers: Likewise.
	* elf32-spu.h (struct spu_elf_params): Add lrlive_analysis.  Rename
	num_regions to num_lines.  Add line_size and max_branch.
	(enum _ovly_flavour): Add ovly_soft_icache.
	(spu_elf_build_stubs): Delete.
gas/
	* config/tc-spu.c (md_pseudo_table): Add "brinfo".
	(brinfo): New var.
	(md_assemble): Poke brinfo into branch instructions.
	(spu_brinfo): New function.
	(md_apply_fix): Don't assume insn fields start off at zero, mask
	them to remove possible brinfo.
ld/
	* emultempl/spuelf.em (params): Init new fields.
	(num_lines_set, line_size_set, icache_mgr, icache_mgr_stream): New vars.
	(spu_place_special_section): Adjust placement for soft-icache.  Pad
	soft-icache section to a fixed size.  Clear addr_tree.
	(spu_elf_load_ovl_mgr): Support soft-icache.  Map overlay manager
	sections a little more intelligently.
	(gld${EMULATION_NAME}_finish): Don't call spu_elf_build_stubs.
	(OPTION_SPU_NUM_LINES): Rename from OPTION_SPU_NUM_REGIONS.
	(OPTION_SPU_SOFT_ICACHE, OPTION_SPU_LINE_SIZE): Define.
	(OPTION_SPU_LRLIVE): Define.
	(PARSE_AND_LIST_LONGOPTS): Add new soft-icache options.
	(PARSE_AND_LIST_OPTIONS): Likewise.
	(PARSE_AND_LIST_ARGS_CASES): Handle them.
	* emultempl/spu_icache.S: Dummy file.
	* emultempl/spu_icache.o_c: Regenerate.
	* Makefile.am (eelf32_spu.c): Depend on spu_icache.o_c.
	(spu_icache.o_c): Add rule to build.
	(CLEANFILES): Zap temp files.
	(EXTRA_DIST): Add spu_icache.o_c.
	* Makefile.in: Regenerate.
ld/testsuite/
	* ld-spu/ovl.d: Allow for absolute branches in stubs.
	* ld-spu/ovl2.d: Likewise.
2009-01-12 00:23:58 +00:00
Alan Modra 56d559bbfe daily update 2009-01-12 00:00:04 +00:00
Jan Kratochvil 80c29487db bfd/
* elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
	relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.

ld/testsuite/
	* ld-elf/linkoncerdiff.d, ld-elf/linkoncerdiff1.s,
	ld-elf/linkoncerdiff2.s: New.
2009-01-11 21:09:49 +00:00
Alan Modra 71260a99a5 daily update 2009-01-11 00:00:05 +00:00
Alan Modra 38788b66ed daily update 2009-01-10 00:00:05 +00:00
Alan Modra da59617235 daily update 2009-01-09 00:00:05 +00:00
Alan Modra 54c4086f1b daily update 2009-01-08 00:00:04 +00:00
Hans-Peter Nilsson 1bc86aea28 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
<case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
	the program, the known offset starts at the negative size of the
	TLS section.
	<case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
	Similar.
2009-01-07 03:28:45 +00:00
Alan Modra 38362ef182 daily update 2009-01-07 00:00:05 +00:00
H.J. Lu 75606e85bf Reformat. 2009-01-06 17:58:19 +00:00
Joel Sherrill 3baa454d4a 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* config.bfd: Add lm32-*-rtems*.
2009-01-06 14:40:32 +00:00