OSDN Git Service

pf3gnuchains/pf3gnuchains3x.git
15 years ago * readelf.c (target_specific_reloc_handling): New function:
Nick Clifton [Mon, 22 Jun 2009 08:46:13 +0000 (08:46 +0000)]
    * readelf.c (target_specific_reloc_handling): New function:
        Processes relocs in a target specific manner.
        (debug_apply_relocations): Use the new function.
        * dwarf.c (display_debug_loc): End the dump with a blank line.
        (struct debug_display): Enable reloc processing for .debug_aranges
        and .debug_loc sections.

15 years ago2009-06-22 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Mon, 22 Jun 2009 08:14:52 +0000 (08:14 +0000)]
2009-06-22  Tristan Gingold  <gingold@adacore.com>

* mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
the relocs array.

15 years ago * elfcpp.h (SHN_X86_64_LCOMMON): Define enum constant.
Ian Lance Taylor [Mon, 22 Jun 2009 06:56:05 +0000 (06:56 +0000)]
* elfcpp.h (SHN_X86_64_LCOMMON): Define enum constant.
(enum SHT): Add SHT_X86_64_UNWIND.
(enum SHF): Add SHT_X86_64_LARGE.

15 years agoFix ChangeLog e-mail address.
Ian Lance Taylor [Mon, 22 Jun 2009 06:52:11 +0000 (06:52 +0000)]
Fix ChangeLog e-mail address.

15 years ago * layout.cc (Layout::make_output_section): Call
Ian Lance Taylor [Mon, 22 Jun 2009 06:51:53 +0000 (06:51 +0000)]
* layout.cc (Layout::make_output_section): Call
Target::new_output_section.
(Layout::attach_allocated_section_to_segment): Put large section
sections in a separate load segment with the large segment flag
set.
(Layout::segment_precedes): Sort large data segments after other
load segments.
(align_file_offset): New static function.
(Layout::set_segment_offsets): Use align_file_offset.
* output.h (class Output_section): Add is_small_section_ and
is_large_section_ fields.
(Output_section::is_small_section): New function.
(Output_section::set_is_small_section):  New function.
(Output_section::is_large_section): New function.
(Output_section::set_is_large_section): New function.
(Output_section::is_large_data_section): New function.
(class Output_segment): Add is_large_data_segment_ field.
(Output_segment::is_large_data_segment): New function.
(Output_segment::set_is_large_data_segment): New function.
* output.cc (Output_section::Output_section): Initialize new
fields.
(Output_segment::Output_segment): Likewise.
(Output_segment::add_output_section): Add assertion that large
data sections always go in large data segments.  Force small data
sections to the end of the list of data sections.  Force small BSS
sections to the start of the list of BSS sections.  For large BSS
sections to the end of the list of BSS sections.
* symtab.h (class Symbol): Declare is_common_shndx.
(Symbol::is_defined): Check Symbol::is_common_shndx.
(Symbol::is_common): Likewise.
(class Symbol_table): Define enum Commons_section_type.  Update
declarations.  Add small_commons_ and large_commons_ fields.
* symtab.cc (Symbol::is_common_shndx): New function.
(Symbol_table::Symbol_table): Initialize new fields.
(Symbol_table::add_from_object): Put small and large common
symbols in the right list.
(Symbol_table::sized_finalized_symbol): Check
Symbol::is_common_shndx.
(Symbol_table::sized_write_globals): Likewise.
* common.cc (Symbol_table::do_allocate_commons): Allocate new
common symbol lists.  Don't call do_allocate_commons_list if the
list is empty.
(Symbol_table::do_allocate_commons_list): Remove is_tls
parameter.  Add comons_section_type parameter.  Change all
callers.  Handle small and large common symbols.
* object.cc (Sized_relobj::do_finalize_local_symbols): Check
Symbol::is_common_shndx.
* resolve.cc (symbol_to_bits): Likewise.
* target.h (Target::small_common_shndx): New function.
(Target::small_common_section_flags): New function.
(Target::large_common_shndx): New function.
(Target::large_common_section_flags): New function.
(Target::new_output_section): New function.
(Target::Target_info): Add small_common_shndx, large_common_shndx,
small_common_section_flags, and large_common_section_flags
fields.
(Target::do_new_output_section): New virtual function.
* arm.cc (Target_arm::arm_info): Initialize new fields.
* i386.cc (Target_i386::i386_info): Likewise.
* powerpc.cc (Target_powerpc::powerpc_info) [all versions]:
Likewise.
* sparc.c (Target_sparc::sparc_info) [all versions]: Likewise.
* x86_64.cc (Target_x86_64::x86_64_info): Likewise.
(Target_x86_64::do_new_output_section): New function.
* configure.ac: Define conditional MCMODEL_MEDIUM.
* testsuite/Makefile.am (check_PROGRAMS): Add large.
(large_SOURCES, large_CFLAGS, large_DEPENDENCIES): Define.
(large_LDFLAGS): Define.
* testsuite/large.c: New file.
* testsuite/testfile.cc (Target_test::test_target_info):
Initialize new fields.
* configure, testsuite/Makefile.in: Rebuild.

15 years agocpu/
Alan Modra [Mon, 22 Jun 2009 00:53:25 +0000 (00:53 +0000)]
cpu/
* m32c.opc (parse_lab_5_3): Use correct enum.
opcodes/
* m32c-asm.c: Regenerate.

15 years agoinclude/elf/
Alan Modra [Mon, 22 Jun 2009 00:52:20 +0000 (00:52 +0000)]
include/elf/
* ppc.h (R_PPC_RELAX*): Define as enum.
bfd/
* elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
* elf32-v850.c (v850_elf_relocate_section): Warning fix.

15 years ago * score-dis.c (print_insn_score48, print_insn_score32): Move default
Alan Modra [Mon, 22 Jun 2009 00:01:57 +0000 (00:01 +0000)]
* score-dis.c (print_insn_score48, print_insn_score32): Move default
case label to proper lexical block.
* score7-dis.c (print_insn_score32): Likewise.

15 years ago * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
Alan Modra [Mon, 22 Jun 2009 00:00:32 +0000 (00:00 +0000)]
* elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.

