OSDN Git Service

pf3gnuchains/pf3gnuchains4x.git
15 years ago * readelf.c (is_32bit_pcrel_reloc): Fix hppa entry.
Richard Henderson [Thu, 21 Aug 2008 19:38:58 +0000 (19:38 +0000)]
    * readelf.c (is_32bit_pcrel_reloc): Fix hppa entry.
        (is_64bit_pcrel_reloc): New.
        (debug_apply_relocations): Use it.  Handle hppa pcrel bias.

15 years ago2008-08-21 Sterling Augustine <sterling@tensilica.com>
Bob Wilson [Thu, 21 Aug 2008 17:10:24 +0000 (17:10 +0000)]
2008-08-21  Sterling Augustine  <sterling@tensilica.com>
* config/xtensa-istack.h (MAX_INSN_ARGS): Increase to 64.

15 years ago PR ld/6833
Jan Kratochvil [Thu, 21 Aug 2008 13:10:54 +0000 (13:10 +0000)]
PR ld/6833
* ldexp.c (fold_binary <DATA_SEGMENT_ALIGN>): Do not align
EXPLD.DATASEG.MIN_BASE.
* ldlang.c (lang_size_sections): New variable OLD_BASE.  Rename
OLD_MIN_BASE to MIN_BASE with the former alignment from `ldexp.c'.
Use OLD_BASE now for the minimal base check after the base decrease by
the maximum alignment found.

15 years ago2008-08-20 Craig Silverstein <csilvers@google.com>
Craig Silverstein [Thu, 21 Aug 2008 00:30:13 +0000 (00:30 +0000)]
2008-08-20  Craig Silverstein  <csilvers@google.com>

* fileread.cc (File_read::open): Do not lock the file unless it
was successfully opened.

15 years agodaily update
Alan Modra [Thu, 21 Aug 2008 00:00:11 +0000 (00:00 +0000)]
daily update

15 years agoCommit file that I accidentally omitted from my change to support TLS on Xtensa.
Bob Wilson [Wed, 20 Aug 2008 23:43:41 +0000 (23:43 +0000)]
Commit file that I accidentally omitted from my change to support TLS on Xtensa.

15 years ago2008-08-20 Bob Wilson <bob.wilson@acm.org>
Bob Wilson [Wed, 20 Aug 2008 23:38:39 +0000 (23:38 +0000)]
2008-08-20  Bob Wilson  <bob.wilson@acm.org>
        * gas/all/gas.exp: Expect the redef test to fail on Xtensa.

15 years ago2008-08-20 Bob Wilson <bob.wilson@acm.org>
Bob Wilson [Wed, 20 Aug 2008 23:28:59 +0000 (23:28 +0000)]
2008-08-20  Bob Wilson  <bob.wilson@acm.org>
bfd/
        * elf-bfd.h (elf_object_id): Add XTENSA_ELF_TDATA.
        * elf32-xtensa.c (elf_howto_table): Add TLS relocations.
        (elf_xtensa_reloc_type_lookup): Likewise.
        (TCB_SIZE): Define.
        (elf_xtensa_link_hash_entry): New.
        (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE, GOT_TLS_ANY): Define.
        (elf_xtensa_hash_entry): Define.
        (elf_xtensa_obj_tdata): New.
        (elf_xtensa_tdata): Define.
        (elf_xtensa_local_got_tls_type): Define.
        (elf_xtensa_local_tlsfunc_refcounts): Define.
        (is_xtensa_elf): Define.
        (elf_xtensa_mkobject): New.
        (elf_xtensa_link_hash_table): Add tlsbase field.
        (elf_xtensa_link_hash_newfunc): New.
        (elf_xtensa_link_hash_table_create): Use elf_xtensa_link_hash_newfunc.
        Create an entry for "_TLS_MODULE_BASE_" and save it in tlsbase field.
        (elf_xtensa_copy_indirect_symbol): New.
        (elf_xtensa_check_relocs): Rewrite to handle TLS relocations.
        (elf_xtensa_gc_sweep_hook): Likewise.
        (elf_xtensa_allocate_dynrelocs): Optimize away GOT entries for
        TLSDESC_FN relocations when an IE reference is seen.
        (elf_xtensa_allocate_local_got_size): Likewise.
        (elf_xtensa_always_size_sections): New.
        (dtpoff_base, tpoff): New.
        (elf_xtensa_do_reloc): Handle TLS relocations.
        (replace_tls_insn): New.
        (IS_XTENSA_TLS_RELOC): Define.
        (elf_xtensa_relocate_section): Handle TLS relocations.
        (get_indirect_call_dest_reg): New.
        (bfd_elf32_mkobject): Define.
        (elf_backend_always_size_sections): New.
        (elf_backend_copy_indirect_symbol): New.
        * reloc.c (BFD_RELOC_XTENSA_TLSDESC_FN, BFD_RELOC_XTENSA_TLSDESC_ARG)
        (BFD_RELOC_XTENSA_TLS_DTPOFF, BFD_RELOC_XTENSA_TLS_TPOFF)
        (BFD_RELOC_XTENSA_TLS_FUNC, BFD_RELOC_XTENSA_TLS_ARG)
        (BFD_RELOC_XTENSA_TLS_CALL): New.
        * bfd-in2.h: Regenerate.
        * libbfd.h: Regenerate.
gas/
        * config/tc-xtensa.c (O_tlsfunc, O_tlsarg, O_tlscall): Define.
        (O_tpoff, O_dtpoff): Define.
        (suffix_relocs): Add entries for TLS suffixes.
        (xtensa_elf_cons): Check for invalid use of TLS relocations.
        (map_operator_to_reloc): Add is_literal parameter and use it to
        control translating TLS instruction relocations to the corresponding
        literal relocations.
        (xg_valid_literal_expression): Allow TLS operators.
        (xg_build_to_insn): Copy TLS operators from pseudo-instruction
        operands to generated literals.
        (xg_assemble_literal): Handle TLS operators.  Update call to
        map_operator_to_reloc.
        (md_assemble): Handle CALLXn.TLS pseudo-instruction.
        (md_apply_fix): Handle TLS relocations.
        (emit_single_op): Handle TLS operators.
        (convert_frag_immed): Update call to map_operator_to_reloc.
        (vinsn_to_insnbuf): Emit relocations for TLS-related instructions.
        * config/xtensa-istack.h (tinsn_struct): Add tls_reloc field.
        * config/xtensa-relax.c (append_literal_op): Add src_op parameter
        to initialize the op_data field of the BuildOp.
        (build_transition): Use it here to record the source operand
        corresponding to a generated literal.
        * config/xtensa-relax.h (build_op): Comment op_data use for literals.
include/elf/
        * xtensa.h (R_XTENSA_TLSDESC_FN, R_XTENSA_TLSDESC_ARG)
        (R_XTENSA_TLS_DTPOFF, R_XTENSA_TLS_TPOFF, R_XTENSA_TLS_FUNC)
        (R_XTENSA_TLS_ARG, R_XTENSA_TLS_CALL): New.
ld/testsuite/
        * ld-xtensa/tlsbin.dd, ld-xtensa/tlsbin.rd, ld-xtensa/tlsbin.s,
        ld-xtensa/tlsbin.sd, ld-xtensa/tlsbin.td, ld-xtensa/tlslib.s,
        ld-xtensa/tlspic.dd, ld-xtensa/tlspic.rd, ld-xtensa/tlspic.sd,
        ld-xtensa/tlspic.td, ld-xtensa/tlspic1.s, ld-xtensa/tlspic2.s: New.
        * ld-xtensa/xtensa.exp: Run them.

15 years agoAdd the missing ChangeLog entry for the AES + AVX checkin.
H.J. Lu [Wed, 20 Aug 2008 18:48:09 +0000 (18:48 +0000)]
Add the missing ChangeLog entry for the AES + AVX checkin.

15 years agogas/
H.J. Lu [Wed, 20 Aug 2008 18:38:40 +0000 (18:38 +0000)]
gas/

2008-08-20  H.J. Lu  <hongjiu.lu@intel.com>

AVX Programming Reference (August, 2008)
* config/tc-i386.c (CPU_FLAGS_AES_MATCH): New.
(CPU_FLAGS_AVX_MATCH): Likewise.
(CPU_FLAGS_32BIT_MATCH): Updated.
(cpu_flags_match): Likewise.

gas/testsuite/

2008-08-20  H.J. Lu  <hongjiu.lu@intel.com>

AVX Programming Reference (August, 2008)
* gas/i386/avx.s: Add AES + AVX tests.
* gas/i386/arch-10.s: Likewise.
* gas/i386/sse2avx.s: Likewise.
* gas/i386/x86-64-arch-2.s: Likewise.
* gas/i386/x86-64-avx.s: Likewise.
* gas/i386/x86-64-sse2avx.s: Likewise.

* gas/i386/arch-10.d: Updated.
* gas/i386/arch-10-1.l: Likewise.
* gas/i386/arch-10-2.l: Likewise.
* gas/i386/arch-10-3.l: Likewise.
* gas/i386/arch-10-4.l: Likewise.
* gas/i386/avx.d: Likewise.
* gas/i386/avx-intel.d: Likewise.
* gas/i386/sse2avx.d: Likewise.
* gas/i386/x86-64-arch-2.d: Likewise.
* gas/i386/x86-64-avx.d: Likewise.
* gas/i386/x86-64-avx-intel.d: Likewise.
* gas/i386/x86-64-sse2avx.d: Likewise.

* gas/i386/i386.exp: Run arch-avx-1, arch-avx-1-1 and
arch-avx-1-2.

* gas/i386/arch-avx-1.d: New.
* gas/i386/arch-avx-1.s: Likewise.
* gas/i386/arch-avx-1-1.l: Likewise.
* gas/i386/arch-avx-1-1.s: Likewise.
* gas/i386/arch-avx-1-2.l: Likewise.
* gas/i386/arch-avx-1-2.s: Likewise.

opcodes/

2008-08-20  H.J. Lu  <hongjiu.lu@intel.com>

AVX Programming Reference (August, 2008)
* i386-dis.c (PREFIX_VEX_38DB): New.
(PREFIX_VEX_38DC): Likewise.
(PREFIX_VEX_38DD): Likewise.
(PREFIX_VEX_38DE): Likewise.
(PREFIX_VEX_38DF): Likewise.
(PREFIX_VEX_3ADF): Likewise.
(VEX_LEN_38DB_P_2): Likewise.
(VEX_LEN_38DC_P_2): Likewise.
(VEX_LEN_38DD_P_2): Likewise.
(VEX_LEN_38DE_P_2): Likewise.
(VEX_LEN_38DF_P_2): Likewise.
(VEX_LEN_3ADF_P_2): Likewise.
(PREFIX_VEX_3A04): Updated.
(VEX_LEN_3A06_P_2): Likewise.
(prefix_table): Add PREFIX_VEX_38DB, PREFIX_VEX_38DC,
PREFIX_VEX_38DD, PREFIX_VEX_38DE and PREFIX_VEX_3ADF.
(x86_64_table): Likewise.
(vex_len_table): Add VEX_LEN_38DB_P_2, VEX_LEN_38DC_P_2,
VEX_LEN_38DD_P_2, VEX_LEN_38DE_P_2, VEX_LEN_38DF_P_2 and
VEX_LEN_3ADF_P_2.

* i386-opc.tbl: Add AES + AVX instructions.
* i386-init.h: Regenerated.
* i386-tbl.h: Likewise.

15 years ago PR 6848
Alan Modra [Wed, 20 Aug 2008 13:43:32 +0000 (13:43 +0000)]
PR 6848
* write.c (install_reloc): Check that reloc symbols have been
written.
(set_symtab): Mark symbols with BSF_KEEP.

15 years agodaily update
Alan Modra [Wed, 20 Aug 2008 00:00:08 +0000 (00:00 +0000)]
daily update

15 years agodaily update
Alan Modra [Tue, 19 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago2008-08-18 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Mon, 18 Aug 2008 18:21:15 +0000 (18:21 +0000)]
2008-08-18  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (i386_align_code): Fix a comment typo.

15 years agobfd/
Richard Sandiford [Mon, 18 Aug 2008 18:14:05 +0000 (18:14 +0000)]
bfd/
* elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Copy MIPS16
stub information.

ld/testsuite/
* ld-mips-elf/mips16-pic-4a.s, ld-mips-elf/mips16-pic-4b.s,
ld-mips-elf/mips16-pic-4.ver, ld-mips-elf/mips16-pic-4a.dd,
ld-mips-elf/mips16-pic-4a.nd, ld-mips-elf/mips16-pic-4a.gd,
ld-mips-elf/mips16-pic-4c.s, ld-mips-elf/mips16-pic-4b.dd: New tests.
* ld-mips-elf/mips-elf.exp: Run them.

15 years agodaily update
Alan Modra [Mon, 18 Aug 2008 00:00:06 +0000 (00:00 +0000)]
daily update

15 years ago* elf32-arm.c: Tidy up the code.
Nick Clifton [Sun, 17 Aug 2008 20:48:21 +0000 (20:48 +0000)]
* elf32-arm.c: Tidy up the code.
  (bfd_elf32_arm_allocate_interworking_sections): Move common code
  into...
  (arm_allocate_glue_section_space): ... New function.
  (bfd_elf32_arm_add_glue_sections_to_bfd): Move common code
  into...
  (arm_make_glue_section): ... New function.

15 years ago * ld-elf/sec-to-seg1.s: Shorten test data to align the section to
Nick Clifton [Sun, 17 Aug 2008 20:42:53 +0000 (20:42 +0000)]
    * ld-elf/sec-to-seg1.s: Shorten test data to align the section to
        a 4-byte boundary.

15 years ago* elfxx-mips.c (_bfd_mips_elf_check_relocs): Handle the situation
Nick Clifton [Sun, 17 Aug 2008 20:39:34 +0000 (20:39 +0000)]
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Handle the situation
  where the sym_hashes are not available.

15 years agobfd/
Alan Modra [Sun, 17 Aug 2008 03:12:50 +0000 (03:12 +0000)]
bfd/
* bfd.c (struct _bfd): Correct outsymbols comment.
* bfd-in2.h: Regenerate.
* linker.c (bfd_generic_link_read_symbols): Renamed from..
(generic_link_read_symbols): ..this, and made global.

include/
* bfdlink.h (bfd_generic_link_read_symbols): Declare.
ld/
PR 6478
* ldcref.c (check_local_sym_xref): Use bfd_generic_link_read_symbols.
Don't free symbol pointer array.
(check_refs): Likewise.
* ldmain.c (warning_callback): Likewise.
* ldmisc.c (vfinfo): Likewise.
* pe-dll.c (process_def_file): Likewise.
(pe_walk_relocs_of_symbol, generate_reloc): Likewise.
* emultempl/pe.em (pe_find_data_imports): Likewise.
(gld_${EMULATION_NAME}_after_open): Likewise.
* emultempl/pep.em (pep_find_data_imports): Likewise.
(gld_${EMULATION_NAME}_after_open): Likewise.
* ldlang.h (lang_input_statement_type): Delete asymbols, symbol_count,
passive_position, closed.
* ldlang.c (new_afile): Don't set asymbols and symbol_count.
* ldmain.c (add_archive_element): xcalloc lang_input_statement_type.

15 years agodaily update
Alan Modra [Sun, 17 Aug 2008 00:00:06 +0000 (00:00 +0000)]
daily update

15 years ago * configure.ac (mips*-*-*linux*, mips*-*-gnu*): Use mt-mips-gnu.
Richard Sandiford [Sat, 16 Aug 2008 06:47:17 +0000 (06:47 +0000)]
* configure.ac (mips*-*-*linux*, mips*-*-gnu*): Use mt-mips-gnu.
* configure: Regenerate.

config/
* mt-mips16-compat: New file, taken from mt-mips-elfoabi.
* mt-mips-elfoabi: Include mt-mips16-compat.
* mt-mips-gnu: New file.

15 years agodaily update
Alan Modra [Sat, 16 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago2008-08-15 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Andreas Krebbel [Fri, 15 Aug 2008 12:10:21 +0000 (12:10 +0000)]
2008-08-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* s390-opc.c (INSTR_RRF_FFRU, MASK_RRF_FFRU): New instruction format.
* s390-opc.txt (lxr, rrdtr, rrxtr): Fix instruction format.

2008-08-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* gas/s390/esa-g5.d: lxr operands are floating point.
* gas/s390/esa-g5.s: Likewise.
* gas/testsuite/gas/s390/zarch-z9-ec.d: rrdtr, rrxtr third
operands is gpr.
* gas/testsuite/gas/s390/zarch-z9-ec.s: Likewise.

15 years ago PR 6526
Alan Modra [Fri, 15 Aug 2008 08:31:52 +0000 (08:31 +0000)]
PR 6526
* configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS.

15 years ago2008-08-14 Cary Coutant <ccoutant@google.com>
Cary Coutant [Fri, 15 Aug 2008 04:57:46 +0000 (04:57 +0000)]
2008-08-14  Cary Coutant  <ccoutant@google.com>

* x86_64.cc (Target_x86_64::Relocate::relocat_tls):
Use addend for DTPOFF32, DTPOFF64, and TPOFF32 relocs.
* testsuite/tls_test.cc (struct int128): 128-bit struct
for testing TLS relocs with non-zero addend.
(v12): New TLS variable.
(t12): New test.
(t_last): Add check for v12.
* testsuite/tls_test.h (t12): New function.
* testsuite/tls_test_main.cc (thread_routine): Call new test.

15 years agodaily update
Alan Modra [Fri, 15 Aug 2008 00:00:07 +0000 (00:00 +0000)]
daily update

15 years ago * config/tc-tic4x.c (tic4x_operands_parse): Make static.
Alan Modra [Thu, 14 Aug 2008 14:54:40 +0000 (14:54 +0000)]
* config/tc-tic4x.c (tic4x_operands_parse): Make static.

15 years ago PR 6825
Alan Modra [Thu, 14 Aug 2008 13:56:00 +0000 (13:56 +0000)]
PR 6825
* ppc-opc.c (powerpc_opcodes): Enable rfci, mfpmr, mtpmr for e300.

15 years ago * coffgen.c (coff_find_nearest_line): Correct cached line index.
Alan Modra [Thu, 14 Aug 2008 02:38:22 +0000 (02:38 +0000)]
* coffgen.c (coff_find_nearest_line): Correct cached line index.

15 years agodaily update
Alan Modra [Thu, 14 Aug 2008 00:00:07 +0000 (00:00 +0000)]
daily update

15 years ago * layout.cc (Layout::attach_allocated_section_to_segment): Don't
Ian Lance Taylor [Wed, 13 Aug 2008 07:37:46 +0000 (07:37 +0000)]
* layout.cc (Layout::attach_allocated_section_to_segment): Don't
set tls_segment_ or relro_segment_.
(Layout::make_output_segment): Set tls_segment_ and relro_segment_
when appropriate.
* output.h (Output_section::clear_is_relro): New function.
* output.cc (Output_segment::add_output_section): Handle SHF_TLS
sections specially even when output_data_ is empty.
(Output_segment::maximum_alignment): When first section is relro,
only force alignment for PT_LOAD segments.
* script.cc (script_data_segment_align): New function.
(script_data_segment_relro_end): New function.
* script-c.h (script_data_segment_align): Declare.
(script_data_segment_relro_end): Declare.
* script-sections.h (class Script_sections): Declare
data_segment_align and data_segment_relro_end.  Add fields
segment_align_index_ and saw_relro_end_.
* script-sections.cc (class Sections_element): Add set_is_relro
virtual function.  Add new bool* parameter to place_orphan_here.
Add get_output_section virtual function.
(class Output_section_definition): Add set_is_relro.  Add new
bool* parameter to place_orphan_here.  Add get_output_section.
Add is_relro_ field.
(Output_section_definition::Output_section_definition): Initialize
evaluated_address_, evaluated_load_address, evaluated_addralign_,
and is_relro_ fields.
(Output_section_definition::place_orphan_here): Add is_relro
parameter.
(Output_section_definition::set_section_addresses): Set relro for
output section.
(Output_section_definition::alternate_constraint): Likewise.
(class Orphan_output_section): Add new bool* parameter to
place_orphan_here.  Add get_output_section.
(Orphan_output_section::place_orphan_here): Add is_relro
parameter.
(Script_sections::Script_sections): Initialize
data_segment_align_index_ and saw_relro_end_.
(Script_sections::data_segment_align): New function.
(Script_sections::data_segment_relro_end): New function.
(Script_sections::place_orphan): Set or clear is_relro.
(Script_sections::set_section_addresses): Force alignment of first
TLS section.
* yyscript.y (exp): Call script_data_segment_align and
script_data_segment_relro_end.
* testsuite/relro_script_test.t: New file.
* testsuite/relro_test.cc (using_script): Declare.
(t1, t2): Test using_script.
* testsuite/Makefile.am (check_PROGRAMS): Add relro_script_test.
(relro_script_test_SOURCES): Define.
(relro_script_test_DEPENDENCIES): Define.
(relro_script_test_LDFLAGS): Define.
(relro_script_test_LDADD): Define.
(relro_script_test.so): New target.
* testsuite/Makefile.in: Rebuild.

15 years ago * doc/as.texinfo (Align): Document the PowerPC behaviour.
Ben Elliston [Wed, 13 Aug 2008 02:50:41 +0000 (02:50 +0000)]
* doc/as.texinfo (Align): Document the PowerPC behaviour.

15 years agodaily update
Alan Modra [Wed, 13 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years agoBanish PARAMS and PTR. Convert to ISO C.
Alan Modra [Tue, 12 Aug 2008 23:39:31 +0000 (23:39 +0000)]
Banish PARAMS and PTR.  Convert to ISO C.
Delete unnecessary forward declarations.

15 years agogas/testsuite/
H.J. Lu [Tue, 12 Aug 2008 21:44:56 +0000 (21:44 +0000)]
gas/testsuite/

2008-08-12  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/amd.s: Add syscall and sysret.  Remove padding.

* gas/i386/amd.d: Updated.
* gas/i386/x86-64-opcode.d: Likewise.

* gas/i386/i386.exp: Run x86-64-intel64.

* gas/i386/x86-64-intel64.d: New.
* gas/i386/x86-64-intel64.s: Likewise.

* gas/i386/x86-64-opcode.s: Add syscall and sysret.

opcodes/

2008-08-12  H.J. Lu  <hongjiu.lu@intel.com>

* i386-opc.tbl: Add syscall and sysret for Cpu64.

* i386-tbl.h: Regenerated.

15 years ago * elf32-ppc.c (allocate_dynrelocs): Ignore dyn_relocs when
Alan Modra [Tue, 12 Aug 2008 13:12:49 +0000 (13:12 +0000)]
* elf32-ppc.c (allocate_dynrelocs): Ignore dyn_relocs when
!dynamic_sections_created.  Don't make symbols with got
references dynamic if !dynamic_sections_created.
* elf64-ppc.c (allocate_dynrelocs): Likewise.  Alloc dynamic
relocs on undefined symbols.
(ppc64_elf_relocate_section): Allow dynamic relocs on
undefined symbols.

15 years ago * config/tc-arm.c (s_unreq): Adjust hash_delete call.
Alan Modra [Tue, 12 Aug 2008 09:58:34 +0000 (09:58 +0000)]
* config/tc-arm.c (s_unreq): Adjust hash_delete call.
* config/tc-ia64.c (dot_rot): Likewise.

15 years agodaily update
Alan Modra [Tue, 12 Aug 2008 00:00:08 +0000 (00:00 +0000)]
daily update

15 years ago * elf64-ppc.c (toc_adjusting_stub_needed): Any call via the plt
Alan Modra [Mon, 11 Aug 2008 14:38:40 +0000 (14:38 +0000)]
* elf64-ppc.c (toc_adjusting_stub_needed): Any call via the plt
needs r2 valid, not just those to external syms.

15 years ago PR 6575
Alan Modra [Mon, 11 Aug 2008 07:40:22 +0000 (07:40 +0000)]
PR 6575
* hash.c: Expand PTR to void *.
(hash_delete): Add "freeme" parameter.  Call obstack_free.
* hash.h: Expand PTR to void *.
(hash_delete): Update prototype.
* macro.c (macro_expand_body): hash_delete LOCALs from formal_hash.
* config/tc-tic54x.c (tic54x_remove_local_label): Update hash_delete
call.
(subsym_substitute): Likewise.
* doc/internals.texi (hash_delete): Update.

15 years agodaily update
Alan Modra [Mon, 11 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago * archive.c (_bfd_archive_bsd_update_armap_timestamp): Cast stat
Pedro Alves [Sun, 10 Aug 2008 18:49:09 +0000 (18:49 +0000)]
* archive.c (_bfd_archive_bsd_update_armap_timestamp): Cast stat
st_mtime to long before comparison.

15 years agodaily update
Alan Modra [Sun, 10 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago PR 6615
Alan Modra [Sat, 9 Aug 2008 13:05:11 +0000 (13:05 +0000)]
PR 6615
* rename.c (smart_rename): Punctuate error messages.

15 years ago PR 6753
Alan Modra [Sat, 9 Aug 2008 10:15:39 +0000 (10:15 +0000)]
PR 6753
* ldmain.c (check_for_scripts_dir, set_scripts_dir): Delete.
(main): Don't set_scripts_dir here.
* ldfile.c (check_for_scripts_dir, find_scripts_dir): New functions,
largely based on ldmain.c versions.
(ldfile_find_command_file): Set up search in script dir here without
affecting library search.
* Makefile.am (ldmain.o): No need to define SCRIPTDIR.
(ldfile.o): New rule.
* Makefile.in: Regenerate.

15 years agoAdd AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
Eric B. Weddington [Sat, 9 Aug 2008 05:35:13 +0000 (05:35 +0000)]
Add AVR architectures avr25, avr31, avr35, and avr51 to match GCC.
bfd/
* archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
bfd_mach_avr51): New.
* bfd-in2.h: Regenerate.
* cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
architectures. Change comments to match architecture comments in GCC.
(compatible): Add test for new AVR architectures.
* elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
(elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.

gas/
* config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51
architectures. Reorganize list to put mcu types in correct architectures
and to order list same as in GCC. Use new ISA definitions in
include/opcode/avr.h.
* doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture
descriptions. Reorganize descriptions to put mcu types in correct
architectures and to order lists same as in GCC.

include/
* elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
(EF_AVR_MACH): Redefine to 0x7F.
* opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
(AVR_ISA_AVR3): Redefine.
(AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
AVR_ISA_AVR6): Define.

ld/
* Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
and eavr51.o.
Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
* Makefile.in: Regenerate.
* configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
and avr51.
* emulparams/avr25.sh: New file.
* emulparams/avr31.sh: New file.
* emulparams/avr35.sh: New file.
* emulparams/avr51.sh: New file.

15 years agodaily update
Alan Modra [Sat, 9 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago2008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
Daniel Jacobowitz [Fri, 8 Aug 2008 19:24:49 +0000 (19:24 +0000)]
2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
    Daniel Jacobowitz  <dan@codesourcery.com>
    Catherine Moore  <clm@codesourcery.com>
    Mark Shinwell  <shinwell@codesourcery.com>
    Maxim Kuvyrkov  <maxim@codesourcery.com>

* elf32-mips.c (mips_vxworks_copy_howto_rela): Replace with...
(elf_mips_copy_howto): ...this howto.  Clear the size fields.
(mips_vxworks_jump_slot_howto_rela): Replace with...
(elf_mips_jump_slot_howto): ...this howto.
(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
and BFD_RELOC_MIPS_JUMP_SLOT.
(bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
"R_MIPS_JUMP_SLOT".
(mips_elf32_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
(elf_backend_plt_readonly): Define.
(elf_backend_plt_sym_val): Define for non-VxWorks targets.
(mips_vxworks_bfd_reloc_type_lookup): Delete.
(mips_vxworks_bfd_reloc_name_lookup): Likewise.
(mips_vxworks_rtype_to_howto): Likewise.
(elf_backend_want_dynbss): Don't define for VxWorks.
(elf_backend_plt_readonly): Likewise.
(bfd_elf32_bfd_reloc_type_lookup): Likewise.
(bfd_elf32_bfd_reloc_name_lookup): Likewise.
(elf_backend_mips_rtype_to_howto): Likewise.
(elf_backend_adjust_dynamic_symbol): Likewise.
(elf_backend_got_symbol_offset): Don't define.
* elfn32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
and BFD_RELOC_MIPS_JUMP_SLOT.
(bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
"R_MIPS_JUMP_SLOT".
(mips_elf32_n32_rtype_to_howto): Handle R_MIPS_COPY and
R_MIPS_JUMP_SLOT.
(elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
(elf_backend_plt_sym_val): Define.
* elf64-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
(bfd_elf64_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
and BFD_RELOC_MIPS_JUMP_SLOT.
(bfd_elf64_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
"R_MIPS_JUMP_SLOT".
(mips_elf64_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
(elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
(elf_backend_plt_sym_val): Define.
* elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Delete.
(_bfd_mips_elf_use_plts_and_copy_relocs, _bfd_mips_elf_init_stubs)
(_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): Declare.
* elfxx-mips.c (mips_elf_la25_stub): New structure.
(LA25_LUI, LA25_J, LA25_ADDIU): New macros.
(mips_elf_link_hash_entry): Add "la25_stubs", "has_static_relocs"
and "has_nonpic_branches" fields.  Remove "is_relocation_target" and
"is_branch_target".
(mips_elf_link_hash_table): Add blank lines.  Add
"use_plts_and_copy_relocs", "reserved_gotno", "strampoline",
"la25_stubs" and "add_stub_section" fields.
(mips_htab_traverse_info): New structure.
(PIC_OBJECT_P, MIPS_ELF_LOAD_WORD): New macros.
(MIPS_RESERVED_GOTNO): Delete.
(mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry)
(mips_n64_exec_plt0_entry, mips_exec_plt_entry): New tables.
(mips_elf_link_hash_newfunc): Update after the changes to
mips_elf_link_hash_entry.
(mips_elf_check_mips16_stubs): Replace the DATA parameter with
an INFO parameter.  Don't look through warnings symbols here;
do it in mips_elf_check_symbols instead.
(mips_elf_create_stub_symbol): New function.
(mips_elf_la25_stub_hash, mips_elf_la25_stub_eq): New functions.
(_bfd_mips_elf_init_stubs, mips_elf_local_pic_function_p): Likewise.
(mips_elf_add_la25_intro, mips_elf_add_la25_trampoline): Likewise.
(mips_elf_add_la25_stub, mips_elf_check_symbols): New functions.
(mips_elf_gotplt_index): Check for VxWorks.
(mips_elf_output_dynamic_relocation): Take the relocation index
as an extra parameter.  Do not increment reloc_count here.
(mips_elf_initialize_tls_slots): Update the calls to
mips_elf_output_dynamic_relocation accordingly.
(mips_elf_multi_got): Use htab->reserved_gotno instead of
MIPS_RESERVED_GOTNO.
(mips_elf_create_got_section): Don't allocate reserved GOT
entries here.  Unconditionally create .got.plt, but don't
set its alignment here.
(mips_elf_relocation_needs_la25_stub): New function.
(mips_elf_calculate_relocation): Redirect branches and jumps to
a non-PIC stub if one exists.  Check !h->has_static_relocs instead
of !htab->is_vxworks when deciding whether to create dynamic
relocations for R_MIPS_32, R_MIPS_REL32 and R_MIPS_64.
(_bfd_mips_elf_create_dynamic_sections): Unconditionally call
_bfd_elf_create_dynamic_sections.  Unconditionally set up
htab->splt and htab->sdynbss.  Set htab->srelplt to ".rel.plt"
if !htab->is_vxworks.  Add non-VxWorks values of
htab->plt_header_size and htab->plt_entry_size.
(_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
non-branch static relocations.  Set has_nonpic_branches when an la25
stub might be required.  Set can_make_dynamic_p to TRUE if R_MIPS_32,
R_MIPS_REL32 and R_MIPS_64 relocations can be made dynamic,
rather than duplicating the condition.  Do not make them dynamic
for read-only sections in non-PIC executable objects.
Do not protect this code with dynobj == NULL || htab->sgot == NULL;
handle each group of cases separately.  Add a default case that
sets has_static_relocs for non-GOT relocations that cannot be
made dynamic.  Don't set is_relocation_target and is_branch_target.
Reject non-PIC static relocations in shared objects.
(_bfd_mips_vxworks_adjust_dynamic_symbol): Fold into...
(_bfd_mips_elf_adjust_dynamic_symbol): ...here, using
htab->use_plts_and_copy_relocs instead of htab->is_vxworks
to select PLT and copy-reloc handling.  Set the alignment of
.plt and .got.plt when allocating the first entry.  Generalize
code to handle REL as well as RELA sections and 64-bit as well as
32-bit GOT entries.  Complain if we find a static-only reloc
against an externally-defined symbol and if we cannot create
dynamic relocations for it.  Allocate copy relocs using
mips_elf_allocate_dynamic_relocations on non-VxWorks targets.
Set possibly_dynamic_relocs to 0 when using PLTs or copy relocs.
Skip reserved .got.plt entries.
(_bfd_mips_elf_always_size_sections): Use mips_elf_check_symbols
instead of mips_elf_check_mips16_stubs to process each symbol.
Do the traversal for relocatable objects too.
(mips_elf_lay_out_got): Use htab->reserved_gotno instead of
MIPS_RESERVED_GOTNO.
(_bfd_mips_elf_size_dynamic_sections): Exclude sdynbss if it
is empty.  Extend the DT_PLTREL, DT_JMPREL and DT_PLTRELSZ handling
to non-VxWorks targets.  Only add DT_REL{,A}, DT_REL{,A}SZ and
DT_REL{,A}ENT if .rel.dyn is nonempty.  Create a symbol for the
PLT.  Allocate a nop at the end of the PLT.  Allocate DT_MIPS_PLTGOT.
(mips_elf_create_la25_stub_info): New function.
(_bfd_mips_elf_finish_dynamic_symbol): Write out PLT entries
and copy relocs where necessary.  Check pointer_equality_needed.
(mips_finish_exec_plt): New function.
(_bfd_mips_elf_finish_dynamic_sections): Always set DT_PLTGOT
to the beginning of htab->sgot.  Use htab->reserved_gotno instead
of MIPS_RESERVED_GOTNO.  Assert htab->use_plts_and_copy_relocs
instead of htab->is_vxworks for DT_PLTREL, DT_PLTRELSZ and DT_JMPREL.
Set DT_PLTREL to DT_REL instead of DT_RELA on non-VxWorks targets.
Use mips_finish_exec_plt to create non-VxWorks PLT headers.  Set
DT_MIPS_PLTGOT.
(_bfd_mips_elf_copy_indirect_symbol): Copy has_static_relocs
from the indirect symbol to the direct symbol.  Also copy
has_nonpic_branches for indirect symbols.
(_bfd_mips_elf_get_target_dtag): Handle DT_MIPS_PLTGOT and
DT_MIPS_RWPLT.
(_bfd_mips_elf_link_hash_table_create): Initialize the new
mips_elf_link_hash_table fields.
(_bfd_mips_vxworks_link_hash_table_create): Set
use_plts_and_copy_relocs to TRUE.  Use TRUE rather than 1
when setting is_vxworks.
(_bfd_mips_elf_use_plts_and_copy_relocs): New function.
(_bfd_mips_elf_final_link): Call mips_elf_create_la25_stub for
each la25_stub.
(_bfd_mips_elf_merge_private_bfd_data): Treat dynamic objects
as PIC.  Generalize message about linking PIC and non-PIC.
(_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): New
functions.
* reloc.c: Update comment near BFD_RELOC_MIPS_JUMP_SLOT.
* bfd-in2.h: Regenerated.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
    Daniel Jacobowitz  <dan@codesourcery.com>
    Catherine Moore  <clm@codesourcery.com>
    Mark Shinwell  <shinwell@codesourcery.com>

* readelf.c (get_mips_symbol_other): Handle STO_MIPS_PLT and
STO_MIPS_PIC.
(slurp_rela_relocs, slurp_rel_relocs): Handle MIPS ELF64 here.
(dump_relocations, debug_apply_relocations): Don't handle it here.
(get_mips_dynamic_type): Handle DT_MIPS_PLTGOT and DT_MIPS_RWPLT.
(print_mips_pltgot_entry): New function.
(process_mips_specific): Dump the PLT GOT.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
    Daniel Jacobowitz  <dan@codesourcery.com>

* config/tc-mips.c (OPTION_CALL_NONPIC): New macro.
(OPTION_NON_SHARED, OPTION_XGOT, OPTION_MABI, OPTION_32)
(OPTION_N32, OPTION_64, OPTION_MDEBUG, OPTION_NO_MDEBUG)
(OPTION_PDR, OPTION_NO_PDR, OPTION_MVXWORKS_PIC): Bump by 1.
(md_longopts): Add -call_nonpic.
(md_parse_option): Handle OPTION_CALL_NONPIC.
(md_show_usage): Add -call_nonpic.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>

* gas/mips/call-nonpic-1.s, gas/mips/call-nonpic-1.d: New test.
* gas/mips/mips.exp: Run it.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
    Daniel Jacobowitz  <dan@codesourcery.com>
    Catherine Moore  <clm@codesourcery.com>
    Mark Shinwell  <shinwell@codesourcery.com>

* mips.h (STO_MIPS_PLT, ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT)
(STO_MIPS_PIC, DT_MIPS_PLTGOT, DT_MIPS_RWPLT): New macros.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
    Daniel Jacobowitz  <dan@codesourcery.com>

* emulparams/elf32bmip.sh (GOT): Define, moving .got.plt to...
(OTHER_RELRO_SECTIONS, OTHER_READWRITE_SECTIONS): ...one of these
two variables.
* emulparams/elf32bmipn32-defs.sh: Likewise.
* emultempl/mipself.em: Include ldctor.h, elf/mips.h and elfxx-mips.h.
(is_mips_elf): New macro.
(stub_file, stub_bfd): New variables.
(hook_stub_info): New structure.
(hook_in_stub): New function.
(mips_add_stub_section): Likewise.
(mips_create_output_section_statements): Likewise.
(mips_before_allocation): Likewise.
(real_func): New variable.
(mips_for_each_input_file_wrapper): New function.
(mips_lang_for_each_input_file): Likewise.
(lang_for_each_input_file): Define.
(LDEMUL_BEFORE_ALLOCATION): Likewise.
(LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Likewise.

2008-08-08  Richard Sandiford  <rdsandiford@googlemail.com>
    Daniel Jacobowitz  <dan@codesourcery.com>

* ld-mips-elf/mips16-pic-3a.s,
ld-mips-elf/mips16-pic-3b.s,
ld-mips-elf/mips16-pic-3.dd,
ld-mips-elf/mips16-pic-3.gd,
ld-mips-elf/mips16-pic-3.rd,
ld-mips-elf/mips16-pic-3.inc,
ld-mips-elf/pic-and-nonpic-1a.s,
ld-mips-elf/pic-and-nonpic-1b.s,
ld-mips-elf/pic-and-nonpic-1.ld,
ld-mips-elf/pic-and-nonpic-1.dd,
ld-mips-elf/pic-and-nonpic-1.nd,
ld-mips-elf/pic-and-nonpic-1-rel.dd,
ld-mips-elf/pic-and-nonpic-1-rel.nd,
ld-mips-elf/pic-and-nonpic-2a.s,
ld-mips-elf/pic-and-nonpic-2b.s,
ld-mips-elf/pic-and-nonpic-2.d,
ld-mips-elf/pic-and-nonpic-3a.s,
ld-mips-elf/pic-and-nonpic-3a.ld,
ld-mips-elf/pic-and-nonpic-3a.dd,
ld-mips-elf/pic-and-nonpic-3a.gd,
ld-mips-elf/pic-and-nonpic-3a.sd,
ld-mips-elf/pic-and-nonpic-3b.s,
ld-mips-elf/pic-and-nonpic-3b.ld,
ld-mips-elf/pic-and-nonpic-3b.ad,
ld-mips-elf/pic-and-nonpic-3b.dd,
ld-mips-elf/pic-and-nonpic-3b.gd,
ld-mips-elf/pic-and-nonpic-3b.nd,
ld-mips-elf/pic-and-nonpic-3b.pd,
ld-mips-elf/pic-and-nonpic-3b.rd,
ld-mips-elf/pic-and-nonpic-3b.sd,
ld-mips-elf/pic-and-nonpic-3-error.d,
ld-mips-elf/pic-and-nonpic-4a.s,
ld-mips-elf/pic-and-nonpic-4b.s,
ld-mips-elf/pic-and-nonpic-4b.ld,
ld-mips-elf/pic-and-nonpic-4b.ad,
ld-mips-elf/pic-and-nonpic-4b.dd,
ld-mips-elf/pic-and-nonpic-4b.gd,
ld-mips-elf/pic-and-nonpic-4b.nd,
ld-mips-elf/pic-and-nonpic-4b.rd,
ld-mips-elf/pic-and-nonpic-4b.sd,
ld-mips-elf/pic-and-nonpic-4-error.d,
ld-mips-elf/pic-and-nonpic-5a.s,
ld-mips-elf/pic-and-nonpic-5b.s,
ld-mips-elf/pic-and-nonpic-5b.ld,
ld-mips-elf/pic-and-nonpic-5b.ad,
ld-mips-elf/pic-and-nonpic-5b.dd,
ld-mips-elf/pic-and-nonpic-5b.gd,
ld-mips-elf/pic-and-nonpic-5b.nd,
ld-mips-elf/pic-and-nonpic-5b.rd,
ld-mips-elf/pic-and-nonpic-5b.sd,
ld-mips-elf/pic-and-nonpic-5b.pd,
ld-mips-elf/pic-and-nonpic-6.ld,
ld-mips-elf/pic-and-nonpic-6-o32a.s,
ld-mips-elf/pic-and-nonpic-6-o32b.s,
ld-mips-elf/pic-and-nonpic-6-o32c.s,
ld-mips-elf/pic-and-nonpic-6-o32.ad,
ld-mips-elf/pic-and-nonpic-6-o32.dd,
ld-mips-elf/pic-and-nonpic-6-o32.gd,
ld-mips-elf/pic-and-nonpic-6-o32.nd,
ld-mips-elf/pic-and-nonpic-6-o32.pd,
ld-mips-elf/pic-and-nonpic-6-o32.rd,
ld-mips-elf/pic-and-nonpic-6-o32.sd,
ld-mips-elf/pic-and-nonpic-6-n32a.s,
ld-mips-elf/pic-and-nonpic-6-n32b.s,
ld-mips-elf/pic-and-nonpic-6-n32c.s,
ld-mips-elf/pic-and-nonpic-6-n32.ad,
ld-mips-elf/pic-and-nonpic-6-n32.dd,
ld-mips-elf/pic-and-nonpic-6-n32.gd,
ld-mips-elf/pic-and-nonpic-6-n32.nd,
ld-mips-elf/pic-and-nonpic-6-n32.pd,
ld-mips-elf/pic-and-nonpic-6-n32.rd,
ld-mips-elf/pic-and-nonpic-6-n32.sd,
ld-mips-elf/pic-and-nonpic-6-n64a.s,
ld-mips-elf/pic-and-nonpic-6-n64b.s,
ld-mips-elf/pic-and-nonpic-6-n64c.s,
ld-mips-elf/pic-and-nonpic-6-n64.ad,
ld-mips-elf/pic-and-nonpic-6-n64.dd,
ld-mips-elf/pic-and-nonpic-6-n64.gd,
ld-mips-elf/pic-and-nonpic-6-n64.nd,
ld-mips-elf/pic-and-nonpic-6-n64.pd,
ld-mips-elf/pic-and-nonpic-6-n64.rd,
ld-mips-elf/pic-and-nonpic-6-n64.sd: New tests.
* ld-mips-elf/mips-elf.exp: Run them.

15 years ago2008-08-08 Sterling Augustine <sterling@tensilica.com>
Bob Wilson [Fri, 8 Aug 2008 18:21:26 +0000 (18:21 +0000)]
2008-08-08  Sterling Augustine  <sterling@tensilica.com>
* config/tc-xtensa.c (exclude_section_from_property_tables): New.
(xtensa_create_property_segments): Use it.
(xtensa_create_xproperty_segments): Likewise.

15 years ago * readelf.c (is_64bit_abs_reloc): Return true for R_MIPS_64.
Alan Modra [Fri, 8 Aug 2008 08:08:33 +0000 (08:08 +0000)]
* readelf.c (is_64bit_abs_reloc): Return true for R_MIPS_64.

15 years ago * ldfile.c (ldfile_open_file_search): Use concat.
Alan Modra [Fri, 8 Aug 2008 08:06:16 +0000 (08:06 +0000)]
* ldfile.c (ldfile_open_file_search): Use concat.
(try_open): Don't use a fixed size pathname buffer.
(ldfile_find_command_file): Likewise.
* emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): If
using EXTRA_SHLIB_EXTENSION, don't open twice.

15 years ago * elf.c (bfd_elf_get_elf_syms): Don't leak memory on error.
Alan Modra [Fri, 8 Aug 2008 08:00:14 +0000 (08:00 +0000)]
* elf.c (bfd_elf_get_elf_syms): Don't leak memory on error.
* elflink.c (_bfd_elf_link_read_relocs): bfd_release on error.
(elf_link_add_object_symbols): Don't leak memory on error.
(bfd_elf_size_dynsym_hash_dynstr): Likewise.
(elf_fixup_link_order): Free sections.

15 years ago * doc/internals.texi (DWARF2_FORMAT): Update for 2008-08-04 change.
Alan Modra [Fri, 8 Aug 2008 07:38:49 +0000 (07:38 +0000)]
* doc/internals.texi (DWARF2_FORMAT): Update for 2008-08-04 change.

15 years agodaily update
Alan Modra [Fri, 8 Aug 2008 00:00:06 +0000 (00:00 +0000)]
daily update

15 years agobfd/
Richard Sandiford [Thu, 7 Aug 2008 20:04:32 +0000 (20:04 +0000)]
bfd/
* elf-bfd.h (elf_backend_data): Add a "rela_plts_and_copies_p" field.
* elfxx-target.h (elf_backend_rela_plts_and_copies_p): New macro.
(elfNN_bed): Use it.
* elf.c (_bfd_elf_get_synthetic_symtab): Use rela_plts_and_copies_p
instead of default_use_rela_p to choose between ".rel.plt" and
".rela.plt".
* elflink.c (_bfd_elf_create_dynamic_sections): Use
rela_plts_and_copies_p instead of default_use_rela_p to choose
between ".rel.plt" and ".rela.plt", and between ".rel.bss" and
".rela.bss".

15 years agobfd/
Richard Sandiford [Thu, 7 Aug 2008 20:03:25 +0000 (20:03 +0000)]
bfd/
* elf-bfd.h (MIPS_ELF_TDATA): New elf_object_id.
* elf32-mips.c (bfd_elf32_mkobject): Define.
* elf64-mips.c (bfd_elf64_mkobject): Likewise.
* elfn32-mips.c (bfd_elf32_mkobject): Likewise.
* elfxx-mips.h (_bfd_mips_elf_mkobject): Declare.
* elfxx-mips.c (is_mips_elf): New macro.
(_bfd_mips_elf_mkobject): New function.
(_bfd_mips_elf_final_link): Use is_mips_elf.
(_bfd_mips_elf_merge_private_bfd_data): Likewise.

15 years agobfd/
Richard Sandiford [Thu, 7 Aug 2008 20:01:38 +0000 (20:01 +0000)]
bfd/
* elfxx-mips.c (mips_elf_record_relocs): Defer allocation of a
global GOT entry when deferring allocation of dynamic relocations.
(allocate_dynrelocs): When allocating deferred dynamic relocations,
also do the deferred allocation of a GOT entry.

15 years agobfd/
Richard Sandiford [Thu, 7 Aug 2008 20:01:14 +0000 (20:01 +0000)]
bfd/
* elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field.
(mips_elf_got_section): Delete.
(mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide
how many reloc-only entries there are.
(mips_elf_count_got_symbols): Adjust g->reloc_only_gotno as
well as g->global_gotno.
(mips_elf_make_got_per_bfd): Initialize reloc_only_gotno.
(mips_elf_multi_got): Likewise.  Use gg->reloc_only_gotno
rather than gg->assigned_gotno to store the number of
reloc-only GOT entries.
(mips_elf_create_got_section): Remove the MAYBE_EXCLUDE parameter.
Initialize reloc_only_gotno.
(mips_elf_calculate_relocation): Check htab->got_info instead of
dynobj when deciding whether to call mips_elf_adjust_gp,
(_bfd_mips_elf_create_dynamic_sections): Adjust the call
to mips_elf_create_got_section.
(mips_elf_record_relocs): Likewise.  Remove redundant
"dynobj == NULL" code.  Do not use mips_elf_create_got_section
or mips_elf_record_global_got_symbol for R_MIPS_32, R_MIPS_REL32
and R_MIPS_64; limit global_got_area to GGA_RELOC_ONLY instead.
(_bfd_mips_elf_finish_dynamic_symbol): Use htab->sgot instead
of mips_elf_got_section.
(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
(_bfd_mips_elf_finish_dynamic_sections): Likewise.
Move the initial assignment of G to the block that uses it;
it is used for an unrelated purpose later.

ld/testsuite/
* ld-mips-elf/tls-hidden4.got, ld-mips-elf/tls-hidden4.r: We have
removed an unused GOT entry that was allocated for the R_MIPS_32
relocation against "undef", so adjust addresses down by 4 bytes.
* ld-mips-elf/got-dump-1.d, ld-mips-elf/got-dump-2.d: We have
changed the order of the GOT entries so that reloc-only ones
come last.  "undef" is only referred to by dynamic relocations,
so it now comes after "glob".
* ld-mips-elf/mips16-pic-2.dd, ld-mips-elf/mips16-pic-2.gd,
ld-mips-elf/mips16-pic-2.nd, ld-mips-elf/mips16-pic-2.rd: We have
removed two unused local GOT entries that were originally created
as global entries for the hidden symbols "used2" and "used3".
"used4" and "used5" are only referred to by relocations, so they
now come after "used6" and "used7".

15 years agomerge from gcc
DJ Delorie [Thu, 7 Aug 2008 20:00:53 +0000 (20:00 +0000)]
merge from gcc

15 years agobfd/
Richard Sandiford [Thu, 7 Aug 2008 19:59:16 +0000 (19:59 +0000)]
bfd/
* elfxx-mips.c (count_section_dynsyms): Move before the new first use.
(mips_elf_sort_hash_table): Take the output bfd as a parameter.
Remove the MAX_LOCAL parameter.  Exit early if there are no
dynamic symbols, if there is no dynobj, or if there is no
GOT section.  Use count_section_dynsyms instead of MAX_LOCAL.
Assert == rather than <= when checking hsd.max_unref_got_dynindx.
Also assert that g->global_gotno is right.
(mips_elf_count_forced_local_got_symbols): Rename to...
(mips_elf_count_got_symbols): ...and count global GOT entries too.
Set the global_got_area of a forced-local GGA_RELOC_ONLY symbol
to GGA_NONE.
(mips_elf_multi_got): Don't sort the symbol table.
(mips_elf_lay_out_got): Likewise.  Use mips_elf_count_got_symbols
to count the number of global GOT entries.
(_bfd_mips_elf_final_link): Unconditionally call
mips_elf_sort_hash_table.

15 years agobfd/
Richard Sandiford [Thu, 7 Aug 2008 19:58:38 +0000 (19:58 +0000)]
bfd/
* elfxx-mips.c (GGA_NORMAL, GGA_RELOC_ONLY, GGA_NONE): New macros.
(mips_elf_link_hash_entry): Add a "global_got_area" field.
(mips_elf_link_hash_newfunc): Initialize it.
(mips_elf_sort_hash_table_f): Use h->global_got_area instead of
h->root.got.offset.  Do not handle forced_local symbols specially.
(mips_elf_record_global_got_symbol): Set h->global_got_area
instead of h->root.got.offset.
(mips_elf_recreate_got): Assert that h->global_got_area == GGA_NONE
for indirect and warning symbols.
(mips_elf_count_forced_local_got_symbols): Change the argument
from a "elf_link_hash_entry" to "mips_elf_link_hash_entry".
Use and set h->global_got_area instead of h->root.got.offset.
Set it to GGA_NONE for all forced-local symbols.
(mips_elf_set_global_got_offset): Set h->global_got_area
instead of h->root.got.offset.  Use g->global_got_area instead
of a combination of dynindx, forced_local and tls_type.
(mips_elf_multi_got): Remove disabled code.  Pass GGA_* values to
mips_elf_set_global_got_offset.
(mips_elf_lay_out_got): Use mips_elf_link_hash_traverse instead
of elf_link_hash_traverse.
(_bfd_mips_elf_copy_indirect_symbol): Copy the indirect symbol's
global_got_area to the direct symbol if the latter's value is higher.
Set the indirect symbol's area to GGA_NONE.

ld/testsuite/
* ld-mips-elf/got-vers-1a.s, ld-mips-elf/got-vers-1b.s,
ld-mips-elf/got-vers-1.ver, ld-mips-elf/got-vers-1.dd,
ld-mips-elf/got-vers-1.sd, ld-mips-elf/got-vers-1.rd: New tests.
* ld-mips-elf/mips-elf.exp: Run them.

15 years agobfd/
Richard Sandiford [Thu, 7 Aug 2008 19:57:28 +0000 (19:57 +0000)]
bfd/
* elf32-mips.c (elf_backend_hide_symbol): Delete.
* elfn32-mips.c (elf_backend_hide_symbol): Likewise.
* elf64-mips.c (elf_backend_hide_symbol): Likewise.
* elfxx-mips.h (elf_backend_hide_symbol): Likewise.
* elfxx-mips.c (mips_elf_link_hash_entry): Remove "forced_local"
and add "needs_lazy_stub".
(mips_elf_link_hash_newfunc): Update accordingly.
(mips_elf_link_hash_table): Remove "computed_got_sizes" and
add "lazy_stub_count".
(_bfd_mips_elf_link_hash_table_create): Update accordingly.
(mips_elf_output_extsym): Use hd->needs_lazy_stub to detect
cases where a lazy stub is being used.
(mips_elf_sort_hash_table_f): Use h->root.forced_local instead
of h->forced_local.
(mips_elf_record_global_got_symbol): Use _bfd_elf_link_hash_hide_symbol
instead of _bfd_mips_elf_hide_symbol.  Do not increment local_gotno
here.
(mips_elf_allocate_dynamic_relocations): Move before new first use.
(mips_elf_check_recreate_got, mips_elf_recreate_got): New functions.
(mips_elf_resolve_final_got_entries): Move earlier in file.  Make at
most two passes over the hash table.  Use mips_elf_check_recreate_got
to see if there are any indirect or warning entries and
mips_elf_recreate_got to create a new GOT without them.
Return a boolean success value.
(mips_elf_count_forced_local_got_entries): New function.
(mips_elf_make_got_per_bfd): Check h->root.forced_local instead of
h->forced_local.
(mips_elf_set_global_got_offset): Likewise.
(mips_elf_set_no_stub): Replace with...
(mips_elf_forbid_lazy_stubs): ...this new function.
(mips_elf_resolve_final_got_entry): Delete.
(mips_elf_multi_got): Fix formatting.  Use mips_elf_forbid_lazy_stubs
instead of mips_elf_set_no_stub.  Move the code that sets
global offsets and allocates dynamic relocations from the main
_bfd_mips_elf_size_dynamic_sections loop to here.
(_bfd_mips_elf_adjust_dynamic_symbol): Do not allocate room in
.MIPS.stubs here; just set hmips->needs_lazy_stub and increment
htab->lazy_stub_count.
(_bfd_mips_elf_always_size_sections): Move the stub-estimation
code to mips_elf_estimate_stub_size and the GOT-sizing code to
mips_elf_lay_out_got.  Do not call these functions here.
(mips_elf_estimate_stub_size): New function, split
out from _bfd_mips_elf_always_size_sections.  Call
mips_elf_resolve_final_got_entries earlier.  Count the number
of forced-local entries.  Do not add stub sizes to loadable_size;
after this patch, the stub sizes are already included in the main
estimate.  Allocate dynamic relocations here rather than in the
main _bfd_mips_elf_size_dynamic_sections loop.
(mips_elf_estimate_stub_size): New function, split out from
_bfd_mips_elf_always_size_sections.
(mips_elf_allocate_lazy_stub): New function.
(mips_elf_lay_out_lazy_stubs): Likewise.
(_bfd_mips_elf_size_dynamic_sections): Call mips_elf_estimate_stub_size,
mips_elf_lay_out_got and mips_elf_lay_out_lazy_stubs.  Do not handle
the allocation of sreldyn specially.
(_bfd_mips_elf_hide_symbol): Delete.

ld/testsuite/
* ld-mips-elf/tlsdyn-o32-2.got, ld-mips-elf/tlsdyn-o32-3.got,
ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-3.d: Change the
GOT layout as follows:

         BEFORE                  AFTER
   +0x08 %call16(__tls_get_addr) %call16(__tls_get_addr)
   +0x0c %tlsldm(tlsbin_ld)      %gottprel(tlsvar_ie)
   +0x10   "  "                  %tlsgd(tlsvar_gd)
   +0x14 %tlsgd(tlsvar_gd)          "  "
   +0x18   "  "                  %tlsgd(tlsbin_gd)
   +0x1c %gottprel(tlsvar_ie)       "  "
   +0x20 %tlsgd(tlsbin_gd)       %tlsldm(tlsbin_ld)
   +0x24   "  "                     "  "
   +0x28 %gottprel(tlsbin_ie)    %gottprel(tlsbin_ie)

15 years agobfd/
Richard Sandiford [Thu, 7 Aug 2008 19:50:05 +0000 (19:50 +0000)]
bfd/
* elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning
symbols.

ld/testsuite/
* ld-mips-elf/reloc-estimate-1.d, ld-mips-elf/reloc-estimate-1.ld,
ld-mips-elf/reloc-estimate-1a.s, ld-mips-elf/reloc-estimate-1b.s:
New test.
* ld-mips-elf/mips-elf.exp: Run it.

15 years ago2008-08-06 Cary Coutant <ccoutant@google.com>
Cary Coutant [Thu, 7 Aug 2008 17:16:36 +0000 (17:16 +0000)]
2008-08-06  Cary Coutant <ccoutant@google.com>

* archive.cc (Archive::total_archives, Archive::total_members)
(Archive::total_members_loaded): New variables.
(Archive::setup): Add parameter.  Add option to preread
archive symbols.
(Archive::read_armap): Add counter.
(Archive::get_file_and_offset): New function.
(Archive::get_elf_object_for_member): New function.
(Archive::read_all_symbols): New function.
(Archive::read_symbols): New function.
(Archive::add_symbols): Add counters.
(Archive::include_all_members): Use armap to find members if it's
already built.
(Archive::include_member): Skip reading symbols if already read.
Factored code into Archive::get_file_and_offset and
Archive::get_elf_object_for_member.  Changed call to
Mapfile::report_include_archive_member.
(Archive::print_stats): New function.
* archive.h: Declare Object and Read_symbols_data classes.
(Archive::Archive): Add initializers for new members.
(Archive::setup): Add parameter.
(Archive::print_stats): New function.
(Archive::total_archives, Archive::total_members)
(Archive::total_members_loaded): New variables.
(Archive::get_file_and_offset): New function.
(Archive::get_elf_object_for_member): New function.
(Archive::read_all_symbols): New function.
(Archive::read_symbols): New function.
(Archive::Archive_member): New class.
(Archive::members_): New member.
(Archive::num_members_): New member.
* main.cc: Include archive.h.
(main): Call Archive::print_stats.
* mapfile.cc (Mapfile::report_include_archive_member): Delete
archive parameter; member_name is now the fully-decorated name.
* mapfile.h (Mapfile::report_include_archive_member): Likewise.
* options.h: (General_options): Add --preread-archive-symbols option.
* readsyms.cc (Read_symbols::do_read_symbols): Change call to
Archive::setup.

15 years agodaily update
Alan Modra [Thu, 7 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years agobfd/
Richard Sandiford [Wed, 6 Aug 2008 19:53:30 +0000 (19:53 +0000)]
bfd/
* elfxx-mips.c (mips_elf_link_hash_entry): Move bfd_boolean
fields to the end of the structure and make them single-bit
bitfields.
(mips_elf_link_hash_newfunc): Make the initialization statements
follow the new field order.

15 years agobfd/
Richard Sandiford [Wed, 6 Aug 2008 19:51:29 +0000 (19:51 +0000)]
bfd/
* elfxx-mips.c (_mips_elf_section_data): Remove the "u.got_info" field.
(mips_elf_link_hash_table): Add "sgot" and "got_info" fields.
(_bfd_mips_elf_link_hash_table_create): Initialize them.
(mips_elf_got_section): Always apply the !maybe_excluded behavior.
(mips_elf_got_info): Delete.
(mips_elf_initialize_tls_slots): Remove the DYNOBJ local variable.
Adjust the call to mips_elf_got_section.
(mips_elf_local_got_index): Don't call mips_elf_got_info.
Update the call to mips_elf_create_local_got_entry.
Use htab->got_info.
(mips_elf_global_got_index): Don't call mips_elf_got_info;
use htab->got_info and htab->sgot instead.
(mips_elf_got_page): Don't call mips_elf_got_info.  Update the
call to mips_elf_create_local_got_entry.
(mips_elf_got16_entry): Likewise.
(mips_elf_got_offset_from_index): Replace with DYNOBJ parameter
with an INFO parameter.  Don't call mips_elf_got_info; use htab->sgot
and htab->got_info instead.
(mips_elf_create_local_got_entry): Remove the GG and SGOT parameters.
Use htab->sgot and htab->got_info.
(mips_elf_sort_hash_table): Remove the DYNOBJ local variable.
Don't call mips_elf_got_info; use htab->got_info instead.
(mips_elf_record_global_got_symbol): Turn G from a paramter to
a local variable and read it from htab->got_info.
(mips_elf_record_local_got_symbol): Replace the G parameter with
an INFO parameter.  Make G a local variable and read it from
htab->got_info instead.
(mips_elf_record_got_page_entry): Likewise.
(mips_elf_multi_got): Remove the G parameter and make it a local
variable instead.  Read it from htab->got_info.
(mips_elf_create_got_section): Cache the GOT section in htab->sgot.
Store the GOT information in htab->got_info.
(mips_elf_calculate_relocation): Don't call mips_elf_got_section
and mips_elf_got_info; use htab->sgot and htab->got_info instead.
Adjust the calls to mips_elf_got_offset_from_index and
mips_elf_adjust_gp.
(_bfd_mips_elf_check_relocs): Remove the G and SGOT local variables.
Adjust the calls to mips_elf_record_local_got_symbol,
mips_elf_record_global_got_symbol and mips_elf_record_got_page_entry.
Use htab->sgot.
(_bfd_mips_elf_always_size_sections): Remove the DYNOBJ local variable.
Don't call mips_elf_got_info; use htab->sgot and htab->got_info instead.
Update the call to mips_elf_multi_got.
(_bfd_mips_elf_size_dynamic_sections): Don't call mips_elf_got_info;
use htab->got_info instead.
(_bfd_mips_elf_finish_dynamic_symbol): Update the call to
mips_elf_got_section.  Get the got_info from the hash table
rather than the GOT section.
(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
(_bfd_mips_elf_finish_dynamic_sections): Likewise.
(_bfd_mips_elf_hide_symbol): Don't call mips_elf_got_section;
get the got_info from the hash table instead.  Remove the GOT
local variable.
(_bfd_mips_elf_final_link): Likewise.  Also remove the DYNOBJ
local variable.

15 years agobfd/
Richard Sandiford [Wed, 6 Aug 2008 19:49:06 +0000 (19:49 +0000)]
bfd/
* elfxx-mips.c (mips_elf_link_hash_table): Add an "sstubs" field.
(_bfd_mips_elf_create_dynamic_sections): Use it to cache the stubs
section.  Don't check whether the section already exists.
(_bfd_mips_elf_adjust_dynamic_symbol): Use htab->sstubs.
(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
(_bfd_mips_elf_finish_dynamic_sections): Likewise.
(_bfd_mips_elf_size_dynamic_sections): Likewise.  Don't add the
dummy stub to an empty section.
(_bfd_mips_elf_link_hash_table_create): Initialize the "sstubs" field.

ld/testsuite/
* ld-mips-elf/tls-hidden3.ld: Remove the unused .MIPS.stubs section.
Keep the text start address the same.
* ld-mips-elf/tls-multi-got-1.got: We have removed a .MIPS.stubs
section that contained only a 16-byte dummy stub.  Subtract 16
from addresses to account for the change.
* ld-mips-elf/tls-multi-got-1.r: Likewise.  Adjust MIPS_UNREFEXTNO
to account the removed section symbol.
* ld-mips-elf/tlsdyn-o32-1.d: We have deleted a .MIPS.stubs
section that contained only a 16-byte dummy stub.  Remove it
from the disassembly.
* ld-mips-elf/tlsdyn-o32-2.d: Likewise.
* ld-mips-elf/tlsdyn-o32-3.d: Likewise.
* ld-mips-elf/tlsdyn-o32.d: Likewise.
* ld-mips-elf/relax-jalr-n32-shared.d: Likewise.
* ld-mips-elf/relax-jalr-n64-shared.d: Likewise.

15 years agobfd/
Richard Sandiford [Wed, 6 Aug 2008 19:44:47 +0000 (19:44 +0000)]
bfd/
* reloc.c (BFD_RELOC_MIPS16_GOT16, BFD_RELOC_MIPS16_CALL16): Declare.
* libbfd.h, bfd-in2.h: Regenerate.
* elf32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
(mips16_reloc_map): Add mappings.
* elf64-mips.c (mips16_elf64_howto_table_rel): Fill in reserved
R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
(mips16_elf64_howto_table_rela): Likewise.
(mips16_reloc_map): Add mappings.
* elfn32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
(elf_mips16_howto_table_rela): Likewise.
(mips16_reloc_map): Add mappings.
* elfxx-mips.c (mips_elf_create_shadow_symbol): New function.
(section_allows_mips16_refs_p): Likewise.
(mips16_stub_symndx): Likewise.
(mips_elf_check_mips16_stubs): Treat the data argument as a
bfd_link_info.  Mark every dynamic symbol as needing MIPS16 stubs
and create a "shadow" symbol for the original MIPS16 definition.
(mips16_reloc_p, got16_reloc_p, call16_reloc_p, hi16_reloc_p)
(lo16_reloc_p, mips16_call_reloc_p): New functions.
(_bfd_mips16_elf_reloc_unshuffle): Use mips16_reloc_p to generalize
relocation checks.
(_bfd_mips16_elf_reloc_shuffle): Likewise.
(_bfd_mips_elf_lo16_reloc): Handle R_MIPS16_GOT16.
(mips_elf_got16_entry): Add comment.
(mips_elf_calculate_relocation): Use hi16_reloc_p,
lo16_reloc_p, mips16_call_reloc_p, call16_reloc_p and got16_reloc_p
to generalize relocation checks.  Use section_allows_mips16_refs_p
instead of mips16_stub_section_p.   Handle R_MIPS16_CALL16 and
R_MIPS16_GOT16, allowing the former to refer directly to a
MIPS16 function if its stub is not needed.
(mips16_stub_section_p): Delete.
(_bfd_mips_elf_symbol_processing): Convert odd-valued function
symbols into even MIPS16 symbols.
(mips_elf_add_lo16_rel_addend): Use mips16_reloc_p to generalize
a relocation check.
(_bfd_mips_elf_check_relocs): Calculate "bed" and "rel_end"
earlier in the function.  Use mips16_stub_symndx to identify
the target function.  Avoid out-of-bounds accesses when the
stub has no relocations; report an error instead.  Use
section_allows_mips16_refs_p instead of mips16_stub_section_p.
Use mips16_call_reloc_p and got16_reloc_p to generalize relocation
checks.  Handle R_MIPS16_CALL16 and R_MIPS16_GOT16.  Don't create
dynamic relocations for absolute references to __gnu_local_gp.
(_bfd_mips_elf_always_size_sections): Pass a bfd_link_info as
the argument to mips_elf_check_mips16_stubs.  Generalize comment.
(_bfd_mips_elf_relocate_section): Use hi16_reloc_p and got16_reloc_p
to generalize relocation checks.
(_bfd_mips_elf_finish_dynamic_symbol): If a dynamic MIPS16 function
symbol has a non-MIPS16 stub, redirect the symbol to the stub.
Fix an overly long line.  Don't give dynamic symbols type STO_MIPS16.
(_bfd_mips_elf_gc_sweep_hook): Handle R_MIPS16_CALL16 and
R_MIPS16_GOT16.

gas/
* config/tc-mips.c (mips16_reloc_p, got16_reloc_p, hi16_reloc_p)
(lo16_reloc_p): New functions.
(reloc_needs_lo_p): Use hi16_reloc_p and got16_reloc_p to
generalize relocation checks.
(matching_lo_reloc): New function.
(fixup_has_matching_lo_p): Use it.
(mips16_mark_labels): Don't clobber a symbol's visibility.
(append_insn): Use hi16_reloc_p and lo16_reloc_p.
(mips16_ip): Handle BFD_RELOC_MIPS16_GOT16 and BFD_RELOC_MIPS16_CALL16.
(md_apply_fix): Likewise.
(mips16_percent_op): Add %got and %call16.
(mips_frob_file): Use got16_reloc_p to generalize relocation checks.
Use matching_lo_reloc.
(mips_force_relocation): Use hi16_reloc_p and lo16_reloc_p to
generalize relocation checks.
(mips_fix_adjustable): Use lo16_reloc_p to generalize relocation
checks.

gas/testsuite/
* gas/mips/elf-rel8-mips16.d, gas/mips/elf-rel8-mips16.s,
* gas/mips/elf-rel9-mips16.d, gas/mips/elf-rel9-mips16.s,
* gas/mips/elf-rel13-mips16.d, gas/mips/elf-rel13-mips16.s: New tests.
* gas/mips/mips.exp: Run them.

ld/testsuite/
* ld-mips-elf/mips16-local-stubs-1.d: Remove stub_for_h3,
which was only referenced by the .pdr section, and was not
actually needed by code.
* ld-mips-elf/mips16-intermix.d: Remove unused static function stubs.
* ld-mips-elf/mips16-pic-1a.s,
ld-mips-elf/mips16-pic-1b.s,
ld-mips-elf/mips16-pic-1-dummy.s,
ld-mips-elf/mips16-pic-1.dd,
ld-mips-elf/mips16-pic-1.gd,
ld-mips-elf/mips16-pic-1.inc,
ld-mips-elf/mips16-pic-1.ld,
ld-mips-elf/mips16-pic-2a.s,
ld-mips-elf/mips16-pic-2b.s,
ld-mips-elf/mips16-pic-2.ad,
ld-mips-elf/mips16-pic-2.dd,
ld-mips-elf/mips16-pic-2.gd,
ld-mips-elf/mips16-pic-2.nd,
ld-mips-elf/mips16-pic-2.rd: New tests.
* ld-mips-elf/mips-elf.exp: Run them.

15 years ago* NEWS: Mention these changes.
DJ Delorie [Wed, 6 Aug 2008 15:42:15 +0000 (15:42 +0000)]
* NEWS: Mention these changes.

* config/tc-h8300.h (H_TICK_HEX): Define.
* config/tc-h8300.c (OPTION_H_TICK_HEX): New.
(md_longopts): Add "-h-tick-hex".
(md_parse_option): Support it.
* doc/c-h8300.texi (H8/300 Options): Document it.
* doc/as.texinfo (Overview): Likewise.

* config/tc-sh.h (H_TICK_HEX): Define.
* config/tc-sh.c (OPTION_H_TICK_HEX): New.
(md_longopts): Add "-h-tick-hex".
(md_parse_option): Support it.
* doc/c-sh.texi (SH Options): Document it.
* doc/c-sh64.texi (SH64 Options): Document it.
* doc/as.texinfo (Overview): Likewise.

15 years ago * elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend.
Alan Modra [Wed, 6 Aug 2008 07:29:31 +0000 (07:29 +0000)]
* elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend.
(ppc_elf_relocate_section <R_PPC_RELAX32_PLT>): Don't bother here.

15 years agoadd pr number
Alan Modra [Wed, 6 Aug 2008 00:45:10 +0000 (00:45 +0000)]
add pr number

15 years agobinutils/
Alan Modra [Wed, 6 Aug 2008 00:42:17 +0000 (00:42 +0000)]
binutils/
* objcopy.c (copy_object): Don't setup_bfd_headers when extract_symbol.
(setup_section): Don't zero vma and lma when extract_symbol.
(copy_section): Discard relocations when extract_symbol.
* doc/binutils.texi: Update --extract-symbol description.
ld/testsuite/
* ld-elf/extract-symbol-1sec.d: Update.

15 years agodaily update
Alan Modra [Wed, 6 Aug 2008 00:00:06 +0000 (00:00 +0000)]
daily update

15 years ago * gmon_io.c (gmon_out_read): When reading old format gmon.out,
Brian Dessent [Tue, 5 Aug 2008 19:09:06 +0000 (19:09 +0000)]
* gmon_io.c (gmon_out_read): When reading old format gmon.out,
set num_histograms and hist_scale.

15 years ago PR gas/6656
Alan Modra [Tue, 5 Aug 2008 08:13:48 +0000 (08:13 +0000)]
PR gas/6656
* dwarf2dbg.c (dwarf2_directive_file): Disable gas generated
debug info if we see compiler generated debug info.
(dwarf2_directive_loc): Likewise.  Remove redundant debug_type test.

15 years ago * coffcode.h (coff_slurp_line_table): bfd_alloc lineno_cache first
Alan Modra [Tue, 5 Aug 2008 03:03:46 +0000 (03:03 +0000)]
* coffcode.h (coff_slurp_line_table): bfd_alloc lineno_cache first
so that we don't inadvertently free it.  Use bfd_alloc for sort
arrays, and memcpy sorted line table.

15 years agodaily update
Alan Modra [Tue, 5 Aug 2008 00:00:07 +0000 (00:00 +0000)]
daily update

15 years ago * symtab.h (Symbol::use_plt_offset): New function.
Ian Lance Taylor [Mon, 4 Aug 2008 22:22:13 +0000 (22:22 +0000)]
* symtab.h (Symbol::use_plt_offset): New function.
* i386.cc (Relocate::relocate): Call Symbol::use_plt_offset.
* powerpc.cc (Relocate::relocate): Likewise.
* sparc.cc (Relocate::relocate): Likewise.
* x86_64.cc (Relocate::relocate): Likewise.
* testsuite/weak_plt.sh: New test.
* testsuite/weak_plt_main.cc: New test.
* testsuite/weak_plt_shared.cc: New test.
* testsuite/Makefile.am (check_SCRIPTS): Add weak_plt.sh.
(check_PROGRAMS): Add weak_plt.
(check_DATA): Add weak_plt_shared.so.
(weak_plt_main_pic.o, weak_plt): New targets.
(weak_plt_shared_pic.o, weak_plt_shared.so): New targets.
* testsuite/Makefile.in: Rebuild.

* testsuite/Makefile.am (weak_alias_test_1.so): Depend upon
gcctestdir/ld.
(weak_alias_test_2.so, weak_alias_test_4.so): Likewise.
* testsuite/Makefile.in: Rebuild.

15 years ago * elf32-spu.c (spu_elf_auto_overlay): Use the maximum possible
Alan Modra [Mon, 4 Aug 2008 13:01:42 +0000 (13:01 +0000)]
* elf32-spu.c (spu_elf_auto_overlay): Use the maximum possible
if --fixed-space request is too large.

15 years ago * dwarf2dbg.c: Remove superfluous forward function declarations.
Alan Modra [Mon, 4 Aug 2008 10:55:48 +0000 (10:55 +0000)]
* dwarf2dbg.c: Remove superfluous forward function declarations.
(DWARF2_FORMAT): Add section arg.
(out_header): New function, split out from..
(out_debug_line): ..here.
(out_debug_aranges): Use out_header.
(out_debug_abbrev): Add info_seg and line_seg args.  Use
DW_FORM_data8 (for DW_AT_stmt_list) if line_seg is 64-bit.
(out_debug_info): Use out_header.  Output 8 byte DW_AT_stmt_list
if line_seg is 64-bit.
(dwarf2_finish): Adjust out_debug_abbrev call.
* config/tc-mips.h (DWARF2_FORMAT, mips_dwarf2_format): Add sec arg.
* config/tc-mips.c (mips_dwarf2_format): Likewise.

15 years agoSet LC_ALL=C rather than unsetting LC_COLLATE for sort.
Alan Modra [Mon, 4 Aug 2008 06:55:33 +0000 (06:55 +0000)]
Set LC_ALL=C rather than unsetting LC_COLLATE for sort.

15 years agodaily update
Alan Modra [Mon, 4 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago * readelf.c (get_osabi_name <ELFOSABI_AROS>): Change name.
Alan Modra [Sun, 3 Aug 2008 23:23:26 +0000 (23:23 +0000)]
* readelf.c (get_osabi_name <ELFOSABI_AROS>): Change name.

15 years ago * common.h (ELFOSABI_AROS): Update comment.
Alan Modra [Sun, 3 Aug 2008 23:20:42 +0000 (23:20 +0000)]
* common.h (ELFOSABI_AROS): Update comment.

15 years ago * mt-spu (all-ld): Update for ld Makefile changes.
Alan Modra [Sun, 3 Aug 2008 03:38:07 +0000 (03:38 +0000)]
* mt-spu (all-ld): Update for ld Makefile changes.

15 years ago * Makefile.am (spu_ovl.o): Merge rule into..
Alan Modra [Sun, 3 Aug 2008 03:26:03 +0000 (03:26 +0000)]
* Makefile.am (spu_ovl.o): Merge rule into..
(spu_ovl.o_c): ..this one.  Only run cpp for spu target.
* Makefile.in: Regenerate.

15 years agodaily update
Alan Modra [Sun, 3 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago * tcl.m4 (SC_PATH_TCLCONFIG): Add some simple logic to deal
Keith Seitz [Sat, 2 Aug 2008 21:20:13 +0000 (21:20 +0000)]
    * tcl.m4 (SC_PATH_TCLCONFIG): Add some simple logic to deal
        with cygwin.
        (SC_PATH_TKCONFIG): Likewise.

15 years ago Include the spu_ovl ASCII form in the repository files.
Jan Kratochvil [Sat, 2 Aug 2008 16:25:44 +0000 (16:25 +0000)]
Include the spu_ovl ASCII form in the repository files.
* emultempl/spuelf.em: No longer use `bin2c', use now `spu_ovl.o_c'.
* Makefile.am (eelf32_spu.c): Depend now on `spu_ovl.o_c'.
($(srcdir)/emultempl/spu_ovl.o_c): New target.
($(srcdir)/emultempl/spu_ovl.o): Rename to...
(spu_ovl.o): ...this one.
* Makefile.in: Regenerate.
* emultempl/spu_ovl.o_c: New file.
* emultempl/spu_ovl.o: File removed.

15 years ago * elf32-spu.c (mark_overlay_section): Move code calculating
Alan Modra [Sat, 2 Aug 2008 06:44:43 +0000 (06:44 +0000)]
* elf32-spu.c (mark_overlay_section): Move code calculating
max_overlay_size to correct block.
(spu_elf_auto_overlay): Don't use %x in einfo error message.

15 years agogas/
Peter Bergner [Sat, 2 Aug 2008 04:38:51 +0000 (04:38 +0000)]
gas/
* config/tc-ppc.c (parse_cpu): Rename altivec_or_spe to retain_flags.
Handle -mvsx and -mpower7.
(md_show_usage): Document -mpower7 and -mvsx.
* doc/as.texinfo (Target PowerPC): Document -mvsx.
* doc/c-ppc.texi (PowerPC-Opts): Document -mvsx and -mpower7.

gas/testsuite/
* gas/ppc/power7.d: New.
* gas/ppc/power7.s: Likewise.
* gas/ppc/ppc.exp: Run power7 test.

include/opcode/
* ppc.h (PPC_OPCODE_VSX, PPC_OPERAND_VSR): New.

opcodes/
* ppc-dis.c (powerpc_init_dialect): Handle power7 and vsx options.
(print_insn_powerpc): Prepend 'vs' when printing VSX registers.
(print_ppc_disassembler_options): Document -Mpower7 and -Mvsx.
* ppc-opc.c (insert_xt6): New static function.
(extract_xt6): Likewise.
(insert_xa6): Likewise.
(extract_xa6: Likewise.
(insert_xb6): Likewise.
(extract_xb6): Likewise.
(insert_xb6s): Likewise.
(extract_xb6s): Likewise.
(XS6, XT6, XA6, XB6, XB6S, DM, XX3, XX3DM, XX1_MASK, XX3_MASK,
XX3DM_MASK, PPCVSX): New.
(powerpc_opcodes): Add opcodes "lxvd2x", "lxvd2ux", "stxvd2x",
"stxvd2ux", "xxmrghd", "xxmrgld", "xxpermdi", "xvmovdp", "xvcpsgndp".

15 years agodaily update
Alan Modra [Sat, 2 Aug 2008 00:00:05 +0000 (00:00 +0000)]
daily update

15 years agoMissed ChangeLog entry for last change.
Pedro Alves [Fri, 1 Aug 2008 16:53:56 +0000 (16:53 +0000)]
Missed ChangeLog entry for last change.

* Makefile.am ($(srcdir)/ia64-asmtab.c): Remove line continuation.
* Makefile.in: Regenerate.

15 years ago * Makefile.am ($(srcdir)/ia64-asmtab.c): Remove line continuation.
Pedro Alves [Fri, 1 Aug 2008 14:35:06 +0000 (14:35 +0000)]
* Makefile.am ($(srcdir)/ia64-asmtab.c): Remove line continuation.
* Makefile.in: Regenerate.

15 years agobinutils/
H.J. Lu [Fri, 1 Aug 2008 14:21:30 +0000 (14:21 +0000)]
binutils/

2008-08-01  H.J. Lu  <hongjiu.lu@intel.com>

* dwarf.c (dwarf_regnames_i386): Remove AVX registers.
(dwarf_regnames_x86_64): Likewise.

gas/testsuite/

2008-08-01  H.J. Lu  <hongjiu.lu@intel.com>

* gas/cfi/cfi-i386.s: Remove tests for AVX register maps.
* gas/cfi/cfi-x86_64.s: Likewise.

* gas/cfi/cfi-i386.d: Updated.
* gas/cfi/cfi-x86_64.d: Likewise.

opcodes/

2008-08-01  H.J. Lu  <hongjiu.lu@intel.com>

* i386-reg.tbl: Use Dw2Inval on AVX registers.
* i386-tbl.h: Regenerated.

15 years ago * elfcore.h (elf_core_file_p): Ensure we have a backend match
Alan Modra [Fri, 1 Aug 2008 12:21:28 +0000 (12:21 +0000)]
* elfcore.h (elf_core_file_p): Ensure we have a backend match
with the correct arch size before rejecting the generic fallback.
* elfcode.h (elf_object_p): Likewise.  Ensure arch size matches
before accepting a target.

15 years ago * elf.c (rewrite_elf_program_header): Don't wrap p_paddr to
Alan Modra [Fri, 1 Aug 2008 06:39:04 +0000 (06:39 +0000)]
* elf.c (rewrite_elf_program_header): Don't wrap p_paddr to
include file or program headers.

15 years agogas/
Peter Bergner [Fri, 1 Aug 2008 02:44:12 +0000 (02:44 +0000)]
gas/
* config/tc-ppc.c (parse_cpu) <power6>: Accept Altivec instructions.
<cell>: Likewise.

gas/testsuite/
* gas/ppc/cell.s: Add altivec instructions.
* gas/ppc/cell.d: Update expected output.
* gas/ppc/power6.d: New.
* gas/ppc/power6.s: Likewise.
* gas/ppc/ppc.exp (powerpc64*-*-*): Move cell from here to...
(powerpc*-*-*): Here.  Run power6 test.