aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2009-08-10include/coff/Jan Kratochvil2-7/+15
Fix references past allocated memory for i386-*-go32. * ti.h (COFF_ADJUST_FILEHDR_IN_POST, COFF_ADJUST_FILEHDR_OUT_POST): Reference F_TARGET_ID only when !COFF0_P.
2009-08-10bfd/Jan Kratochvil3-5/+23
Stop using bfd_usrdata in libbfd. * coff-stgo32.c (bfd_coff_go32stub): Remove. (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE. (adjust_filehdr_in_post): Declare the abfd parameter as unused. Replace STUBSIZE by GO32_STUBSIZE. Save now the stub in filehdr_dst->u.go32.stub. New comment with the reason. (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro bfd_coff_go32stub. (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre) (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre) (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE. (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data): Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro bfd_coff_go32stub. * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub. * libcoff-in.h (coff_data_type): New field go32stub. * libcoff.h: Regenerated. include/coff/ Stop using bfd_usrdata in libbfd. * go32exe.h (struct external_filehdr_go32_exe <stub>, FILHSZ): Replace STUBSIZE by GO32_STUBSIZE. (STUBSIZE): Move the definition ... * internal.h (GO32_STUBSIZE): ... here and rename it. (struct internal_filehdr <go32stub>, F_GO32STUB): New.
2009-08-10 * readelf.c (get_arm_section_type_name): Added support forNick Clifton2-7/+14
new sections headers. * arm.h: (SHT_ARM_DEBUGOVERLAY): New define. (SHT_ARM_OVERLAYSECTION): New define.
2009-08-09bfd/Bernd Schmidt2-44/+67
From Mike Frysinger <michael.frysinger@analog.com> * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs, bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook, _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section, bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs, bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs): Adjust to match the renamed reloc definitions. gas/testsuite/ From Mike Frysinger <michael.frysinger@analog.com> * gas/bfin/reloc.d: Adjust for the renamed relocations. include/elf/ From Mike Frysinger <michael.frysinger@analog.com> * bfin.h (R_BFIN_UNUSED, R_BFIN_PCREL5M2, R_BFIN_UNUSED1, R_BFIN_PCREL10, R_BFIN_PCREL12_JUMP, R_BFIN_RIMM16, R_BFIN_LUIMM16, R_BFIN_HUIMM16, R_BFIN_PCREL12_JUMP_S, R_BFIN_PCREL24_JUMP_X, R_BFIN_PCREL24, R_BFIN_UNUSEDB, R_BFIN_UNUSEDC, R_BFIN_PCREL24_JUMP_L, R_BFIN_PCREL24_CALL_X, R_BFIN_VAR_EQ_SYMB, R_BFIN_BYTE_DATA, R_BFIN_BYTE2_DATA, R_BFIN_BYTE4_DATA, R_BFIN_PCREL11, R_BFIN_PUSH, R_BFIN_CONST, R_BFIN_ADD, R_BFIN_SUB, R_BFIN_MULT, R_BFIN_DIV, R_BFIN_MOD, R_BFIN_LSHIFT, R_BFIN_RSHIFT, R_BFIN_AND, R_BFIN_OR, R_BFIN_XOR, R_BFIN_LAND, R_BFIN_LOR, R_BFIN_LEN, R_BFIN_NEG, R_BFIN_COMP, R_BFIN_PAGE, R_BFIN_HWPAGE, R_BFIN_ADDR, R_BFIN_PLTPLC, R_BFIN_GOT, R_BFIN_MAX): Renamed from R_unused0, R_pcrel5ms, R_unused1, R_pcrel10, R_pcrel12_jump, R_rimm16, R_luimm16, R_huimm16, R_pcrel12_jump_s, R_pcrel24_jump_x, R_pcrel24, R_unusedb, R_unusedc, R_pcrel24_jump_l, R_pcrel24_call_x, R_var_eq_symb, R_byte_data, R_byte2_data, R_byte4_data, R_pcrel11, R_push, R_const, R_add, R_sub, R_mult, R_div, R_mod, R_lshift, R_rshift, R_and, R_or, R_xor, R_land, R_lor, R_len, R_neg, R_comp, R_page, R_hwpage, R_addr, R_pltpc, R_got.
2009-08-09Add EM_resnnn, new EM_ entries, change EM_MICROBLAZE.Michael Eager2-8/+61
2009-08-06 Add support for Xilinx MicroBlaze processor.Nick Clifton5-0/+77
* bfd/Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}. * bfd/Makefile.in: Same. * bfd/archures.c: Add bfd_arch_microblaze. * bfd/bfd-in2.h: Regenerate. * bfd/config.bfd: Add microblaze target. * bfd/configure: Add bfd_elf32_microblaze_vec target. * bfd/configure.in: Same. * bfd/cpu-microblaze.c: New. * bfd/elf32-microblaze.c: New. * bfd/libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc(). * bfd/libbfd.h: Regenerate. * bfd/reloc.c: Add MICROBLAZE relocations. * bfd/section.c: Add struct relax_table and relax_count to section. * bfd/targets.c: Add bfd_elf32_microblaze_vec. * binutils/MAINTAINERS: Add self as maintainer. * binutils/readelf.c: Include elf/microblaze.h, add EM_MICROBLAZE & EM_MICROBLAZE_OLD to guess_is_rela(), dump_relocations(), get_machine_name(). * config.sub: Add microblaze target. * configure: Same. * configure.ac: Same. * gas/Makefile.am: add microblaze to CPU_TYPES, config/tc-microblaze.c to TARGET_CPU_CFILES, config/tc-microblaze.h to TARGET_CPU_HFILES, add DEP_microblaze_elf target. * gas/Makefile.in: Same. * gas/config/tc-microblaze.c: Add MicroBlaze assembler. * gas/config/tc-microblaze.h: Add header for tc-microblaze.c. * gas/configure: Add microblaze target. * gas/configure.in: Same. * gas/configure.tgt: Same. * gas/doc/Makefile.am: Add c-microblaze.texi to CPU_DOCS. * gas/doc/Makefile.in: Same. * gas/doc/all.texi: Set MICROBLAZE. * gas/doc/as.texinfo: Add MicroBlaze doc links. * gas/doc/c-microblaze.texi: New MicroBlaze docs. * include/dis-asm.h: Decl print_insn_microblaze(). * include/elf/common.h: Define EM_MICROBLAZE & EM_MICROBLAZE_OLD. * include/elf/microblaze.h: New reloc definitions. * ld/Makefile.am: Add eelf32mb_linux.o, eelf32microblaze.o to ALL_EMULATIONS, targets. * ld/Makefile.in: Same. * ld/configure.tgt: Add microblaze*-linux*, microblaze* targets. * ld/emulparams/elf32mb_linux.sh: New. * ld/emulparams/elf32microblaze.sh. New. * ld/scripttempl/elfmicroblaze.sc: New. * opcodes/Makefile.am: Add microblaze-opc.h to HFILES, microblaze-dis.c to CFILES, microblaze-dis.lo to ALL_MACHINES, targets. * opcodes/Makefile.in: Same. * opcodes/configure: Add bfd_microblaze_arch target. * opcodes/configure.in: Same. * opcodes/disassemble.c: Define ARCH_microblaze, return print_insn_microblaze(). * opcodes/microblaze-dis.c: New MicroBlaze disassembler. * opcodes/microblaze-opc.h: New MicroBlaze opcode definitions. * opcodes/microblaze-opcm.h: New MicroBlaze opcode types.
2009-07-29 * ppc64.h: Add R_PPC64_JMP_IREL, R_PPC64_REL16, R_PPC64_REL16_LO,Alan Modra2-0/+12
R_PPC64_REL16_HI, R_PPC64_REL16_HA.
2009-07-25bfd/H.J. Lu2-1/+5
2009-07-25 H.J. Lu <hongjiu.lu@intel.com> * archures.c (bfd_architecture): Add bfd_arch_l1om. (bfd_l1om_arch): New. (bfd_archures_list): Add &bfd_l1om_arch. * bfd-in2.h: Regenerated. * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec if bfd_elf64_x86_64_freebsd_vec is supported. (targ_selvecs): Likewise. * configure.in: Support bfd_elf64_l1om_vec and bfd_elf64_l1om_freebsd_vec. * configure: Regenerated. * cpu-l1om.c: New. * elf64-x86-64.c (elf64_l1om_elf_object_p): New. (bfd_elf64_l1om_vec): Likewise. (bfd_elf64_l1om_freebsd_vec): Likewise. * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo. (ALL_MACHINES_CFILES): Add cpu-l1om.c. * Makefile.in: Regenerated. * targets.c (bfd_elf64_l1om_vec): New. (bfd_elf64_l1om_freebsd_vec): Likewise. (_bfd_target_vector): Add bfd_elf64_l1om_vec and bfd_elf64_l1om_freebsd_vec. binutils/ 2009-07-25 H.J. Lu <hongjiu.lu@intel.com> * readelf.c (guess_is_rela): Handle EM_L1OM. (dump_relocations): Likewise. (get_machine_name): Likewise. (get_section_type_name): Likewise. (get_elf_section_flags): Likewise. (get_symbol_index_type): Likewise. (is_32bit_abs_reloc): Likewise. (is_32bit_pcrel_reloc): Likewise. (is_64bit_abs_reloc): Likewise. (is_64bit_pcrel_reloc): Likewise. (is_none_reloc): Likewise. gas/ 2009-07-25 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (cpu_arch): Add l1om. (check_cpu_arch_compatible): New. (set_cpu_arch): Use it. (i386_arch): New. (i386_mach): Return bfd_mach_l1om for Intel L1OM. (md_show_usage): Display l1om. (i386_target_format): Return ELF_TARGET_L1OM_FORMAT if cpu_arch_isa_flags.bitfield.cpul1om is set. * config/tc-i386.h (TARGET_ARCH): Use (i386_arch ()). (i386_arch): New. (ELF_TARGET_L1OM_FORMAT): Likewise. * doc/c-i386.texi: Document l1om. gas/testsuite/ 2009-07-25 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/l1om.d: New. * gas/i386/l1om-inval.l: Likewise. * gas/i386/l1om-inval.s: Likewise. * gas/i386/i386.exp: Run l1om-inval and l1om. include/elf/ 2009-07-25 H.J. Lu <hongjiu.lu@intel.com> * common.h (EM_L1OM): New. ld/ 2009-07-25 H.J. Lu <hongjiu.lu@intel.com> * configure.tgt (targ64_extra_emuls): Add elf_l1om if elf_x86_64 is supported. Add elf_l1om_fbsd if elf_x86_64_fbsd is supported. (targ_extra_emuls): Likewise. * Makefile.am (ALL_64_EMULATIONS): Add eelf_l1om.o and eelf_l1om_fbsd.o (eelf_l1om.c): New. (eelf_l1om_fbsd.c): Likewise. * Makefile.in: Regenerated. * emulparams/elf_l1om.sh: New. * emulparams/elf_l1om_fbsd.sh: Likewise. ld/testsuite/ 2009-07-25 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/abs-l1om.d: New. * ld-x86-64/protected2-l1om.d: Likewise. * ld-x86-64/protected3-l1om.d: Likewise. * ld-x86-64/x86-64.exp: Run abs-l1om, protected2-l1om and protected3-l1om. opcodes/ 2009-07-25 H.J. Lu <hongjiu.lu@intel.com> * configure.in: Handle bfd_l1om_arch. * disassemble.c (disassembler): Likewise. * configure: Regenerated. * i386-dis.c (print_insn): Handle bfd_mach_l1om and bfd_mach_l1om_intel_syntax. Use 8 bytes per line for Intel L1OM. * i386-gen.c (cpu_flag_init): Set CPU_UNKNOWN_FLAGS to ~CpuL1OM. Add CPU_L1OM_FLAGS. (cpu_flags): Add CpuL1OM. (set_bitfield): Take an argument to set the value field. (process_i386_cpu_flag): Support ~CpuXXX and ~(CpuXXX|CpuYYY). (process_i386_opcode_modifier): Updated. (process_i386_operand_type): Likewise. * i386-init.h: Regenerated. * i386-tbl.h: Likewise. * i386-opc.h (CpuL1OM): New. (CpuXsave): Updated. (i386_cpu_flags): Add cpul1om.
2009-07-25merge from gccDJ Delorie1-1/+1
2009-07-25merge from gccDJ Delorie2-1/+8
2009-07-24include/elf/Trevor Smigiel2-0/+6
* spu.h (R_SPU_ADD_PIC): New. bfd/ * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC. (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC. (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC. gas/ * config/tc-spu.c (md_apply_fix): Handle SPU_ADD_PIC. * config/tc-spu.h (tc_fix_adjustable): Don't adjust for SPU_ADD_PIC. (TC_FORCE_RELOCATION): Emit relocs for SPU_ADD_PIC. ld/testsuite/ * ld-spu/pic.d: New. * ld-spu/pic.s: New. * ld-spu/picdef.s: New.
2009-07-23 * config/obj-elf.c (obj_elf_type): Add code to support a type ofNick Clifton2-1/+6
gnu_unique_object. * doc/as.texinfo: Document new feature of .type directive. * NEWS: Mention support for gnu_unique_object symbol type. * common.h (STB_GNU_UNIQUE): Define. * NEWS: Mention the linker's support for symbols with a binding of STB_GNU_UNIQUE. * gas/elf/type.s: Add unique global symbol definition. * gas/elf/type.e: Add expected readelf output for global unique symbol. * elfcpp.h (enum STB): Add STB_GNU_UNIQUE. * readelf.c (get_symbol_binding): For Linux targeted files return UNIQUE for symbols with the STB_GNU_UNIQUE binding. * doc/binutils.texi: Document the meaning of the 'u' symbol binding in the output of nm and objdump --syms. * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field. * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols with the BSF_GNU_UNIQUE flag bit set. * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag for symbols with STB_GNU_UNIQUE binding. * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols with the STB_GNU_UNIQUE binding. (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for symbols with the unique_global field set. (elf_link_output_extsym): Set unique_global field for symbols with the STB_GNU_UNIQUE binding. * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit. (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE symbols. (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE symbols. * bfd-in2.h: Regenerate.
2009-07-21Add ccoutant to previous dwarf4 entry.Doug Evans1-1/+2
2009-07-20 Add some dwarf4 values.Doug Evans2-1/+18
* dwarf2.h (enum dwarf_tag): Add DW_TAG_type_unit. (enum dwarf_form): Add DW_FORM_sec_offset, DW_FORM_exprloc, DW_FORM_flag_present, DW_FORM_sig8. (enum dwarf_attribute): Add DW_AT_signature.
2009-07-17merge from gccDJ Delorie2-0/+11
2009-07-10bfdTom Tromey3-1/+8
* Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h. (elf-eh-frame.lo): Likewise. (elf32-bfin.lo): Likewise. (elf32-frv.lo): Likewise. (elf32-xc16x.lo): Likewise. * Makefile.in: Rebuild. * dwarf2.c: Included dwarf.h, not elf/dwarf2.h. * elf-eh-frame.c: Likewise. * elf32-bfin.c: Likewise. * elf32-frv.c: Likewise. * elf32-xc16x.c: Likewise. binutils * Makefile.am (dwarf.o): Refer to dwarf2.h, not elf/dwarf2.h. * Makefile.in: Rebuild. * dwarf.c: Include dwarf2.h, not elf/dwarf2.h. gas * Makefile.am (DEPTC_alpha_ecoff): Refer to dwarf2.h, not elf/dwarf2.h. (DEPTC_alpha_elf): Likewise. (DEPTC_alpha_evax): Likewise. (DEPTC_arm_elf): Likewise. (DEPTC_hppa_elf): Likewise. (DEPTC_i386_aout): Likewise. (DEPTC_i386_coff): Likewise. (DEPTC_i386_elf): Likewise. (DEPTC_m68k_aout): Likewise. (DEPTC_m68k_coff): Likewise. (DEPTC_m68k_elf): Likewise. (DEPTC_mips_coff): Likewise. (DEPTC_mips_ecoff): Likewise. (DEPTC_mips_elf): Likewise. (DEPTC_ppc_coff): Likewise. (DEPTC_ppc_elf): Likewise. (DEPTC_s390_elf): Likewise. (DEPTC_sh_coff): Likewise. (DEPTC_sh_elf): Likewise. (DEPTC_sh64_elf): Likewise. (DEPTC_sparc_aout): Likewise. (DEPTC_sparc_coff): Likewise. (DEPTC_sparc_elf): Likewise. (as.o): Likewise. (dwarf2dbg.o): Likewise. (dw2gencfi.o): Likewise. (ehopt.o): Likewise. (read.o): Likewise. * Makefile.in: Rebuild. * dw2gencfi.h: Include dwarf2.h, not elf/dwarf2.h. * dwarf2dbg.c: Likewise. * ehopt.c: Likewise. gdb * dwarf2-frame.c: Include dwarf2.h, not elf/dwarf2.h. * dwarf2expr.c: Likewise. * dwarf2loc.c: Likewise. * dwarf2read.c: Likewise. * sh-tdep.c: Likewise. * xtensa-tdep.c: Likewise. include * dwarf2.h: New file, moved from elf/. include/elf * dwarf2.h: Move to `..'.
2009-07-102009-07-10 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-847/+5
* dwarf2.h: Just include ../dwarf2.h.
2009-07-10STT_GNU_IFUNC support for PowerPC.Alan Modra3-7/+20
2009-07-09merge from gccDJ Delorie2-0/+9
2009-07-09merge from gccDJ Delorie2-0/+867
2009-07-03 * dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_valueJakub Jelinek2-0/+8
and DW_OP_stack_value. * dwarf.c (decode_location_expression): Handle DW_OP_stack_value and DW_OP_implicit_value.
2009-06-22include/elf/Alan Modra2-4/+10
* 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.
2009-06-18 PR 10288Nick Clifton2-2/+10
* 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.
2009-06-16merge from gccDJ Delorie2-6/+19
2009-06-15 PR 10263Nick Clifton2-10/+21
* 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.
2009-06-11Add PC-relative branch instructions to moxie port.Anthony Green4-3/+15
2009-06-06Print moxie addresses nicely.Anthony Green2-0/+6
2009-06-03merge from gccDJ Delorie2-0/+16
2009-06-03ChangeLog:Ulrich Weigand2-0/+12
* mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short, mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64, mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64, mdebug_type_unsigned_char, mdebug_type_unsigned_short, mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64, mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64, mdebug_type_unsigned_long_long_64, mdebug_type_adr_32, mdebug_type_adr_64, mdebug_type_float, mdebug_type_double, mdebug_type_complex, mdebug_type_double_complex, mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string): Remove. (basic_type_data): New global variable. (basic_type): New function. (parse_type): Remove static basic type map map_bt. Call basic_type to get basic types instead of using mdebug_type_ variables. (parse_symbol): Use builtin types instead of mdebug_type_ variables. (upgrade_type): Likewise. (parse_procedure): Likewise. (psymtab_to_symtab_1): Likewise. (_initialize_mdebugread): Do not initialize mdebug_type_ variables. Initialize basic_type_data. include/coff/ChangeLog: * symconst.h (btLong64, btULong64, btLongLong64, btULongLong64, btAdr64, btInt64, btUInt64): New defines.
2009-06-01merge from gccDJ Delorie4-5/+45
2009-06-01bfd/H.J. Lu3-0/+8
2009-06-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/10205 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE. (elf_i386_reloc_type_lookup): Likewise. (R_386_tls): Removed. (R_386_irelative): New. (R_386_vt_offset): Updated. (elf_i386_rtype_to_howto): Likewise. (elf_i386_link_hash_table): Add igotplt, iplt and irelplt. (elf_i386_link_hash_table_create): Initialize igotplt, iplt and irelplt. (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first. (elf_i386_adjust_dynamic_symbol): Likewise. (elf_i386_allocate_dynrelocs): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt sections. (elf_i386_finish_dynamic_symbol): When building a static executable, use .iplt, .igot.plt and .rel.iplt sections for STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for locally defined STT_GNU_IFUNC symbol. * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE. (x86_64_reloc_map): Likewise. (R_X86_64_standard): Updated. (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt. (elf64_x86_64_link_hash_table_create): Initialize igotplt, iplt and irelplt. (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first. (elf64_x86_64_adjust_dynamic_symbol): Likewise. (elf64_x86_64_allocate_dynrelocs): Likewise. (elf64_x86_64_relocate_section): Likewise. (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt sections. (elf64_x86_64_finish_dynamic_symbol): When building a static executable, use .iplt, .igot.plt and .rela.iplt sections for STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation for locally defined STT_GNU_IFUNC symbol. * reloc.c (BFD_RELOC_386_IRELATIVE): New. (BFD_RELOC_X86_64_IRELATIVE): Likewise. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. include/elf/ 2009-06-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/10205 * i386.h (R_386_IRELATIVE): New. * x86-64.h (R_X86_64_IRELATIVE): Likewise. ld/testsuite/ 2009-06-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/10205 * ld-ifunc/ifunc.exp (contains_irelative_reloc): New. Use it on executable and shared library. Run *.d. * ld-ifunc/lib.c: Add a hidden alias, __GI_library_func2, for library_func2. (library_func): New. * ld-ifunc/ifunc-1-x86.d: New. * ld-ifunc/ifunc-1-x86.s: Likewise. * ld-ifunc/ifunc-2-i386.d: Likewise. * ld-ifunc/ifunc-2-i386.s: Likewise. * ld-ifunc/ifunc-2-x86-64.d: Likewise. * ld-ifunc/ifunc-2-x86-64.s: Likewise. * ld-ifunc/ifunc-3a-x86.d: Likewise. * ld-ifunc/ifunc-3b-x86.d: Likewise. * ld-ifunc/ifunc-3-x86.s: Likewise. * ld-ifunc/ifunc-4-x86.d: Likewise. * ld-ifunc/ifunc-4-x86.s: Likewise. * ld-ifunc/ifunc-5-i386.d: Likewise. * ld-ifunc/ifunc-5-i386.s: Likewise. * ld-ifunc/ifunc-5-x86-64.d: Likewise. * ld-ifunc/ifunc-5-x86-64.s: Likewise.
2009-05-272009-05-27 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-4/+10
* common.h: Update comments for dynamic tag ranges.
2009-05-252009-05-25 Tristan Gingold <gingold@adacore.com>Tristan Gingold2-6/+11
* fopen-vms.h (FOPEN_RB, FOPEN_WB, FOPEN_AB, FOPEN_RUB, FOPEN_WUB, FOPEN_AUB): Use "rfm=udf,rat=none" attribute.
2009-05-18gdb/Jon Beniston2-0/+80
2009-05-18 Jon Beniston <jon@beniston.com> * MAINTAINERS: Add lm32 target. * Makefile.in: Add lm32 dependencies. * NEWS: Indicate lm32 is a new target. * configure.tgt: Add lm32 targets. * lm32-tdep.c: New file. gdb/testsuite 2009-05-18 Jon Beniston <jon@beniston.com> * gdb.asm/asm-source.exp: Add lm32 target. include/gdb/ 2009-05-18 Jon Beniston <jon@beniston.com> * sim-lm32.h: New file. sim/ 2009-05-18 Jon Beniston <jon@beniston.com> * MAINTAINERS: Add Jon Beniston as maintainer of lm32 sim. * configure.ac: Add lm32 target. * lm32: New directory. sim/common 2009-05-18 Jon Beniston <jon@beniston.com> * gennltvals.sh: Add lm32 target. * nltvals.def: Add lm32 syscall definitions. sim/lm32/ 2009-05-18 Jon Beniston <jon@beniston.com> * Makefile.in: New file. * arch.c: New file. * arch.h: New file. * config.in: New file. * configure: New file. * configure.ac: New file. * cpu.c: New file. * cpu.h: New file. * cpuall.h: New file. * decode.c: New file. * decode.h: New file. * dv-lm32cpu.c: New file. * dv-lm32timer.c: New file. * dv-lm32uart.c: New file. * lm32.c: New file. * lm32-sim.h: New file. * mloop.in: New file. * model.c: New file. * sem.c: New file. * sem-switch.c: New file. * sim-if.c: New file. * sim-main.c: New file. * tconfig.in: New file. * traps.c: New file. * user.c: New file.
2009-04-30* mep.h (EF_MEP_COP_*): New.DJ Delorie2-1/+14
(EF_MEP_ALL_FLAGS): Add them.
2009-04-30include/elfNick Clifton2-0/+5
2009-04-30 Nick Clifton <nickc@redhat.com> * common.h (STT_GNU_IFUNC): Define. elfcpp 2009-04-30 Nick Clifton <nickc@redhat.com> * (enum STT): Add STT_GNU_IFUNC. gas 2009-04-30 Nick Clifton <nickc@redhat.com> * config/obj-elf.c (obj_elf_type): Add support for a gnu_indirect_function type. * config/tc-i386.c (tc_i386_fix_adjustable): Do not adjust fixups against indirect function symbols. * doc/as.texinfo (.type): Document the support for the gnu_indirect_function symbol type. * NEWS: Mention the new feature. gas/testsuite 2009-04-30 Nick Clifton <nickc@redhat.com> * gas/elf/elf.exp: Extend type test to include an ifunc symbol. Provide an alternative test for targets which do not support ifunc symbols. (type.s): Add entry for an ifunc symbol. (type.e): Add ifunc entry to expected symbol dump. (section2.e-armelf): Add entry for ifunc symbol. (type-noifunc.s): New file. (type-noifunc.e): New file. bfd/ 2009-04-30 Nick Clifton <nickc@redhat.com> * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs section pointer. (struct elf_obj_data): Add has_ifunc_symbols boolean. * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags into a STT_GNU_IFUNC symbol type. (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function type. (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if the binary contains ifunc symbols. * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC symbol type into a BSF_GNU_INDIRECT_FUNCTION flag. * elf32-i386.c (is_indirect_function): New function. (elf_i386_check_relocs): Create an ifunc output section. (allocate_dynrelocs): Create dynamic relocs in the ifunc output section if necessary. (elf_i386_relocate_section): Emit a reloc against an ifunc symbol if necessary. (elf_i386_add_symbol_hook): New function. Set the has_ifunc_symbols field of the elf_obj_data structure if an ifunc symbol is encountered. (elf_backend_post_process_headers): Define. (elf_backend_add_symbol_hook): Define. (elf_i386_post_process_headers): Rename to elf_i388_fbsd_post_process_headers. * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro. (is_indirect_function): New function. (elf64_x86_64_check_relocs): Create an ifunc output section. (allocate_dynrelocs): Create dynamic relocs in the ifunc output section if necessary. (elf64_x86_64_relocate_section): Emit a reloc against an ifunc symbol if necessary. (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the elf_obj_data structure if an ifunc symbol is encountered. (elf_backend_post_process_headers): Define. * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT if we have ifunc symbols to handle. (get_ifunc_reloc_section_name): New function. Computes the name for an ifunc section. (_bfd_elf_make_ifunc_reloc_section): New function. Creates a section to hold ifunc relocs. * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define. (bfd_print_symbol_vandf): Handle ifunc symbols. (bfd_decode_symclass): Likewise. * bfd-in2.h: Regenerate. binutils 2009-04-30 Nick Clifton <nickc@redhat.com> * readelf.c (dump_relocations): Display a relocation against an ifunc symbol as if it were a function invocation. (get_symbol_type): Handle STT_GNU_IFUNC. ld 2009-04-30 Nick Clifton <nickc@redhat.com> * NEWS: Mention support for IFUNC symbols. ld/testsuite 2009-04-30 Nick Clifton <nickc@redhat.com> * ld-ifunc: New directory. * ld-ifunc/ifunc.exp: New file: Run the IFUNC tests. * ld-ifunc/prog.c: New file. * ld-ifunc/lib.c: New file.
2009-04-24include/elf/Cary Coutant2-0/+5
* dwarf2.h (DW_LNE_set_discriminator): New enum value. binutils/ * dwarf.c (process_extended_line_op): Add DW_LNE_set_discriminator. Add missing newlines to HP extensions.
2009-04-24Update ChangeLog entries.H.J. Lu2-43/+48
2009-04-22merge from gccDJ Delorie2-6/+3
2009-04-21bfd/ChangeLogDave Korn2-0/+179
2009-04-21 Kai Tietz <kai.tietz@onevision.com> * coff-x86_64.c (PEI_HEADERS): Protect includes. (bfd_pe_print_pdata): Remove #ifdef PE variation. * pei-x86_64.c (PEI_HEADERS): Define to prevent double include in coff-x86_64.c of headers. (PDATA_ROW_SIZE): New define. (pex_regs[]): New static array. (pex64_get_runtime_function): New static function. (pex64_get_unwind_info): Likewise. (pex64_get_scope_entry): Likewise. (pex64_xdata_print_uwd_codes): Likewise. (pep_get_section_by_rva): Likewise. (pex64_dump_xdata): Likewise. (pex64_bfd_print_pdata): Likewise. (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata. * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation. * libpei.h (_bfd_pex64_print_pdata): Removed declaration. include/ChangeLog 2009-04-21 Kai Tietz <kai.tietz@onevision.com> * coff/pe.h (pex64_runtime_function): New structure. (external_pex64_runtime_function): Likewise. (pex64_unwind_code): Likewise. (external_pex64_unwind_code): Likewise. (pex64_unwind_info): Likewise. (external_pex64_unwind_info): Likewise. (external_pex64_scope): Likewise. (pex64_scope): Likewise. (pex64_scope_entry): Likewise. (external_pex64_scope_entry): Likewise. (PEX64_IS_RUNTIME_FUNCTION_CHAINED): New macro. (PEX64_GET_UNWINDDATA_UNIFIED_RVA): Likewise. (PEX64_UNWCODE_CODE): Likewise. (PEX64_UNWCODE_INFO): Likewise. (UWOP_...): Add defines for unwind code. (UNW_FLAG_...): Add defined for unwind info flags. (PEX64_SCOPE_ENTRY_SIZE): New macro. (PEX64_UWI_VERSION): Likewise. (PEX64_UWI_FLAGS): Likewise. (PEX64_UWI_FRAMEREG): Likewise. (PEX64_UWI_FRAMEOFF): Likewise. (PEX64_UWI_SIZEOF_UWCODE_ARRAY): Likewise. (PEX64_OFFSET_TO_UNWIND_CODE): Likewise. (PEX64_OFFSET_TO_HANDLER_RVA): Likewise. (PEX64_OFFSET_TO_SCOPE_COUNT): Likewise. (PEX64_SCOPE_ENTRY): Likewise.
2009-04-17bfd/H.J. Lu2-1/+6
2009-04-17 H.J. Lu <hongjiu.lu@intel.com> * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER. binutils/ 2009-04-17 H.J. Lu <hongjiu.lu@intel.com> * objcopy.c (set_pe_subsystem): Replace efi-rom with sal-rtd. * doc/binutils.texi: Likewise. include/coff/ 2009-04-17 H.J. Lu <hongjiu.lu@intel.com> * pe.h (IMAGE_SUBSYSTEM_EFI_ROM): Renamed to ... (IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER): This.
2009-04-16Add new binutils target: moxieNick Clifton6-0/+111
2009-04-08bfd/H.J. Lu2-0/+7
2009-04-08 H.J. Lu <hongjiu.lu@intel.com> * elflink.c (elf_link_add_object_symbols): Warn alternate ELF machine code. include/ 2009-04-08 H.J. Lu <hongjiu.lu@intel.com> * bfdlink.h (bfd_link_info): Add warn_alternate_em. ld/ 2009-04-08 H.J. Lu <hongjiu.lu@intel.com> * lexsup.c (option_values): Add OPTION_WARN_ALTERNATE_EM. (ld_options): Likewise. (parse_args): Likewise. * ld.texinfo: Document --warn-alternate-em. * NEWS: Mention --warn-alternate-em.
2009-04-08[include/elf]DJ Delorie2-0/+6
* mep.h (EF_MEP_CPU_C5): New. [bfd] * archures.c: Add bfd_mach_mep_c5. * bfd-in2.h: Likewise. * cpu-mep.c: Add bfd_c5_arch. * elf32-mep.c: Support it. [gas] * config/tc-mep.c: Add UCI/DSP instruction support. Add C5 support. (md_show_usage): Change default endian to little. * config/tc-mep.h (TARGET_BYTES_BIG_ENDIAN): Change default to little. [ld] * emulparams/elf32mep.sh: Change default endian to little.
2009-04-07[bfd]DJ Delorie2-62/+66
* elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes. [gas] * tc-h8300.c (do_a_fix_imm): Pass the insn, force relocs for MOVA immediates. (build_bytes): Pass insn to do_a_fix_imm. [include/opcode] * h8300.h: Add relaxation attributes to MOVA opcodes.
2009-04-01include/coff/Richard Sandiford2-61/+4
* xcoff.h (xcoff_link_hash_table): Move to bfd/xcofflink.c. bfd/ * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
2009-04-012009-04-01 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-2/+13
* common.h (EM_INTEL178): Removed. (EM_INTEL179): Likewise. (EM_ETPU): New. (EM_SLE9X): Likewise. (EM_INTEL181): Likewise. (EM_INTEL182): Likewise.
2009-03-312009-03-31 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-0/+9
* common.h (EM_INTEL178): New. (EM_INTEL179): Likewise. (EM_INTEL180): Likewise.
2009-03-20include/elf:Ian Lance Taylor2-0/+5
* common.h (SHT_GNU_INCREMENTAL_INPUTS): Define. elfcpp: * elfcpp.h (SHT_GNU_INCREMENTAL_INPUTS): Define. gold: * incremental.cc: New file. * Makefile.am (CCFILES): Add incremental.cc. * Makefile.in: Rebuild.
2009-03-18* common.h (NT_OPENBSD_PROCINFO, NT_OPENBSD_AUXV)Mark Kettenis2-0/+18
(NT_OPENBSD_REGS, NT_OPENBSD_FPREGS, NT_OPENBSD_XFPREGS) (NT_OPENBSD_WCOOKIE): New defines.