Commit Graph

4819 Commits

Author SHA1 Message Date
Alan Modra dbde1c1272 PR binutils/10802
* opncls.c (_maybe_make_executable): Make DYNAMIC files executable.
2009-10-20 00:49:31 +00:00
Hans-Peter Nilsson ebf275e360 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
Don't subtract the size of the TLS block for non-shared objects
	from the relocation.
2009-10-19 16:33:49 +00:00
Arnold Metselaar 6c293e26a3 * coff-z80.c (z80coff_vec): Allow sections to be of type SEC_CODE or SEC_DATA
* ld-scripts/align.exp: Remove xfails for z80-*-coff
2009-10-17 17:18:28 +00:00
Alan Modra 493152cb4f PR binutils/10785
* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Don't bfd_alloc
	bim and bim->buffer.  bfd_malloc instead.
	* peicode.h (pe_ILF_build_a_bfd): Similarly.
	(ILF_DATA_SIZE): Don't include bim.
	* opncls.c (bfd_close): Test bim->buffer non-NULL before freeing.
2009-10-16 07:14:43 +00:00
Alan Modra f88dc410a7 include/
* bfdlink.h (enum bfd_link_common_skip_ar_symbols): Rename from
	bfd_link_common_skip_ar_aymbols.
	(struct bfd_link_info): Here too.
bfd/
	* aoutx.h (aout_link_check_ar_symbols): Typo fix.
ld/
	* emultempl/netbsd.em (gldnetbsd_before_parse): Typo fix.
2009-10-14 05:54:29 +00:00
H.J. Lu cd2b2c108e 2009-10-13 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10763
	* elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt
	earlier.