15 years agodaily update
Alan Modra [Mon, 22 Jun 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years agomerge from gcc
DJ Delorie [Sun, 21 Jun 2009 17:13:08 +0000 (17:13 +0000)]
merge from gcc

15 years agodaily update
Alan Modra [Sun, 21 Jun 2009 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Sat, 20 Jun 2009 13:13:11 +0000 (13:13 +0000)]
2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>

* elflink.c (elf_link_add_object_symbols): Avoid warning
from -Wjump-misses-init in gcc 4.5.0.

15 years ago PR 10302
Alan Modra [Sat, 20 Jun 2009 02:52:08 +0000 (02:52 +0000)]
PR 10302
* doc/as.texinfo (Section <ELF "M,S" flag>): Clarify tail merge.

15 years ago2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Sat, 20 Jun 2009 00:43:21 +0000 (00:43 +0000)]
2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_check_relocs): Properly check local
symbol on error.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.

15 years agodaily update
Alan Modra [Sat, 20 Jun 2009 00:00:08 +0000 (00:00 +0000)]
daily update

15 years agobfd/
H.J. Lu [Fri, 19 Jun 2009 16:00:33 +0000 (16:00 +0000)]
bfd/

2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_tls_transition): Add a parameter,
r_symndx.  Report local symbol name on error.
(elf_i386_check_relocs): Updated.  Report local symbol name on
error.
(elf_i386_gc_sweep_hook): Updated.
(elf_i386_relocate_section): Likewise.

* elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
r_symndx.  Report local symbol name on error.
(elf64_x86_64_check_relocs): Updated.  Report local symbol name
on error.
(elf64_x86_64_gc_sweep_hook): Updated.
(elf64_x86_64_relocate_section): Likewise.

ld/testsuite/

2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>

* ld-i386/i386.exp: Run tlsgd2.

* ld-i386/tlsgd2.d: New.
* ld-i386/tlsgd2.s: Likewise.

* ld-x86-64/tlsgd3.d: Updated.

15 years ago * ar.c (usage): Do not use #ifdef inside _("...).
Nick Clifton [Fri, 19 Jun 2009 15:05:23 +0000 (15:05 +0000)]
    * ar.c (usage): Do not use #ifdef inside _("...).
        * nm.c (usage): Likewise.

15 years ago * config/tc-s390.c (md_gather_operands): Accept an instruction
Martin Schwidefsky [Fri, 19 Jun 2009 10:58:27 +0000 (10:58 +0000)]
    * config/tc-s390.c (md_gather_operands): Accept an instruction
        without operands if all operands are tagged as optional.

15 years ago * s390-opc.c (INSTR_RR_0R_OPT, INSTR_RX_0RRD_OPT, MASK_RR_0R_OPT,
Martin Schwidefsky [Fri, 19 Jun 2009 10:55:42 +0000 (10:55 +0000)]
    * s390-opc.c (INSTR_RR_0R_OPT, INSTR_RX_0RRD_OPT, MASK_RR_0R_OPT,
        MASK_RX_0RRD_OPT): New instruction formats with optional arguments.
        * s390-opc.txt (nopr, nop): Use new instruction format.

15 years ago2009-06-19 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 19 Jun 2009 09:23:54 +0000 (09:23 +0000)]
2009-06-19  Tristan Gingold  <gingold@adacore.com>

* mach-o.c (bfd_mach_o_print_private_header): Fix format character.

15 years ago2009-06-19 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 19 Jun 2009 09:12:41 +0000 (09:12 +0000)]
2009-06-19  Tristan Gingold  <gingold@adacore.com>

* mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
(bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
(bfd_mach_o_valid): Ditto.
(bfd_mach_o_wide_p): Ditto.
(bfd_mach_o_canonicalize_reloc): Ditto.
(bfd_mach_o_build_commands): Ditto.
(bfd_mach_o_scan_read_thread): Ditto.
(bfd_mach_o_flatten_sections): Ditto.
(bfd_mach_o_scan_start_address): Ditto.
(bfd_mach_o_lookup_section): Ditto.
(bfd_mach_o_core_fetch_environment): Ditto.
(bfd_mach_o_write_contents): Ditto.  Handle reexport_dylib.
(bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
(bfd_mach_o_scan_write_symtab): Ditto.
Use macros instead of hard-coded values.
(bfd_mach_o_scan_read_symtab_symbol): Make the function static.
Use bfd_mach_o_get_data instead of direct access.  Use macros
instead of hard-coded values.
(bfd_mach_o_scan_read_symtab_strtab): Make the function static.
Remove sym argument and get section from mdata.
Move code into the else branch.
(bfd_mach_o_scan_read_symtab_symbols): Make the function static.
Remove sym argument and get section from mdata.  Adjust code.
(bfd_mach_o_scan_read_dylib): Move assertion into the created
switch (which replaces consecutive if statements).
(bfd_mach_o_scan_read_dysymtab): Rename seg to cmd.  Load
module table, table of content, indirect symbols and external
referenced symbols.
(bfd_mach_o_scan_read_symtab): Renames seg to symtab.  Set symtab
field.
(bfd_mach_o_scan_read_linkedit): New function.
(bfd_mach_o_scan_read_str): Ditto.
(bfd_mach_o_count_symbols): Simplify the code by using the symtab
field of mdata.
(bfd_mach_o_get_symtab_upper_bound): Remove check as
bfd_mach_o_count_symbols never returns an error.
(bfd_mach_o_canonicalize_symtab): Simplify the code by using the
symtab field (there might be only one symtab).
(bfd_mach_o_scan_read_command): Handle reexported dylib.
Handle sub frameworks, sub umbrella, sub library and sub client.
Read code signature and segment split info commands.
(bfd_mach_o_scan): Reindent.
(bfd_mach_o_xlat_name): New type.
(bfd_mach_o_print_flags): New function.
(bfd_mach_o_get_name): Ditto.
(bfd_mach_o_cpu_name): New variable.
(bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
(bfd_mach_o_section_type_name)
(bfd_mach_o_section_attribute_name)
(bfd_mach_o_load_command_name): New variables.
(bfd_mach_o_print_private_header): New function.
(bfd_mach_o_print_section_map): New function extracted from
bfd_mach_o_print_private_bfd_data.
(bfd_mach_o_print_section): Ditto.  Print more infos.
(bfd_mach_o_print_segment): Ditto.
(bfd_mach_o_print_dysymtab): Ditto.
(bfd_mach_o_bfd_print_private_bfd_data): Reworked.  Handle
load weak dylib, reexport dylib and id dylib.
Handle code signature and segment_split info.
Handle sub frameworks, sub umbrella, sub library and sub client.
(bfd_mach_o_section_get_nbr_indirect): New function.

* mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro.  Add comment.
(bfd_mach_o_header_flags): New enum to define header flags.
(bfd_mach_o_section_attribute): New enum to replace ...
(BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
these removed macros.
(BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
(bfd_mach_o_dylib_module): New type.
(BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
macros.
(bfd_mach_o_dylib_table_of_content): New type.
(BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
(bfd_mach_o_dylib_reference): New type.
(BFD_MACH_O_REFERENCE_SIZE): New macro.
(bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
modules, toc, references and indirect syms.
(BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
(bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
unused).  Add comment.
(bfd_mach_o_dylib_command): Ditto.
(bfd_mach_o_prebound_dylib_command): Ditto.
(bfd_mach_o_linkedit_command): New type.
(bfd_mach_o_str_command): New type.
(bfd_mach_o_load_command): Add linkedit and str fields.
(mach_o_data_struct): Add symtab field.
(bfd_get_mach_o_data): Renamed to ...
(bfd_mach_o_get_data): ... this new macro.
(bfd_mach_o_scan_read_symtab_symbol,
bfd_mach_o_scan_read_symtab_strtab,
bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.

* mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
instead of direct access.

15 years ago * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
Alan Modra [Fri, 19 Jun 2009 03:30:45 +0000 (03:30 +0000)]
* elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
R_PPC_PLTREL24 relocs.
(ppc_elf_relocate_section): Likewise.

15 years ago * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
Alan Modra [Fri, 19 Jun 2009 00:41:28 +0000 (00:41 +0000)]
* elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
pointer to sym hash.  Update all uses.
(update_plt_info): Likewise.  Don't check addend here.

15 years agodaily update
Alan Modra [Fri, 19 Jun 2009 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago * gas/cfi/cfi-common-7.s: Skip a multiple of four.
Alan Modra [Thu, 18 Jun 2009 23:16:05 +0000 (23:16 +0000)]
* gas/cfi/cfi-common-7.s: Skip a multiple of four.
* gas/cfi/cfi-common-7.d: Adjust.

15 years ago PR 10169
Nick Clifton [Thu, 18 Jun 2009 16:36:05 +0000 (16:36 +0000)]
    PR 10169
        * gas/tc-arm.c (do_t_ssat): Move common code from here...
        (do_t_usat): ... and here to...
        (do_t_ssat_usat): New function: ... here.  Add code to check that
        the shift value, if present, is in range.

        * gas/arm/thumb2_bad_reg.s: Add tests for SSAT and USAT with an
        out of range shift.
        * gas/arm/thumb2_bad_reg.l: Update expected error messages.

15 years ago2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Thu, 18 Jun 2009 15:49:39 +0000 (15:49 +0000)]
2009-06-18  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
bfd_sym_from_r_symndx.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.

15 years ago * elf-bfd.h (struct sym_sec_cache): Delete.
Alan Modra [Thu, 18 Jun 2009 14:18:29 +0000 (14:18 +0000)]
* elf-bfd.h (struct sym_sec_cache): Delete.
(struct sym_cache): New.
(bfd_section_from_r_symndx): Delete prototype.
(bfd_sym_from_r_symndx): Define prototype.
* elf.c (bfd_section_from_r_symndx): Delete, replace with..
(bfd_sym_from_r_symndx): ..new function.
* elf32-arm.c: Update all uses of struct sym_sec_cache and
bfd_section_from_r_symndx to new struct and function.
* elf32-bfin.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-i386.c: Likewise.
* elf32-m32r.c: Likewise.
* elf32-m68hc1x.c: Likewise.
* elf32-m68hc1x.h: Likewise.
* elf32-m68k.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-sh.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-s390.c: Likewise.
* elf64-x86-64.c: Likewise.
* elfxx-sparc.c: Likewise.
* elfxx-sparc.h: Likewise.

15 years ago2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Thu, 18 Jun 2009 12:49:41 +0000 (12:49 +0000)]
2009-06-18  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.

15 years ago * elflink.c (elf_link_sort_relocs): Return early if there are no
Nick Clifton [Thu, 18 Jun 2009 10:48:58 +0000 (10:48 +0000)]
    * elflink.c (elf_link_sort_relocs): Return early if there are no
        relocs to sort.

15 years agoFix formatting of recent entry
Nick Clifton [Thu, 18 Jun 2009 10:41:42 +0000 (10:41 +0000)]
Fix formatting of recent entry

15 years ago PR 10288
Nick Clifton [Thu, 18 Jun 2009 10:31:21 +0000 (10:31 +0000)]
    PR 10288
        * arm-dis.c (print_insn_coprocessor): Check that a user specified
        ARM architecture supports the matched instruction.
        (print_insn_arm): Likewise.
        (select_arm_features): New function.  Fills in the fields of an
        arm_feature_set structure based on a given arm machine number.
        (print_insn): Initialise an arm_feature_set structure.

        * objdump.c (disassemble_bytes): Set the
        USER_SPECIFIED_MACHINE_TYPE flag in the disassemble_info structure
        if the user has invoked the -m switch.
        * doc/binutils.texi: Document the additional behaviour of
        objdump's -m switch for ARM targets.

        * dis-asm.h (USER_SPECIFIED_MACHINE_TYPE): New value for the flags
        field of struct disassemble_info.

        * gas/arm/align.s: Add labels so that COFF based targets can
        correctly locate THUMB code.
        * gas/arm/copro.d: Do not pass --architecture switch to objdump.

15 years ago * ld-pe/pe-run.exp (proc test_direct_link_dll): Always pass
Dave Korn [Thu, 18 Jun 2009 02:47:51 +0000 (02:47 +0000)]
* ld-pe/pe-run.exp (proc test_direct_link_dll):  Always pass
--enable-auto-import to the linker.
* ld-pe/vers-script-1.d:  Replace '\$' by '_' in all symbol names.
* ld-pe/vers-script-3.d:  Likewise.
* ld-pe/vers-script-4.d:  Likewise.
* ld-pe/vers-script-dll.c:  Likewise.
* lib/ld-lib.exp (proc is_pecoff_format):  Also return true for
"*-*-cegcc*" targets.

15 years ago2009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
Dave Korn [Thu, 18 Jun 2009 02:11:03 +0000 (02:11 +0000)]
2009-06-18  Dave Korn  <dave.korn.cygwin@gmail.com>

Merge cegcc and mingw32ce target name changes from CeGCC project,
replacing "arm-*-" by "arm*-*-" where needed.

  2008-09-24  Pedro Alves  <pedroalves@users.sourceforge.net>

ld/
* configure.tgt (arm*-*-cegcc*): Set LIB_PATH to
${tooldir}/lib/w32api.

  2007-12-25  Pedro Alves  <pedro_alves@portugalmail.pt>

bfd/
* config.bfd: Add arm*-*-cegcc* target.

  2007-12-25  Pedro Alves  <pedro_alves@portugalmail.pt>

binutils/
* configure.in: Add arm*-*-cegcc* and arm*-*-mingw32ce* targets.
* configure: Regenerate.

  2007-12-25  Pedro Alves  <pedro_alves@portugalmail.pt>

gas/
* configure.tgt: Add arm*-*-cegcc* target.

  2007-12-25  Pedro Alves  <pedro_alves@portugalmail.pt>

ld/
* configure.tgt: Add arm*-*-cegcc* target.

  2007-12-17  Pedro Alves  <pedro_alves@portugalmail.pt>

bfd/
* config.bfd: Add arm-*-mingw32ce* target.

  2007-12-17  Pedro Alves  <pedro_alves@portugalmail.pt>

gas/
* configure.tgt: Add arm-*-mingw32ce* target.

  2007-12-17  Pedro Alves  <pedro_alves@portugalmail.pt>

ld/
* configure.tgt: Add arm-*-mingw32ce* target.

15 years ago2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Thu, 18 Jun 2009 00:45:14 +0000 (00:45 +0000)]
2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>

* elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
* elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.

2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>

* elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
* elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
* elf32-i386.c (elf_i386_check_relocs): Use it.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.

2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>

* elf-bfd.h (elf_dyn_relocs): New.

* elf32-i386.c (elf_i386_dyn_relocs): Removed.
(elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
elf_dyn_relocs.
(elf_i386_copy_indirect_symbol): Likewise.
(elf_i386_check_relocs): Likewise.
(elf_i386_gc_sweep_hook): Likewise.
(elf_i386_allocate_dynrelocs): Likewise.
(elf_i386_readonly_dynrelocs): Likewise.
(elf_i386_size_dynamic_sections): Likewise.

* elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
(elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
with elf_dyn_relocs.
(elf64_x86_64_copy_indirect_symbol): Updated.
(elf64_x86_64_check_relocs): Likewise.
(elf64_x86_64_gc_sweep_hook): Likewise.
(elf64_x86_64_adjust_dynamic_symbol): Likewise.
(elf64_x86_64_allocate_dynrelocs): Likewise.
(elf64_x86_64_readonly_dynrelocs): Likewise.
(elf64_x86_64_size_dynamic_sections): Likewise.

15 years agodaily update
Alan Modra [Thu, 18 Jun 2009 00:00:09 +0000 (00:00 +0000)]
daily update

15 years ago2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Wed, 17 Jun 2009 18:08:35 +0000 (18:08 +0000)]
2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-arm.c (create_got_section): Get existing .rela.got
section.
* elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
* elf32-lm32.c (create_got_section): Likewise.
* elf32-m32r.c (create_got_section): Likewise.
* elf32-ppc.c (ppc_elf_create_got): Likewise.
* elf32-s390.c (create_got_section): Likewise.
* elf32-sh.c (create_got_section): Likewise.
* elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
* elf64-s390.c (create_got_section): Likewise.
* elfxx-sparc.c (create_got_section): Likewise.

* elflink.c (_bfd_elf_create_got_section): Properly initialize
the GOT size.

15 years ago2009-06-17 Michael Eager <eager@eagercon.com>
Jeff Johnston [Wed, 17 Jun 2009 16:35:15 +0000 (16:35 +0000)]
2009-06-17  Michael Eager <eager@eagercon.com>

        * COPYING.LIBGLOSS: Add Xilinx license.

15 years agoUndo accidental checkin of bogus change
Phil Blundell [Wed, 17 Jun 2009 15:46:18 +0000 (15:46 +0000)]
Undo accidental checkin of bogus change

15 years agodaily update
Alan Modra [Wed, 17 Jun 2009 00:00:07 +0000 (00:00 +0000)]
daily update

15 years ago2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Tue, 16 Jun 2009 17:45:08 +0000 (17:45 +0000)]
2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>

* elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.

* elf32-i386.c (elf_i386_local_hash): Removed.
(elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
(elf_i386_get_local_sym_hash): Likewise.

* elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
(elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
(elf64_x86_64_get_local_sym_hash): Likewise.
* elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
(get_local_sym_hash): Likewise.

15 years ago2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Tue, 16 Jun 2009 15:52:41 +0000 (15:52 +0000)]
2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>

* elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
rel_got_sec and plt_sec.
(elfNN_ia64_relax_section): Updated.
(elfNN_ia64_create_dynamic_sections): Likewise.
(get_got): Likewise.
(allocate_dynrel_entries): Likewise.
(elfNN_ia64_size_dynamic_sections): Likewise.
(set_got_entry): Likewise.
(elfNN_ia64_choose_gp): Likewise.
(elfNN_ia64_relocate_section): Likewise.
(elfNN_ia64_finish_dynamic_symbol): Likewise.
(elfNN_ia64_finish_dynamic_sections): Likewise.

15 years ago * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
Ulrich Weigand [Tue, 16 Jun 2009 13:44:00 +0000 (13:44 +0000)]
* elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
also for calls.

15 years ago2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Tue, 16 Jun 2009 13:41:10 +0000 (13:41 +0000)]
2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>

* configure.in (elf): Add elf-ifunc.lo.

* configure: Regenerated.
* Makefile.in: Likewise.

* elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.

* elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
irelifunc.
(elf_i386_link_hash_table_create): Likewise.
(elf_i386_create_dynamic_sections): Likewise.
(elf_i386_check_relocs): Likewise.
(elf_i386_allocate_dynrelocs): Likewise.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Likewise.
(elf_i386_finish_dynamic_symbol): Likewise.
(elf_i386_finish_dynamic_sections): Likewise.
(elf_i386_create_got_section): Removed.

* elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
irelifunc.
(elf64_x86_64_compute_jump_table_size): Updated.
(elf64_x86_64_link_hash_table_create): Likewise.
(elf64_x86_64_create_dynamic_sections): Likewise.
(elf64_x86_64_check_relocs): Likewise.
(elf64_x86_64_allocate_dynrelocs): Likewise.
(elf64_x86_64_size_dynamic_sections): Likewise.
(elf64_x86_64_relocate_section): Likewise.
(elf64_x86_64_finish_dynamic_symbol): Likewise.
(elf64_x86_64_finish_dynamic_sections): Likewise.
(elf64_x86_64_create_got_section): Removed.

* elflink.c (_bfd_elf_create_got_section): Use log_file_align
for pointer alignment.  Set up section pointers.
(_bfd_elf_create_dynamic_sections): Likewise.
(_bfd_elf_create_ifunc_sections): Moved to ...
* elf-ifunc.c: Here.  New.

* Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
(BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
Run "make dep-am".

15 years agomerge from gcc
DJ Delorie [Tue, 16 Jun 2009 13:21:26 +0000 (13:21 +0000)]
merge from gcc

15 years ago PR 10197
Nick Clifton [Tue, 16 Jun 2009 12:44:35 +0000 (12:44 +0000)]
    PR 10197
        * testsuite/test-demangle.c: Rename getline to get_line to avoid
        conflicts with system function of the same name.

15 years ago * corefile.c (cmp_symbol_map): New function.
Nick Clifton [Tue, 16 Jun 2009 11:49:12 +0000 (11:49 +0000)]
    * corefile.c (cmp_symbol_map): New function.
        (read_function_mappins): Use qsort to sort the symbols.
        (search_mapped_symbol): New function.
        (core_create_function_syms): Use bsearch to find symbols.
        * corefile.h (struct function_map): Add new bit-field: is_first.
        * cg_print.c (cmp_symbol_map): New function.
        (cg_print_file_ordering): Sort the symbol map.

15 years ago * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
Nick Clifton [Tue, 16 Jun 2009 11:33:42 +0000 (11:33 +0000)]
 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
   to bfd_signed_vma.  Cast constant operands which are used in
   offset related expressions to bfd_signed_vma type as appropriate.

15 years agobfd/
Maciej W. Rozycki [Tue, 16 Jun 2009 02:23:09 +0000 (02:23 +0000)]
bfd/
* elf32-vax.c (elf_vax_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.

opcodes/
* vax-dis.c (is_function_entry): Return success for synthetic
symbols too.
(is_plt_tail): New function.
(print_insn_vax): Decode PLT entry offset longword.

15 years agobfd/
Maciej W. Rozycki [Tue, 16 Jun 2009 02:16:54 +0000 (02:16 +0000)]
bfd/
* elf32-vax.c (elf_vax_reloc_type_class): New function.
(elf_backend_reloc_type_class): Define.

15 years agobfd/
Maciej W. Rozycki [Tue, 16 Jun 2009 02:14:12 +0000 (02:14 +0000)]
bfd/
* elf32-vax.c (elf_vax_relocate_section): For symbol references
from an executable to a shared library treat R_VAX_PC32
relocations as R_VAX_PLT32 ones.

15 years agobfd/
Maciej W. Rozycki [Tue, 16 Jun 2009 02:07:22 +0000 (02:07 +0000)]
bfd/
* elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
symbols in GOT space calculation.
(elf_vax_relocate_section): Adjust accordingly.

15 years agobfd/
Maciej W. Rozycki [Tue, 16 Jun 2009 01:57:39 +0000 (01:57 +0000)]
bfd/
* elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
include <R11:R2>.

15 years agobfd/
Maciej W. Rozycki [Tue, 16 Jun 2009 01:52:13 +0000 (01:52 +0000)]
bfd/
* elf32-vax.c (elf_vax_check_relocs): Handle the visibility
attribute.
(elf_vax_relocate_section): Likewise.

gas/
* config/tc-vax.c (md_estimate_size_before_relax): Accept
indirect symbol references in the PIC mode and emit a
PC-relative relocation instead of a GOT/PLT one.  Likewise
for symbols known to be hidden at this point.

15 years agodaily update
Alan Modra [Tue, 16 Jun 2009 00:00:36 +0000 (00:00 +0000)]
daily update

15 years ago2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Mon, 15 Jun 2009 18:25:20 +0000 (18:25 +0000)]
2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.

15 years ago2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Mon, 15 Jun 2009 17:23:43 +0000 (17:23 +0000)]
2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_check_relocs): Reformat.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.

15 years ago PR 10186
Nick Clifton [Mon, 15 Jun 2009 15:42:36 +0000 (15:42 +0000)]
    PR 10186
        * arm-dis.c (thumb32_opcodes): Fix binary value of SEV.W
        instruction.

        * gas/arm/thumb32.d: Fix expected binary value of SEV.W instruction.

        * config/tc-arm.c (T16_32_TAB): Fix binary value of SEV.W
        instruction.

15 years ago PR 10173
Nick Clifton [Mon, 15 Jun 2009 15:24:52 +0000 (15:24 +0000)]
    PR 10173
        * cr16-dis.c (print_arg): Avoid printing the 0x prefix twice.

15 years ago2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Mon, 15 Jun 2009 14:36:33 +0000 (14:36 +0000)]
2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>

* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerated.

15 years ago * configure.ac: Define is_elf for QNX Neutrino targets.
Nick Clifton [Mon, 15 Jun 2009 14:08:41 +0000 (14:08 +0000)]
    * configure.ac: Define is_elf for QNX Neutrino targets.
        * configure: Regenerate.

15 years ago2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Mon, 15 Jun 2009 13:28:56 +0000 (13:28 +0000)]
2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>

* ld-ifunc/ifunc-9-x86.d: Fix a typo.

15 years ago2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Mon, 15 Jun 2009 13:12:33 +0000 (13:12 +0000)]
2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.

15 years ago PR 10263
Nick Clifton [Mon, 15 Jun 2009 11:37:26 +0000 (11:37 +0000)]
    PR 10263
        * arm-dis.c (print_insn): Ignore is_data if the user has requested
        the disassembly of data as well as instructions.

        * objdump.c (disassemble_bytes): Set the DISASSEMBLE_DATA bit in
        the flags field of the disassemble_info structure if the -D switch
        is in operation.

        * dis-asm.h (struct disassemble_info): New value for the flags
        field.

15 years ago * po/ru.po: New Russian translation.
Nick Clifton [Mon, 15 Jun 2009 08:52:20 +0000 (08:52 +0000)]
    * po/ru.po: New Russian translation.
        * configure.in (ALL_LINGUAS): Add ru.
        * configure: Regenerate.

15 years ago * corefile.c (core_create_syms_from): Use BFD_VMA_FMT when
Nick Clifton [Mon, 15 Jun 2009 08:48:49 +0000 (08:48 +0000)]
    * corefile.c (core_create_syms_from): Use BFD_VMA_FMT when
        scanning in an address.

15 years ago2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Mon, 15 Jun 2009 00:37:08 +0000 (00:37 +0000)]
2009-06-14  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c: Remove duplicated comments.

15 years agodaily update
Alan Modra [Mon, 15 Jun 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years agobfd/
H.J. Lu [Sun, 14 Jun 2009 22:13:30 +0000 (22:13 +0000)]
bfd/

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

PR ld/10270
* elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
dynamic IFUNC pointer in non-shared object.  Use .got.plt
for IFUNC definition in PIE.
(elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
PIE locally.

* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
dynamic IFUNC pointer in non-shared object.  Use .got.plt
for IFUNC definition in PIE.
(elf64_x86_64_relocate_section): Resolve IFUNC definition in
PIE locally.

ld/testsuite/

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

PR ld/10270
* ld-ifunc/ifunc-9-x86.d: New.
* ld-ifunc/ifunc-9-x86.s: Likewise.

15 years ago * cgen.sh: Handle multiple simultaneous runs for parallel makes.
Doug Evans [Sun, 14 Jun 2009 16:36:56 +0000 (16:36 +0000)]
* cgen.sh: Handle multiple simultaneous runs for parallel makes.

15 years ago2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Sun, 14 Jun 2009 05:53:55 +0000 (05:53 +0000)]
2009-06-13  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_relocate_section): Properly report
local symbol for unhandled relocation against STT_GNU_IFUNC
symbol.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.

15 years ago2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
H.J. Lu [Sun, 14 Jun 2009 05:45:09 +0000 (05:45 +0000)]
2009-06-13  H.J. Lu  <hongjiu.lu@intel.com>

* elf32-i386.c (elf_i386_check_relocs): Properly report
local symbol for unhandled relocation against STT_GNU_IFUNC
symbol.
* elf64-x86-64.c (elf64_x86_64_check_relocs):  Likewise.

15 years agobfd/
H.J. Lu [Sun, 14 Jun 2009 01:39:46 +0000 (01:39 +0000)]
bfd/

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

PR ld/10269
* elf32-i386.c: Include "objalloc.h" and "hashtab.h".
(elf_i386_link_hash_table): Add loc_hash_table and
loc_hash_memory.
(elf_i386_local_hash): New.
(elf_i386_local_htab_hash): Likewise.
(elf_i386_local_htab_eq): Likewise.
(elf_i386_get_local_sym_hash): Likewise.
(elf_i386_link_hash_table_free): Likewise.
(elf_i386_allocate_local_dynrelocs): Likewise.
(elf_i386_finish_local_dynamic_symbol): Likewise.
(bfd_elf64_bfd_link_hash_table_free): Likewise.
(elf_i386_link_hash_table_create): Create loc_hash_table and
loc_hash_memory.
(elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Likewise.
(elf_i386_finish_dynamic_sections): Likewise.
(elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
isn't NULL.

* elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
(elf64_x86_64_link_hash_table): Add loc_hash_table and
loc_hash_memory.
(elf64_x86_64_local_hash): New.
(elf64_x86_64_local_htab_hash): Likewise.
(elf64_x86_64_local_htab_eq): Likewise.
(elf64_x86_64_get_local_sym_hash): Likewise.
(elf64_x86_64_link_hash_table_free): Likewise.
(elf64_x86_64_allocate_local_dynrelocs): Likewise.
(elf64_x86_64_finish_local_dynamic_symbol): Likewise.
(bfd_elf64_bfd_link_hash_table_free): Likewise.
(elf64_x86_64_link_hash_table_create): Create loc_hash_table
and loc_hash_memory.
(elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
symbols.
(elf64_x86_64_size_dynamic_sections): Likewise.
(elf64_x86_64_relocate_section): Likewise.
(elf64_x86_64_finish_dynamic_sections): Likewise.
(elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
sym isn't NULL.

gas/

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

PR ld/10269
* config/tc-i386.c (md_apply_fix): Use TC_FORCE_RELOCATION
instead of generic_force_reloc.

* config/tc-i386.h (TC_FORCE_RELOCATION): New.

ld/testsuite/

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

PR ld/10269
*: ld-ifunc/ifunc-1-local-x86.d: New.
*: ld-ifunc/ifunc-1-local-x86.s: Likewise.
*: ld-ifunc/ifunc-2-local-i386.d: Likewise.
*: ld-ifunc/ifunc-2-local-i386.s: Likewise.
*: ld-ifunc/ifunc-2-local-x86-64.d: Likewise.
*: ld-ifunc/ifunc-2-local-x86-64.s: Likewise.
*: ld-ifunc/ifunc-4-local-x86.d: Likewise.
*: ld-ifunc/ifunc-4-local-x86.s: Likewise.
*: ld-ifunc/ifunc-5-local-i386.s: Likewise.
*: ld-ifunc/ifunc-5-local-x86-64.s: Likewise.
*: ld-ifunc/ifunc-5a-local-i386.d: Likewise.
*: ld-ifunc/ifunc-5a-local-x86-64.d: Likewise.
*: ld-ifunc/ifunc-5b-local-i386.d: Likewise.
*: ld-ifunc/ifunc-5b-local-x86-64.d: Likewise.

15 years agodaily update
Alan Modra [Sun, 14 Jun 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years agodaily update
Alan Modra [Sat, 13 Jun 2009 00:00:06 +0000 (00:00 +0000)]
daily update

15 years ago * corefile.c (num_of_syms_in): New function - computes the number
Nick Clifton [Fri, 12 Jun 2009 15:33:30 +0000 (15:33 +0000)]
    * corefile.c (num_of_syms_in): New function - computes the number
        of symbols in a given file.
        (core_create_syms_from): New function - populates a symbol table
        from the symbols found in a specified file.
        * corefile.h: Prototype core_create_syms_from.
        * gprof.c (long_options): Add --external-symbol-table.
        (usage): Mention it.
        (main): Initiailize external_symbol_table from
        --external-symbol-table option.  If set use it.
        * gprof.texi: Document the new option.

        * NEWS: Mention new feature added to gprof.

15 years ago2009-06-10 Philip Blundell <philb@gnu.org>
Phil Blundell [Fri, 12 Jun 2009 14:27:21 +0000 (14:27 +0000)]
2009-06-10  Philip Blundell  <philb@gnu.org>

* emultempl/armelf.em (gld${EMULATION_NAME}_finish): Avoid crash
if section has no ELF data.

15 years ago2009-06-10 Philip Blundell <philb@gnu.org>
Phil Blundell [Fri, 12 Jun 2009 14:26:08 +0000 (14:26 +0000)]
2009-06-10  Philip Blundell  <philb@gnu.org>

* elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
elf_sec->this_hdr == NULL.

15 years ago * readelf.c (process_symbol_table): Set gnubuckets to NULL after
Nick Clifton [Fri, 12 Jun 2009 13:54:44 +0000 (13:54 +0000)]
    * readelf.c (process_symbol_table): Set gnubuckets to NULL after
        freeing it and before returning.

15 years ago* opncls.c (_maybe_make_executable): New function. Gives execute
Nick Clifton [Fri, 12 Jun 2009 12:04:19 +0000 (12:04 +0000)]
* opncls.c (_maybe_make_executable): New function.  Gives execute
        permission to an executable bfd that was opened for writing
        provided that it is a regular file.  Replaces common code found in...
        (bfd_close): here and ...
        (bfd_close_all_done): here.

15 years ago * readelf.c (process_symbol_table): Don't return early if
Jakub Jelinek [Fri, 12 Jun 2009 10:19:54 +0000 (10:19 +0000)]
* readelf.c (process_symbol_table): Don't return early if
.hash/.gnu.hash is empty/unusable and not -D.

15 years ago2009-06-12 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Fri, 12 Jun 2009 09:15:46 +0000 (09:15 +0000)]
2009-06-12  Tristan Gingold  <gingold@adacore.com>

* reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
* bfd-in2.h: Regenerated.
* libbfd.h: Regenerated.

* mach-o.c (FILE_ALIGN): New macro.
(bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
(bfd_mach_o_print_symbol): Ditto.
(bfd_mach_o_scan_write_thread): Adjust type of variable offset.
(bfd_mach_o_get_reloc_upper_bound): New function.
(bfd_mach_o_canonicalize_reloc): Ditto.
(bfd_mach_o_scan_write_relocs): Ditto.
(bfd_mach_o_scan_write_section_32): Remove offset argument.
(bfd_mach_o_scan_write_section_64): Ditto.
(bfd_mach_o_scan_write_segment_32): Write relocs.  Fix size of data
written for load command.  Do not compute section file offset.
(bfd_mach_o_scan_write_segment_64): Ditto.
(bfd_mach_o_scan_write_symtab): Compute file offset first.
Adjust for bfd_mach_o_asymbol.  Move code to convert from BFD to
Mach-O to ...
(bfd_mach_o_mangle_symbols): ... this new function.
(bfd_mach_o_write_contents): Be sure to habe load commands built.
Call bfd_mach_o_mangle_symbols.
(bfd_mach_o_build_commands): Adjust for filelen field.
Use FILE_ALIGN macro.  Clear section file offset if section is empty.
Do not set symtab file offset anymore here.
(bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
(bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
Set reloc_count and rel_filepos section fields.
(bfd_mach_o_scan_read_section_32): Type of argument offset is now
unsigned int.
(bfd_mach_o_scan_read_section_64): Ditto.
(bfd_mach_o_scan_read_section): Ditto.
(bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
bfd_mach_o_asymbol.  Use unsigned int for file offset type.
(bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
Handle weak-ref symbols.
(bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
(bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
(bfd_mach_o_scan): Remove assignment to removed field.
(bfd_mach_o_mkobject_init): Ditto.
(bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
(bfd_mach_o_bfd_reloc_type_lookup): New macro.
(bfd_mach_o_bfd_reloc_name_lookup): Ditto.
(bfd_mach_o_swap_reloc_in): Ditto.
(bfd_mach_o_swap_reloc_out): Ditto.

* mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
(BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
(BFD_MACH_O_REFERENCE_FLAG_DEFINED)
(BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
(BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
(BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
(BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
(BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
(BFD_MACH_O_N_WEAK_DEF): New macros.
Add comments.
(bfd_mach_o_section_type): Add new enumeration values.
(BFD_MACH_O_S_SELF_MODIFYING_CODE)
(BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
(BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
(BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
macros.
(BFD_MACH_O_GENERIC_RELOC_VANILLA)
(BFD_MACH_O_GENERIC_RELOC_PAIR)
(BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
(BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
(BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
(BFD_MACH_O_RELENT_SIZE): Ditto.
(BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
(BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
(BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
(BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
(BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
(BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
(BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
(BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
(bfd_mach_o_reloc_info): New struct.
(bfd_mach_o_asymbol): New struct.
(bfd_mach_o_symtab_command): The symbols field is now of type
bfd_mach_o_asymbol.
(bfd_mach_o_load_command): The offset and len fields are now of type
unsigned int.
(mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
Add a filelen field.  Add comments.
(bfd_mach_o_backend_data): New struct.
(bfd_mach_o_get_backend_data): New macro.
(bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
bfd_mach_o_asymbol.
(bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
(bfd_mach_o_get_reloc_upper_bound): New prototype.
(bfd_mach_o_canonicalize_reloc): Ditto.

* mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
duplicated macro.  Now defined to _bfd_generic_is_local_label.
(TARGET_NAME_BACKEND): New macro...
(TARGET_NAME_BACKEND): ... used to name a new variable.
(TARGET_NAME): Define relocs table using bfd_mach_o, reference
Mach-O backend data.

* mach-o-i386.c (i386_howto_table): New variable.
(bfd_mach_o_i386_swap_reloc_in): New function.
(bfd_mach_o_i386_swap_reloc_out): Ditto.
(bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
(bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
(bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
(bfd_mach_o_bfd_reloc_type_lookup)
(bfd_mach_o_bfd_reloc_name_lookup): Ditto.

15 years agodaily update
Alan Modra [Fri, 12 Jun 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years agoAdd PC-relative branch instructions to moxie port.
Anthony Green [Thu, 11 Jun 2009 11:27:58 +0000 (11:27 +0000)]
Add PC-relative branch instructions to moxie port.

15 years agoTypos in ChangeLog :-(
Paul Pluzhnikov [Thu, 11 Jun 2009 00:46:28 +0000 (00:46 +0000)]
Typos in ChangeLog :-(

15 years ago2009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
Paul Pluzhnikov [Thu, 11 Jun 2009 00:41:03 +0000 (00:41 +0000)]
2009-06-10  Paul Pluzhnikov  <ppluzhnikov@google.com>

* bfd-in2.h: bfd_mmap prototype
* bfdio.c (bfd_mmap): New function.
* libbfd.h (bfd_iovec): Add bmmap.
* cache.c (cache_bmap): New function.
(cache_iovec): Initialize bmmap member.
* opencls.c (opncls_bmmap): New function.
(opncls_iovec): Initialize bmmap member.

15 years agodaily update
Alan Modra [Thu, 11 Jun 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years agoHandle MOXIE_F1_M opcodes.
Anthony Green [Wed, 10 Jun 2009 06:07:47 +0000 (06:07 +0000)]
Handle MOXIE_F1_M opcodes.

15 years agodaily update
Alan Modra [Wed, 10 Jun 2009 00:00:07 +0000 (00:00 +0000)]
daily update

15 years ago PR 10165
Nick Clifton [Tue, 9 Jun 2009 15:14:23 +0000 (15:14 +0000)]
    PR 10165
        * winduni.c (wind_MultiByteToWideChar): Do not pass MB_PRECOMPOSED
        to MultiByteToWideChar when using the CP_UTF8 or CO_UTF7 types.

15 years ago * dw2gencfi.c (output_cfi_insn): Initialize fragment before rs_cfa
Jakub Jelinek [Tue, 9 Jun 2009 15:12:45 +0000 (15:12 +0000)]
* dw2gencfi.c (output_cfi_insn): Initialize fragment before rs_cfa
to DW_CFA_advance_loc4.

* gas/cfi/cfi-common-7.d: New test.
* gas/cfi/cfi-common-7.s: New.
* gas/cfi/cfi.exp: Add cfi-common-7 test.

15 years ago2009-06-09 Tristan Gingold <gingold@adacore.com>
Tristan Gingold [Tue, 9 Jun 2009 07:37:19 +0000 (07:37 +0000)]
2009-06-09  Tristan Gingold  <gingold@adacore.com>

* mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
and stabstr_segment fields.
(mach_o_be_vec, mach_o_le_vec): Removed
(bfd_mach_o_version): New prototype.

* mach-o.c (bfd_mach_o_version): Make this function public.
(mach_o_wide_p): New function.
(bfd_mach_o_wide_p): Ditto.
(bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
weird names.
(bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
Search in the list only if the name starts with a dot.
(bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
test.  Check bfd_seek status.
(bfd_mach_o_scan_write_thread): Check bfd_seek status.
(bfd_mach_o_scan_write_section_32): Ditto.
(bfd_mach_o_scan_write_section_64): Ditto.
(bfd_mach_o_scan_write_section): Removed.
(bfd_mach_o_scan_write_segment): Split into ...
(bfd_mach_o_scan_write_segment_32): ... this and ...
(bfd_mach_o_scan_write_segment_64): ... this.  Check bfd_seek status.
(bfd_mach_o_scan_write_symtab_symbols): Moved into ...
(bfd_mach_o_scan_write_symtab): ... this.  Write symtab from BFD
symbol table.  Now returns a boolean.
(bfd_mach_o_write_contents): Set filetype.  Check bfd_seek status.
Adjust for status type.
(bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
test.  Write symbol table.  Numbers the sections.
(bfd_mach_o_read_header): Check bfd_seek status.
Use mach_o_wide_p instead of hard-coded test.
(bfd_mach_o_scan_read_section_32): Check bfd_seek status.
(bfd_mach_o_scan_read_section_64): Ditto.
(bfd_mach_o_scan_read_symtab_symbol): Ditto.  Check bfd_seek status.
Use BFD_MACH_O_N_TYPE instead of hard-coded value.  Correctly
handled common symbols.
(bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
(bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
(bfd_mach_o_scan_read_dylinker): Ditto.
(bfd_mach_o_scan_read_dylib): Ditto.
(bfd_mach_o_scan_read_thread): Ditto.
(bfd_mach_o_scan_read_symtab): Ditto.
Do not create a section for the stabs.
(bfd_mach_o_scan_read_uuid): Check bfd_seek status.
(bfd_mach_o_scan_read_segment): Ditto.
(bfd_mach_o_scan_read_command): Ditto.
(bfd_mach_o_scan_start_address): Ditto.
(bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
(bfd_mach_o_archive_p): Check bfd_seek status.
(bfd_mach_o_core_fetch_environment): Ditto.

* mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.

15 years agodaily update
Alan Modra [Tue, 9 Jun 2009 00:00:05 +0000 (00:00 +0000)]
daily update

15 years ago PR gas/977
Dave Korn [Mon, 8 Jun 2009 16:06:24 +0000 (16:06 +0000)]
PR gas/977
* config/tc-i386.c (md_estimate_size_before_relax):  Don't relax
branches to weak symbols.
(md_apply_fix):  Don't convert fixes against weak symbols to
section-relative offsets, but save addend for later reloc emission.
(tc_gen_reloc):  When emitting reloc against weak symbol, adjust
addend to pre-compensate for bfd_install_relocation.

15 years ago * gas/i386/jump.d: Tweak patterns to also match PE platform output.
Dave Korn [Mon, 8 Jun 2009 15:55:36 +0000 (15:55 +0000)]
* gas/i386/jump.d:  Tweak patterns to also match PE platform output.

15 years agodaily update
Alan Modra [Mon, 8 Jun 2009 00:00:04 +0000 (00:00 +0000)]
daily update

15 years agodaily update
Alan Modra [Sun, 7 Jun 2009 00:00:08 +0000 (00:00 +0000)]
daily update

15 years agobfd/
H.J. Lu [Sat, 6 Jun 2009 22:39:25 +0000 (22:39 +0000)]
bfd/

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

* elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
(elf_i386_link_hash_table_create): Initialize irelifunc.
(elf_i386_check_relocs): Updated.  Set up irelifunc for
shared objects.
(elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
relocation for non-GOT reference of STT_GNU_IFUNC symbol in
shared objects.
(elf_i386_relocate_section): Likewise.

* elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
(elf64_x86_64_link_hash_table_create): Initialize irelifunc.
(elf64_x86_64_check_relocs): Updated.  Set up irelifunc for
shared objects.
(elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
relocation for non-GOT reference of STT_GNU_IFUNC symbol in
shared objects.
(elf64_x86_64_relocate_section): Likewise.

* elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
...
(_bfd_elf_create_ifunc_sections): This.

* elflink.c (_bfd_elf_create_static_ifunc_sections): Renamd to
...
(_bfd_elf_create_ifunc_sections): This.  Create .rel[a].ifunc
for shared objects.

ld/

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

* scripttempl/elf.sc: Add .rel.ifunc and .rela.ifunc.

15 years agoPrint moxie addresses nicely.
Anthony Green [Sat, 6 Jun 2009 13:02:21 +0000 (13:02 +0000)]
Print moxie addresses nicely.