2009-10-13 16:37:39 +00:00
Alan Modra fc3e1e3c7e * elflink.c (_bfd_elf_merge_symbol): Revert previous patch. 2009-10-13 04:06:20 +00:00
Roland McGrath f8076f98aa Fix %s that should be %B in several message formats. 2009-10-13 02:35:08 +00:00
Alan Modra f080369056 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols for
excluded output sections.
2009-10-10 04:58:48 +00:00
Tristan Gingold 0c9b2b4cc6 bfd/
2009-10-09  Tristan Gingold  <gingold@adacore.com>

	* mach-o.c (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_RPATH.
	(bfd_mach_o_bfd_print_private_bfd_data): Ditto.
2009-10-09 15:33:39 +00:00
Tristan Gingold ab273af8f1 2009-10-09 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Rename to
	bfd_mach_o_read_symtab_symbols.
	(bfd_mach_o_scan_write_thread): Rename to bfd_mach_o_write_thread.
	(bfd_mach_o_scan_write_relocs): Rename to bfd_mach_o_write_relocs.
	(bfd_mach_o_scan_write_section_32): Rename to
	bfd_mach_o_write_section_32.
	(bfd_mach_o_scan_write_section_64): Rename to
	bfd_mach_o_write_section_64.
	(bfd_mach_o_scan_write_segment_32): Rename to
	bfd_mach_o_write_segment_32.
	(bfd_mach_o_scan_write_segment_64): Rename to
	bfd_mach_o_write_segment_64.
	(bfd_mach_o_scan_write_symtab): Rename to bfd_mach_o_write_symtab.
	(bfd_mach_o_scan_read_section_32): Rename to
	bfd_mach_o_read_section_32.
	(bfd_mach_o_scan_read_section_64): Rename to
	bfd_mach_o_read_section_64.
	(bfd_mach_o_scan_read_section): Rename to bfd_mach_o_read_section.
	(bfd_mach_o_scan_read_symtab_strtab): Rename to
	bfd_mach_o_read_symtab_strtab.
	(bfd_mach_o_scan_read_symtab_symbol): Rename to
	bfd_mach_o_read_symtab_symbol.
	(bfd_mach_o_scan_read_dysymtab_symbol): Rename to
	bfd_mach_o_read_dysymtab_symbol.
	(bfd_mach_o_scan_read_dylinker): Rename to bfd_mach_o_read_dylinker.
	(bfd_mach_o_scan_read_dylib): Rename to bfd_mach_o_read_dylib.
	(bfd_mach_o_scan_read_prebound_dylib): Rename to
	bfd_mach_o_read_prebound_dylib.
	(bfd_mach_o_scan_read_thread): Rename to bfd_mach_o_read_thread.
	(bfd_mach_o_scan_read_dysymtab): Rename to bfd_mach_o_read_dysymtab.
	(bfd_mach_o_scan_read_symtab): Rename to bfd_mach_o_read_symtab.
	(bfd_mach_o_scan_read_uuid): Rename to bfd_mach_o_read_uuid.
	(bfd_mach_o_scan_read_linkedit): Rename to bfd_mach_o_read_linkedit.
	(bfd_mach_o_scan_read_str): Rename to bfd_mach_o_read_str.
	(bfd_mach_o_scan_read_dyld_info): Rename to bfd_mach_o_read_dyld_info.
	(bfd_mach_o_scan_read_segment): Rename to bfd_mach_o_read_segment.
	(bfd_mach_o_scan_read_segment_32): Rename to
	bfd_mach_o_read_segment_32.
	(bfd_mach_o_scan_read_segment_64): Rename to
	bfd_mach_o_read_segment_64.
	(bfd_mach_o_scan_read_command): Rename to bfd_mach_o_read_command.
	* mach-o.h (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
	bfd_mach_o_read_dysymtab_symbol.
2009-10-09 15:14:56 +00:00
Tristan Gingold b2b620601b 2009-10-09 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_section_get_entry_size): Moved.
	(bfd_mach_o_section_get_nbr_indirect): Ditto.
	(bfd_mach_o_get_synthetic_symtab): New function.
	(bfd_mach_o_print_private_header): Print the number of commands
	in decimal.
	* mach-o.h (bfd_mach_o_get_synthetic_symtab): Add prototype.
	* mach-o-target.c: Do not defined bfd_mach_o_get_synthetic_symtab.
2009-10-09 08:18:17 +00:00
Tristan Gingold 615b63d4e0 2009-10-08 Tristan Gingold <gingold@adacore.com>
* config.bfd: Add bfd_mach_o_i386_vec in x86_64-darwin targ_selvecs.
2009-10-08 12:46:17 +00:00
H.J. Lu 8654b68afa 2009-10-06 H.J. Lu <hongjiu.lu@intel.com>
* bfd-in2.h: Regenerated.
2009-10-06 19:41:13 +00:00
Alan Modra 4a056f1472 include/aout/
* aout64.h (N_SHARED_LIB): Define as zero if not already defined.
	* sun4.h (N_SHARED_LIB): Define.
	* hp300hpux.h (N_SHARED_LIB): Don't define.
bfd/
	* aout-cris.c (N_SHARED_LIB): Don't define.
	* hp300bsd.c (N_SHARED_LIB): Don't define.
	* i386bsd.c (N_SHARED_LIB): Don't define.
	* i386linux.c (N_SHARED_LIB): Don't define.
	* i386lynx.c (N_SHARED_LIB): Don't define.
	* m68klinux.c (N_SHARED_LIB): Don't define.
	* m88kmach3.c (N_SHARED_LIB): Don't define.
	* mipsbsd.c (N_SHARED_LIB): Don't define.
	* newsos3.c (N_SHARED_LIB): Don't define.
	* pc532-mach.c (N_SHARED_LIB): Don't define.
	* pdp11.c (N_SHARED_LIB): Don't define.
	* sparclinux.c (N_SHARED_LIB): Don't define.
	* vaxbsd.c (N_SHARED_LIB): Don't define.
2009-10-02 14:40:41 +00:00
Dave Korn eb503a00af * cofflink.c (_bfd_coff_generic_relocate_section): Look for the aux
symbol for a weak undef in the auxbfd, not the input bfd.
2009-10-01 19:48:12 +00:00
Ulrich Weigand 64028ad7de bfd/
* elf32-spu.c (spu_elf_auto_overlay): Insert icache linker script
	after .toe instead of before .text section.  Set the LMA of all
	overlay sections to their icache IA address.
	(spu_elf_find_overlays): Determine icache set id without reference
	to the LMA.

ld/testsuite/
	* ld-spu/icache1.d: Update to new section layout.
2009-10-01 13:09:56 +00:00
Tristan Gingold 27a5525e75 2009-09-30 Tristan Gingold <gingold@adacore.com>
* configure.com: Use hosts/alphavms.h on both alpha and ia64 VMS.
2009-09-30 13:12:50 +00:00
H.J. Lu 464d3bd458 2009-09-29 H.J. Lu <hongjiu.lu@intel.com>
* elf64-x86-64.c (elf64_x86_64_append_rela): New.
	(elf64_x86_64_relocate_section): Use it.
	(elf64_x86_64_finish_dynamic_symbol): Likewise.
2009-09-29 14:37:57 +00:00
Nick Clifton c7927a3c0e bfd
* Makefile.am (ALL_MACHINES): Add cpu-rx.lo.
        (ALL_MACHINES_CFILES): Add cpu-rx.c.
        (BFD32_BACKENDS): Add elf32-rx.lo.
        (BFD32_BACKENDS_CFILES): Add elf32-rx.c.
        * archures.c (bfd_architecture): Add bfd_arch_rx and bfd_mach_rx.
        Export bfd_rx_arch.
        (bfd_archures_list): Add bfd_rx_arch.
        * config.bfd: Add entry for rx-*-elf.
        * configure.in: Add entries for bfd_elf32_rx_le_vec and
        bfd_elf32_rx_be_vec.
        * reloc.c: Add RX relocations.
        * targets.c: Add RX target vectors.
        * Makefile.in: Regenerate.
        * bfd-in2.h: Regenerate.
        * configure: Regenerate.
        * libbfd.h: Regenerate.
        * cpu-rx.c: New file.
        * elf32-rx.c: New file.

binutils
        * readelf.c: Add support for RX target.
        * MAINTAINERS: Add DJ and NickC as maintainers for RX.

gas
        * Makefile.am: Add RX target.
        * configure.in: Likewise.
        * configure.tgt: Likewise.
        * read.c (do_repeat_with_expander): New function.
        * read.h: Provide a prototype for do_repeat_with_expander.
        * doc/Makefile.am: Add RX target documentation.
        * doc/all.texi: Likewise.
        * doc/as.texinfo: Likewise.
        * Makefile.in: Regenerate.
        * NEWS: Mention support for RX architecture.
        * configure: Regenerate.
        * doc/Makefile.in: Regenerate.
        * config/rx-defs.h: New file.
        * config/rx-parse.y: New file.
        * config/tc-rx.h: New file.
        * config/tc-rx.c: New file.
        * doc/c-rx.texi: New file.

gas/testsuite
        * gas/rx: New directory.
        * gas/rx/*: New set of test cases.
        * gas/elf/section2.e-rx: New expected output file.
        * gas/all/gas.exp: Add support for RX target.
        * gas/elf/elf.exp: Likewise.
        * gas/lns/lns.exp: Likewise.
        * gas/macros/macros.exp: Likewise.

include
        * dis-asm.h: Add prototype for print_insn_rx.

include/elf
        * rx.h: New file.

include/opcode
        * rx.h: New file.

ld
        * Makefile.am: Add rules to build RX emulation.
        * configure.tgt: Likewise.
        * NEWS: Mention support for RX architecture.
        * Makefile.in: Regenerate.
        * emulparams/elf32rx.sh: New file.
        * emultempl/rxelf.em: New file.

opcodes
        * Makefile.am: Add RX files.
        * configure.in: Add support for RX target.
        * disassemble.c: Likewise.
        * Makefile.in: Regenerate.
        * configure: Regenerate.
        * opc2c.c: New file.
        * rx-decode.c: New file.
        * rx-decode.opc: New file.
        * rx-dis.c: New file.
2009-09-29 14:17:19 +00:00
M R Swami Reddy 0505e9020e 2009-09-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
* elf32-cr16.c (elf32_cr16_relocate_section): Removed info->relocatable
       to fix the ld/testsuites/ld-elf/linkonce1 test case.
2009-09-29 11:55:09 +00:00
Nick Clifton caa83f8b08 PR 10478
* elf.c (bfd_section_from_shdr): Allow SHN_BEFORE and SHN_AFTER
        section link values in x86 binaries.
        * elfcode.h (elf_object_p): Likewise.
        * readelf.c (get_elf_section_flags): Allow SHN_BEFORE and
        SHN_AFTER section link values in x86 binaries.
        (process_section_headers): Likewise.
2009-09-28 09:45:33 +00:00
Nick Clifton fc9f1df98e * elf32-m68k.c (elf_m68k_final_write_processing): New function.
(elf_backend_final_write_processing): Macro defined as above function.
2009-09-28 09:34:20 +00:00
Nick Clifton 21d799b5c4 Update soruces to make alpha, arc and arm targets compile cleanly
with -Wc++-compat:
        * config/tc-alpha.c: Add casts.
        (extended_bfd_reloc_code_real_type): New type. Used to avoid
        enumeration conversion warnings.
        (struct alpha_fixup, void assemble_insn, assemble_insn)
        (assemble_tokens): Use new type.
        * ecoff.c: Add casts. (mark_stabs): Use enumeration names.
        * config/obj-elf.c: Add cast
        * config/tc-arc.c: Add casts.
        * config/obj-aout.h (text_section,data_section,bss_section):
        Make extern.
        * config/obj-elf.c: Add cast.
        * config/tc-arm.c: Add casts.
        (X, TxCE, TxCE, TxC3, TxC3w, TxCM_, TxCM, TUE, TUF, CE, CL, cCE)
        (cCL, C3E, xCM_, nUF, nCE_tag): Change input format to avoid the
        need for keywords as arguments.
        * ecoff.c: Add casts.
        * ecofflink.c: Add casts.
        * elf64-alpha.c: Add casts.
        (struct alpha_elf_got_entry, struct alpha_elf_reloc_entry): Move
        to top level.
        (SKIP_HOWTO): Use enum name.
        * elf32-arm.c: Add casts.
        (elf32_arm_vxworks_bed): Update code to avoid multiple
        declarations.
        (struct map_stub): Move to top level.
        * arc-dis.c Fix casts.
        * arc-ext.c: Add casts.
        * arm-dis.c (enum opcode_sentinel_enum): Gave name to anonymous
        enum.
        * emultempl/armelf.em: Add casts.
2009-09-25 19:13:27 +00:00
H.J. Lu 935bd1e079 bfd/
2009-09-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/10630
	* elflink.c (elf_link_output_extsym): Turn off visibility on
	local symbol.
	(bfd_elf_final_link): Turn off visibility on dynamic local
	symbol.

ld/testsuite/

2009-09-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/10630
	* ld-alpha/tlsbin.rd: Remove HIDDEN/.hidden on local symbols.
	* ld-alpha/tlsbinr.rd: Likewise.
	* ld-alpha/tlspic.rd: Likewise.
	* ld-cris/libdso-2.d: Likewise.
	* ld-cris/locref1.d: Likewise.
	* ld-cris/locref2.d: Likewise.
	* ld-cris/tls-e-20a.d: Likewise.
	* ld-cris/tls-e-20.d: Likewise.
	* ld-cris/tls-e-80.d: Likewise.
	* ld-cris/tls-gc-68.d: Likewise.
	* ld-cris/tls-gc-69.d: Likewise.
	* ld-cris/tls-gc-70.d: Likewise.
	* ld-cris/tls-gc-75.d: Likewise.
	* ld-cris/tls-gc-76.d: Likewise.
	* ld-cris/tls-gc-79.d: Likewise.
	* ld-cris/tls-gd-1h.d: Likewise.
	* ld-cris/tls-gd-2h.d: Likewise.
	* ld-cris/tls-ld-4.d: Likewise.
	* ld-cris/tls-ld-5.d: Likewise.
	* ld-cris/tls-ld-6.d: Likewise.
	* ld-cris/tls-ld-7.d: Likewise.
	* ld-cris/tls-ldgd-14.d: Likewise.
	* ld-cris/tls-ldgd-15.d: Likewise.
	* ld-cris/tls-local-63.d: Likewise.
	* ld-cris/tls-local-64.d: Likewise.
	* ld-elf/pr9676.rd: Likewise.
	* ld-elf/pr9679.rd: Likewise.
	* ld-elfvsb/hidden2.d: Likewise.
	* ld-i386/tlsbindesc.rd: Likewise.
	* ld-i386/tlsbin.rd: Likewise.
	* ld-i386/tlsdesc.rd: Likewise.
	* ld-i386/tlsgdesc.rd: Likewise.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlspic.rd: Likewise.
	* ld-ia64/tlsbin.rd: Likewise.
	* ld-ia64/tlspic.rd: Likewise.
	* ld-powerpc/tlsexe32.r: Likewise.
	* ld-powerpc/tlsexe.r: Likewise.
	* ld-powerpc/tlsexetoc.r: Likewise.
	* ld-powerpc/tlsso32.r: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlstocso.r: Likewise.
	* ld-s390/tlsbin_64.rd: Likewise.
	* ld-s390/tlsbin.rd: Likewise.
	* ld-s390/tlspic_64.rd: Likewise.
	* ld-s390/tlspic.rd: Likewise.
	* ld-sparc/gotop32.rd: Likewise.
	* ld-sparc/gotop64.rd: Likewise.
	* ld-sparc/tlssunbin32.rd: Likewise.
	* ld-sparc/tlssunbin64.rd: Likewise.
	* ld-sparc/tlssunnopic32.rd: Likewise.
	* ld-sparc/tlssunnopic64.rd: Likewise.
	* ld-sparc/tlssunpic32.rd: Likewise.
	* ld-sparc/tlssunpic64.rd: Likewise.
	* ld-x86-64/tlsbindesc.rd: Likewise.
	* ld-x86-64/tlsbin.rd: Likewise.
	* ld-x86-64/tlsdesc.rd: Likewise.
	* ld-x86-64/tlsgdesc.rd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
	* ld-xtensa/tlsbin.rd: Likewise.
	* ld-xtensa/tlspic.rd: Likewise.

	* ld-elf/local1.d: New.
	* ld-elf/local1.map: Likewise.
	* ld-elf/local1.s: Likewise.
	* ld-ia64/local1.d: Likewise.
	* ld-ia64/local1.map: Likewise.
	* ld-ia64/local1.s: Likewise.
2009-09-24 15:56:52 +00:00
Alan Modra 107601c847 PR binutils/10654
* dwarf2.c (lookup_address_in_line_info_table): Remove workaround
	for invalid location lists generated by gcc-2.95 and Intel 6.0 C++.
	Remove "function" parm, adjust caller.
2009-09-24 00:11:51 +00:00
Alan Modra 7ee314faa4 bfd/
* bfd-in.h (bfd_elf_size_dynamic_sections): Add audit and depaudit
	arguments.
	* elflink.c (bfd_elf_size_dynamic_sections): Generate DT_AUDIT,
	DT_DEPAUDIT from audit/depaudit arguments.
	(elf_finalize_dynstr): Finalize DT_AUDIT and DT_DEPAUDIT strtab entries.
	(elf_link_add_object_symbols): Set dt_audit target data when finding a
	DT_AUDIT.
	* bfd-in2.h: Regenerate.
	* bfd-elf.h: Add dt_audit to elf_obj_tdata, and elf_dt_audit macro.
ld/
	* emultempl/elf32.em (gld${EMULATION_NAME}_add_options): Add --audit,
	--depaudit, and -P options.
	(gld${EULATION_NAME}_handle_options): Ditto.
	(gld${EULATION_NAME}_list_options): Ditto.
	(gld${EMULATION_NAME}_append_to_separated_string): New function for
	handling rpath-like colon separated strings.
	(gld${EMULATION_NAME}_before_allocation): Pass the audit and depaudit
	libs to bfd.  Propagate DT_AUDIT from needed libs to depaudit.
	* ld.texinfo: Document new options.
ld/testsuite/
	* ld-elf/audit.exp: New.
	* ld-elf/audit.rd: New.
	* ld-elf/depaudit.rd: New.
	* ld-elf/depaudit2.rd: New.
2009-09-23 13:54:29 +00:00
Jie Zhang d3e32c2e1a * elf32-bfin.c (_bfinfdpic_size_got_plt): Make sure empty
.rel.plt and .plt sections are removed.
	(elf32_bfinfdpic_size_dynamic_sections): Remove empty .dynbss
	section.  Remove the duplicated removing of empty .rel.plt
	section.
2009-09-23 08:03:02 +00:00
Richard Sandiford a10917efdd bfd/
* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Extend previous
	patch to handle the new personality relaxation.

ld/testsuite/
	* ld-mips-elf/eh-frame5.d: Expect PC-relative encodings
	to include DW_EH_PE_sdata4.
2009-09-21 19:07:44 +00:00
Richard Sandiford 30af59626b bfd/
* elf-eh-frame.c (make_pc_relative): New function.
	(_bfd_elf_write_section_eh_frame): Use it.

ld/testsuite/
	* ld-mips-elf/eh-frame1-n32.d: Expect PC-relative encodings
	to include DW_EH_PE_sdata4.
	* ld-mips-elf/eh-frame2-n32.d: Likewise.
	* ld-mips-elf/eh-frame1-n64.d: Expect PC-relative encodings
	to include DW_EH_PE_sdata8.
	* ld-mips-elf/eh-frame2-n64.d: Likewise.
2009-09-21 18:55:08 +00:00
Alan Modra a7f2871e66 include/elf/
* ppc.h (DT_PPC_TLSOPT): Define.
	* ppc64.h (DT_PPC64_TLSOPT): Define.
bfd/
	* elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define.
	(ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define.
	(MR_0_3, MR_3_0): Define.
	(struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt.
	(ppc_elf_select_plt_layout): Save emit_stub_syms param earlier.
	(ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
	table.  Check for presense of __tls_get_addr_opt
	(allocate_dynrelocs): Increase glink entry size for __tls_get_addr.
	(ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag.
	(write_glink_stub): Add param p.
	(ppc_elf_relocate_section): Adjust write_glink_stub call.
	(ppc_elf_finish_dynamic_symbol): Emit special glink call stub for
	__tls_get_addr.
	* elf32-ppc.h (ppc_elf_tls_setup): Update prototype.
	* elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt.
	(ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
	table.  Check for presense of __tls_get_addr_opt.
	(ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag.
	(LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13,
	BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1,
	LD_R2_0R1, MTLR_R11): Define.
	(build_tls_get_addr_stub): New function.
	(ppc_build_one_stub): Call it.
	(ppc_size_one_stub): Add extra size for __tls_get_addr stub.
	(ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for
	__tls_get_addr plt call.
	* elf64-ppc.h (ppc64_elf_tls_setup): Update prototype.
binutils/
	* readelf.c (get_ppc_dynamic_type): Add TLSOPT.
	(get_ppc64_dynamic_type): Likewise.
ld/
	* emultempl/ppc32elf.em (no_tls_get_addr_opt): New var.
	(ppc_before_allocation): Pass to ppc_elf_tls_setup.
	(OPTION_NO_TLS_GET_ADDR_OPT): Define.  Redefine other options in
	terms of previous option.
	(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add
	--no-tls-get-addr-optimize.
	(PARSE_AND_LIST_ARGS_CASES): Handle it.
	* emultempl/ppc64elf.em (no_tls_get_addr_opt): New var.
	(ppc_before_allocation): Pass to ppc64_elf_tls_setup.
	(OPTION_NO_TLS_GET_ADDR_OPT): Define.
	(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add
	--no-tls-get-addr-optimize.
	(PARSE_AND_LIST_ARGS_CASES): Handle it.
ld/testsuite/
	* ld-powerpc/tlslib.s: Delete dot-symbol entry syms.  Add
	__tls_get_addr_opt.
	* ld-powerpc/tlslib32.s: Add __tls_get_addr_opt.
	* ld-powerpc/oldtlslib.s: New file, old-abi version of tlslib.s.
	* ld-powerpc/powerpc.exp: Build old-abi library and use it in
	two new link tests.
	* ld-powerpc/tlsexe.d: Update for new __tls_get_addr stub.
	* ld-powerpc/tlsexe.g, * ld-powerpc/tlsexe.r, *ld-powerpc/tlsexe32.d,
	* ld-powerpc/tlsexe32.g, * ld-powerpc/tlsexe32.r,
	* ld-powerpc/tlsexetoc.d, * ld-powerpc/tlsexetoc.g,
	* ld-powerpc/tlsexetoc.r: Likewise.
2009-09-21 11:51:02 +00:00
Richard Sandiford 18e04883d0 bfd/
* elf-bfd.h (eh_cie_fde): Add personality_offset and
	make_per_encoding_relative to the CIE structure.  Add a padding field.
	* elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Use 0x70
	rather than 0xf0 when masking out the base address encoding
	Record the offset of personality data from the start of the CIE.
	Remove a repeated elf_backend_can_make_relative_eh_frame check.
	(find_merged_cie): Take an info argument.  If the personality
	binds locally, try converting an absolute personality into
	a local one.
	(_bfd_elf_discard_section_eh_frame): Use 0x70 rather than 0xf0
	when masking out the base address encoding.  Update the call to
	find_merged_cie.
	(_bfd_elf_eh_frame_section_offset): Discard relocations against
	the personality data if we are converting into PC-relative form.
	(_bfd_elf_write_section_eh_frame): Use 0x70 rather than 0xf0
	when masking out the base address encoding.  Handle
	make_per_encoding_relative.

ld/testsuite/
	* ld-mips-elf/eh-frame5.s, ld-mips-elf/eh-frame5.ld,
	ld-mips-elf/eh-frame5.d: New test.
	* ld-mips-elf/mips-elf.exp: Run it.
2009-09-19 08:06:11 +00:00
Alan Modra bd6c6e2b80 PR ld/10406
* elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
	R_PPC_EMB_SDA2I16 complain_overflow_signed.
	(create_sdata_sym): Pass info rather than htab.
	Update all callers.  Ensure symbols are hidden.
	(ppc_elf_check_relocs): Allow SDAREL16 when shared.
	(ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
	_GLOBAL_OFFSET_TABLE_.
	(elf_finish_pointer_linker_section): Don't assume that sdata base
	symbol is always at 0x8000 offset.  Don't subtract the addend here.
	(is_static_defined): New function.
	(ppc_elf_relocate_section): Verify symbol base used in SDA relocs
	is statically defined.  Clear addend for EMB_SDAI16 and EMB_SDA2I16
	relocs.  Downgrade error on unexpected section for EMB_SDA2REL
	reloc symbols to a warning.
2009-09-18 12:41:52 +00:00
Nick Clifton 2f0205e893 Updated Vietnamese translations 2009-09-18 08:05:14 +00:00
Nick Clifton ca58b19f00 Updated Spanish and Vietnamese translations 2009-09-18 07:54:47 +00:00
Alan Modra b31867b61a bfd/
* elf64-ppc.c (follow_link, elf_follow_link, ppc_follow_link): New
	functions.  Use throughout.
	(ppc64_elf_copy_indirect_symbol): Set direct symbol "oh" field
	from indirect symbol.
	(lookup_fdh): Rename from get_fdh.  Follow indirect sym links.
	(add_symbol_adjust): Simplify.
	(defined_code_entry, defined_func_desc): New functions.
	(ppc64_elf_gc_keep): Follow indirect sym links.  Use defined_code_entry.
	(ppc64_elf_gc_mark_dynamic_ref): Use defined_func_desc and
	defined_code_entry to follow indirect sym links.
	(ppc64_elf_gc_mark_hook, func_desc_adjust): Likewise.
	(ppc_type_of_stub): Follow indirect sym links.
	(toc_adjusting_stub_needed): Likewise.
	(ppc_build_one_stub): Likewise.  Make undefined dot-symbols weak
	rather than defining them at stub.
	(ppc64_elf_relocate_section): Rewrite call test to avoid multiple
	assignments in test.
ld/testsuite/
	* ld-powerpc/tlsso.d: Update.
	* ld-powerpc/tlsso.r: Update.
	* ld-powerpc/tlstocso.d: Update.
	* ld-powerpc/tlstocso.r: Update.
2009-09-18 03:30:34 +00:00
Tristan Gingold afecc97cf6 2009-09-16 Tristan Gingold <gingold@adacore.com>
* mach-o.h (bfd_mach_o_filetype): Add new constants from darwin10.
	Reindent.
	* mach-o.c (bfd_mach_o_cpu_name): Reindent.
	(bfd_mach_o_filetype_name): Complete with new constants.  Reindent.
	(bfd_mach_o_print_private_header): Use fputs instead of fprintf
	when possible to avoid warnings.
	(bfd_mach_o_print_section_map): Ditto.
	(bfd_mach_o_section_get_entry_size): New function.
	(bfd_mach_o_section_get_nbr_indirect): Simplify using the newly
	added function.
	(bfd_mach_o_print_dysymtab): Print address of indirect symbols.
2009-09-16 13:30:32 +00:00
Nick Clifton df58f7b0bf Updated German, Dutch and Finnish translations. 2009-09-14 12:24:29 +00:00
Nick Clifton 1e9cc1c27b * po/bfd.pot: Updated by the Translation project.
* po/binutils.pot: Updated by the Translation project.
        * po/gold.pot: Updated by the Translation project.
        * po/gold.pot: Updated by the Translation project.
        * po/gprof.pot: Updated by the Translation project.
        * po/sv.po: Updated Swedish translation.
        * po/ld.pot: Updated by the Translation project.
        * po/fi.po: Updated Finnish translation.
        * po/ld.pot: Updated by the Translation project.
        * po/fi.po: Updated Finnish translation.

        Updated sources to compile cleanly with -Wc++-compat:
        * basic_blocks.c: Add casts.
        * cg_dfn.c: Add cast.
        * corefile.c: Add casts.
        * gmon_io.c: Add casts.
        * hist.c: Add cast.
        * source.c: Add cast.
        * sym_ids.c (struct match): Moved to top level.

        Updated soruces in ld/* to compile cleanly with -Wc++-compat:
        * ld.h (enum endian_enum,enum symbolic_enum,enum dynamic_list_enum): Move to top level.
        * ldcref.c: Add casts.
        * ldctor.c: Add casts.
        * ldexp.c
        * ldexp.h (enum node_tree_enum,enum phase_enum): Move to top level.
        * ldlang.c: Add casts. (lang_insert_orphan): Use enum name instead of integer.
        * ldlang.h (enum statement_enum): Move to top level.
        * ldmain.c: Add casts.
        * ldwrite.c: Add casts.
        * lexsup.c: Add casts. (enum control_enum): Move to top level.
        * mri.c: Add casts. (mri_draw_tree): Use enum name instead of integer.

        Updated sources to compile cleanly with -Wc++-compat:
        * basic_blocks.c: Add casts.
        * cg_dfn.c: Add cast.
        * corefile.c: Add casts.
        * gmon_io.c: Add casts.
        * hist.c: Add cast.
        * source.c: Add cast.
        * sym_ids.c (struct match): Moved to top level.

        * as.c (main): Call dwarf2_init.
        * config/obj-elf.c (struct group_list): New field.
        (build_group_lists): Use hash lookup.
        (free_section_idx): New function.
        (elf_frob_file): Adjust.
        * dwarf2dbg.c (all_segs_hash, last_seg_ptr): New variables.
        (get_line_subseg): Adjust.
        (dwarf2_init): New function.
        * dwarf2dbg.h (dwarf2_init): New declaration.
2009-09-11 15:27:38 +00:00
Nick Clifton 8b31b6c4c8 * obcopy.c (copy_object): New parameter `input_arch', architecture
of input file, if not specified in input file itself; all callers
       updated; `binary_architecture' hack removed.
       (copy_archive, copy_file): New parameter `input_arch', for
       `copy_object' usage.
       (copy_main): Accept `-B' (`--binary-architecture') option also
       for any arch-less input ifile format, not only `binary'; remove
       bfd_external_binary_architecture hack; instead, add `input_arch'
       to calls to `copy_file'.
       * windres.c, windmc.c : Obsolete and useless external references
       to `bfd_external_binary_architecture' or `bfd_external_machine'
       removed.

       * binary.c (binary_object_p): Remove bfd_external_binary_architecture
       hack.  objcopy `-B' (`--binary-architecture') option is now handled
       in a generic way.
2009-09-11 11:16:19 +00:00
Nick Clifton 681fe68830 Changelog entry for previous delta. 2009-09-11 08:09:49 +00:00
Jie Zhang 3b6cfd4e0b Fix ChangeLog entry date of my last commit. 2009-09-11 03:22:57 +00:00
Jie Zhang 83fd943792 * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
NULL if `ht' is NULL.
2009-09-11 03:20:34 +00:00
Nick Clifton a50b1753d4 Updated soruces in bfd/* to compile cleanly with -Wc++-compat.
* bfd/aoutx.h: Add casts.
        * bfd/archive.c: Add casts.
        * bfd/archive64.c: Add casts.
        * bfd/archures.c: Add casts.
        * bfd/bfd-in2.h: Regenerated.
        * bfd/bfd.c: Add casts. (enum bfd_direction): Move out to top
        level.
        * bfd/bfdio.c: Add casts.
        * bfd/binary.c: Add casts.
        * bfd/cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
        parameter to use enum value instead of int.
        * bfd/coffcode.h: Add casts.
        * bfd/coffgen.c: Add casts.
        * bfd/cofflink.c: Add casts.
        * bfd/compress.c: Add casts.
        * bfd/dwarf1.c: Add casts.
        * bfd/dwarf2.c: Add casts. (struct dwarf2_debug): Rename member
        bfd to bfd_ptr. Update code to use new name.
        * bfd/elf-attrs.c: Add casts.
        * bfd/elf-bfd.h (elf_link_virtual_table_entry): Gives name to
        anonymous struct. (union gotplt_union, struct
        elf_link_virtual_table_entry): Move to top level.
        * bfd/elf-eh-frame.c: Add casts.
        * bfd/elf-strtab.c: Add casts.
        * bfd/elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
        argument name from typename to type_name.
        * bfd/elf32-i386.c: Add casts.
        * bfd/elf64-x86-64.c: Add casts.
        * bfd/elfcode.h: Add casts.
        * bfd/elfcore.h: Add casts.
        * bfd/elflink.c: Add casts.
        * bfd/format.c: Add casts.
        * bfd/hash.c: Add casts.
        * bfd/ihex.c: Add casts.
        * bfd/libaout.h (enum aout_subformat, enum aout_magic): Move to
        top level.
        * bfd/libbfd.c: Add casts.
        * bfd/linker.c: Add casts.
        * bfd/merge.c: Add casts.
        * bfd/opncls.c: Add casts.
        * bfd/peXXigen.c: Add casts.
        * bfd/peicode.h: Add casts.
        * bfd/reloc.c: Add casts.
        * bfd/section.c: Add casts.
        * bfd/simple.c: Add casts.
        * bfd/srec.c: Add casts.
        * bfd/stabs.c: Add casts.
        * bfd/syms.c: Add casts.
        * bfd/targets.c: Add casts.
        * bfd/tekhex.c: Add casts.
        * bfd/verilog.c: Add casts.
        * include/bfdlink.h (struct bfd_link_hash_common_entry): Move to
        top level.
2009-09-09 21:38:59 +00:00
Paolo Bonzini f3b4f6d024 config:
2009-09-09  Paolo Bonzini  <bonzini@gnu.org>

	* stdint.m4 (GCC_HEADER_STDINT): Revert changes to this macro in
	the previous two patches.

bfd:
2009-09-09  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.
2009-09-09 19:46:42 +00:00
Daniel Jacobowitz 67d74e430e bfd/
* elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
	for the mode of target PLT entries.
	(allocate_dynrelocs): Only adjust symbol type if setting its
	value.

	ld/testsuite/
	* ld-arm/farcall-mixed-lib.d: Update.
2009-09-09 18:36:11 +00:00
Paolo Bonzini 07c58694fc config:
2009-09-09  Paolo Bonzini  <bonzini@gnu.org>

	* stdint.m4: Store temporary file in $tmp/_GCC_STDINT_H.

bfd:
2009-09-09  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regnerate.
2009-09-09 17:05:46 +00:00
Nick Clifton cfcac11dc8 PR 10478:
* elf.c (bfd_section_from_shdr): Do not reject sparc binaries with
        section headers containing sh_link values of SHN_BEFORE or
        SHN_AFTER.
        * elfcode.h (elf_object_p): Likewise.

        readelf.c (get_elf_section_flags): Add support for SHF_EXCLUDE and
        SHF_ORDERED.
        (process_section_headers): Warn about out of range sh_link
        values.  When displaying detailed section header information
        annote the SHN_BEFORE and SHN_AFTER values.
2009-09-09 15:03:54 +00:00
Tristan Gingold ad86f1fb4d 2009-09-09 Tristan Gingold <gingold@adacore.com>
Handle DYLD_INFO introduced by Darwin10.
	* mach-o.h (bfd_mach_o_load_command_type): Add
	BFD_MACH_O_LC_DYLD_INFO.
	(bfd_mach_o_dyld_info_command): New type.
	(bfd_mach_o_load_command): Add dyld_info field.
	* mach-o.c (bfd_mach_o_scan_read_str): Reduce size of buf.
	(bfd_mach_o_scan_read_dyld_info): New function.
	(bfd_mach_o_scan_read_command): Handle BFD_MACH_O_LC_DYLD_INFO.
	(bfd_mach_o_bfd_print_private_bfd_data): Ditto.
	(bfd_mach_o_load_command_name): AddB FD_MACH_O_LC_DYLD_INFO.
	(bfd_mach_o_print_dyld_info): New function.
2009-09-09 14:58:12 +00:00
M R Swami Reddy 1004c3e14a 2009-09-09 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
* elf32-cr16.c (elf32_cr16_relocate_section): Add code to discard the
       linkonce or linker script discarded section.
2009-09-09 04:49:09 +00:00