Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2003-03-25This commit was manufactured by cvs2svn to create branchcagney_framebase-20030326-branchpointcvs2svn
'cagney_framebase-20030326-branch'. Sprout from cagney_lazyid-20030317-branch 2003-03-17 10:34:30 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch' Cherrypick from master 2003-03-25 20:56:01 UTC Nick Clifton <nickc@redhat.com> 'Add iWMMXt support': include/ChangeLog include/ansidecl.h include/coff/ChangeLog include/coff/arm.h include/elf/ChangeLog include/elf/arm.h include/gdb/ChangeLog include/gdb/sim-arm.h include/hashtab.h include/opcode/ChangeLog include/opcode/s390.h
2003-03-06This commit was manufactured by cvs2svn to create branch 'kettenis-kettenis-i386newframe-20030308-branchpointcvs2svn
i386newframe-20030308-branch'. Sprout from cagney_offbyone-20030303-branch 2003-02-28 18:03:32 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch' Cherrypick from master 2003-03-06 20:50:01 UTC Andrew Cagney <cagney@gnu.org> '2003-03-06 Andrew Cagney <cagney@redhat.com>': ChangeLog Makefile.in Makefile.tpl config/ChangeLog configure configure.in include/aout/ChangeLog include/aout/aout64.h include/elf/ChangeLog include/elf/sh.h texinfo/texinfo.tex Delete: config/mh-dgux
2003-02-28This commit was manufactured by cvs2svn to create branchcagney_offbyone-20030303-branchpointcagney_offbyone-20030303-branchcvs2svn
'cagney_offbyone-20030303-branch'. Sprout from interps-20030202-branch 2003-01-31 21:24:33 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch' Cherrypick from master 2003-02-28 18:03:31 UTC Nathanael Nerode <neroden@gcc.gnu.org> ' * Makefile.tpl: Rearrange.': ChangeLog Makefile.def Makefile.in Makefile.tpl config.guess config.sub configure configure.in include/ChangeLog include/elf/ChangeLog include/elf/arm.h include/elf/ia64.h include/elf/ppc.h include/elf/ppc64.h include/gdb/ChangeLog include/gdb/remote-sim.h include/libiberty.h include/opcode/ChangeLog include/opcode/h8300.h libtool.m4 ltcf-cxx.sh ltcf-gcj.sh ltconfig
2003-02-01This commit was manufactured by cvs2svn to create branchinterps-20030202-branchpointinterps-20030202-branchcvs2svn
'interps-20030202-branch'. Sprout from cagney-unwind-20030108-branch 2003-01-09 20:50:26 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch 'cagney-' Cherrypick from master 2003-01-31 21:24:32 UTC John David Anglin <dave.anglin@nrc-cnrc.gc.ca> ' * hppa.h (ldwa, ldda): Add ordered opcodes.': ChangeLog Makefile.in Makefile.tpl config.if configure configure.in include/ChangeLog include/coff/ti.h include/coff/tic4x.h include/elf/ChangeLog include/elf/common.h include/elf/mips.h include/elf/ppc.h include/elf/ppc64.h include/elf/s390.h include/elf/sh.h include/elf/sparc.h include/hashtab.h include/opcode/ChangeLog include/opcode/hppa.h include/opcode/m68hc11.h include/splay-tree.h
2003-01-03 * dis-asm.h (print_insn_iq2000): Declare.Stan Cox
* common.h (EM_IQ2000): Define. * iq2000.h: New file.
2002-12-31[ bfd/ChangeLog ]Chris Demetriou
2002-12-30 Chris Demetriou <cgd@broadcom.com> * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case. * archures.c (bfd_mach_mipsisa32r2): New define. * bfd-in2.h: Regenerate. * cpu-mips.c (I_mipsisa32r2): New enum value. (arch_info_struct): Add entry for I_mipsisa32r2. * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach) (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2. (_bfd_mips_elf_final_write_processing): Add bfd_mach_mipsisa32r2 case. (_bfd_mips_elf_merge_private_bfd_data): Handle merging of binaries marked as using MIPS32 Release 2. [ binutils/ChangeLog ] 2002-12-30 Chris Demetriou <cgd@broadcom.com> * doc/binutils.texi (objdump): Note MIPS HWR (Hardware Register) changes in MIPS -M options. [ gas/ChangeLog ] 2002-12-30 Chris Demetriou <cgd@broadcom.com> * configure.in: Recognize mipsisa32r2, mipsisa32r2el, and CPU variants. * configure: Regenerate. * config/tc-mips.c (ISA_HAS_DROR, ISA_HAS_ROR): New defines. (macro_build): Handle "K" operand. (macro2): Use ISA_HAS_DROR and ISA_HAS_ROR in the places where CPU_HAS_DROR and CPU_HAS_ROR are currently used. (mips_ip): New variable "lastpos", and implement "+A", "+B", and "+C" operands for MIPS32 Release 2 ins/ext instructions. Implement "K" operand for MIPS32 Release 2 rdhwr instruction. (validate_mips_insn): Implement "+" as a way to extend the allowed operands, and implement "K", "+A", "+B", and "+C" operands. (OPTION_MIPS32R2): New define. (md_longopts): Add entry for OPTION_MIPS32R2. (OPTION_ELF_BASE): Adjust to accomodate OPTIONS_MIPS32R2. (md_parse_option): Handle OPTION_MIPS32R2. (s_mipsset): Reimplement handling of ".set mipsN" options and add support for ".set mips32r2". (mips_cpu_info_table): Add entry for "mips32r2" (MIPS32 Release 2). (md_show_usage): Document "-mips32r2" option. * doc/as.texinfo: Document "-mips32r2" option. * doc/c-mips.texi: Likewise. [ gas/testsuite/ChangeLog ] 2002-12-30 Chris Demetriou <cgd@broadcom.com> * gas/mips/cp0-names-mips32r2.d: New test. * gas/mips/hwr-names-mips32r2.d: New test. * gas/mips/hwr-names-numeric.d: New test. * gas/mips/hwr-names.s: New test source file. * gas/mips/mips32r2.d: New test. * gas/mips/mips32r2.s: New test source file. * gas/mips/mips32r2-ill.l: New test. * gas/mips/mips32r2-ill.s: New test source file. * gas/mips/mips.exp: Add mips32r2 architecture data array entry. Run new tests mentioned above. [ include/elf/ChangeLog ] 2002-12-30 Chris Demetriou <cgd@broadcom.com> * mips.h (E_MIPS_ARCH_32R2): New define. [ include/opcode/ChangeLog ] 2002-12-30 Chris Demetriou <cgd@broadcom.com> * mips.h: Document "+" as the start of two-character operand type names, and add new "K", "+A", "+B", and "+C" operand types. (OP_MASK_INSMSB, OP_SH_INSMSB, OP_MASK_EXTMSB) (OP_SH_EXTMSB, INSN_ISA32R2, ISA_MIPS32R2, CPU_MIPS32R2): New defines. [ opcodes/ChangeLog ] 2002-12-30 Chris Demetriou <cgd@broadcom.com> * mips-dis.c (mips_cp0_names_mips3264r2, mips_hwr_names_numeric) (mips_hwr_names_mips3264r2): New arrays. (mips_arch_choice): New "hwr_names" member. (mips_arch_choices): Adjust for structure change, and add a new entry for "mips32r2" ISA. (mips_hwr_names): New variable. (set_default_mips_dis_options): Set mips_hwr_names. (parse_mips_dis_option): New "hwr-names" option which sets mips_hwr_names, and adjust "reg-names=ARCH" to set mips_hwr_names. (print_insn_arg): Change return type to "int" and use that to indicate number of characters consumed. Add support for "+" operand extension character, "+A", "+B", "+C", and "K" operands. (print_insn_mips): Adjust for changes to print_insn_arg. (print_mips_disassembler_options): Adjust for "hwr-names" addition and "reg-names" change. * mips-opc (I33): New define (shorthand for INSN_ISA32R2). (mips_builtin_opcodes): Note that "nop" and "ssnop" are special forms of "sll". Add new MIPS32 Release 2 instructions: ehb, di, ei, ext, ins, jr.hb, jalr.hb, mfhc1, mfhc2, mthc1, mthc2, rdhwr, rdpgpr, seb, seh, synci, wrpgpr, wsbh. Note that hardware rotate instructions (ror, rorv) can be used on MIPS32 Release 2, and add the official mnemonics for them (rotr, rotrv) and the similar "rotl" mnemonic for left-rotate.
2002-12-30Add support for msp430.Nick Clifton
2002-12-21* xstormy16.h: Add XSTORMY16_12.DJ Delorie
2002-12-17* xstormy16.h (START_RELOC_NUMBERS) Add relocation numbersDJ Delorie
for R_XSTORMY16_LO16 and R_XSTORMY16_HI16.
2002-12-10Add support for displaying extension to DWARF2 used by Unified Parallel CNick Clifton
compiler.
2002-12-01 * m68hc11.h (EF_M68HC12_MACH, EF_M68HCS12_MACH): Define.Stephane Carrez
(EF_M68HC11_MACH_MASK, EF_M68HC11_MACH): Define. (EF_M68HC11_MERGE_MACH, EF_M68HC11_CAN_MERGE_MACH): Define.
2002-11-30s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra
comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
2002-11-28include/elf/ChangeLogAlan Modra
* internal.h (elf32_internal_ehdr, Elf32_Internal_Ehdr, elf64_internal_ehdr, Elf64_Internal_Ehdr, elf32_internal_phdr, Elf32_Internal_Phdr, elf64_internal_phdr, Elf64_Internal_Phdr, elf32_internal_shdr, Elf32_Internal_Shdr, elf64_internal_shdr, Elf64_Internal_Shdr, elf32_internal_sym, elf64_internal_sym, Elf32_Internal_Sym, Elf64_Internal_Sym, Elf32_Internal_Note, elf32_internal_note, elf32_internal_rel, Elf32_Internal_Rel, elf64_internal_rel, Elf64_Internal_Rel, elf32_internal_rela, elf64_internal_rela, Elf32_Internal_Rela, Elf64_Internal_Rela, elf32_internal_dyn, elf64_internal_dyn, Elf32_Internal_Dyn, Elf64_Internal_Dyn, elf32_internal_verdef, elf64_internal_verdef, elf32_internal_verdaux, elf64_internal_verdaux, elf32_internal_verneed, elf64_internal_verneed, elf32_internal_vernaux, elf64_internal_vernaux, elf32_internal_versym, elf64_internal_versym, Elf32_Internal_Verdef, Elf64_Internal_Verdef, Elf32_Internal_Verdaux, Elf64_Internal_Verdaux, Elf32_Internal_Verneed, Elf64_Internal_Verneed, Elf32_Internal_Vernaux, Elf64_Internal_Vernaux, Elf32_Internal_Versym, Elf64_Internal_Versym, Elf32_Internal_Syminfo, Elf64_Internal_Syminfo): Delete. (Elf_Internal_Rel): Delete. bfd/ChangeLog * elf-bfd.h: Replace occurrences of Elf32_Internal_* and Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel with Elf_Internal_Rela. * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h, elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c, elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c, elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c, elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto. * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr throughout instead. * elf.c (_bfd_elf_no_info_to_howto_rel): Delete. * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *. Remove INLINE keyword. (elf_swap_reloc_in): Likewise. Also clear r_addend. (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand as a bfd_byte *. (elf_write_relocs): Consolidate REL and RELA code. (elf_slurp_reloc_table_from_section): Simplify REL code. (NAME(_bfd_elf,size_info)): Populate reloc swap entries. * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define. * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and RELA code. (elf_link_adjust_relocs): Likewise. Don't malloc space for temp reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL. (elf_link_output_relocs): Likewise. (elf_reloc_link_order): Likewise. (elf_finish_pointer_linker_section): Likewise. (struct elf_link_sort_rela): Remove union. (elf_link_sort_cmp1): Update to suit. (elf_link_sort_cmp2): Here too. (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory over-allocation for int_rels_per_ext_rel != 1 case. * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls. * elf32-i386.c: Likewise. * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out. * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise. * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out. * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c: Likewise. * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out. * elfxx-mips.c (sort_dynamic_relocs): Likewise for bfd_elf32_swap_reloc_in. * elf32-arm.h: Update elf32_arm_info_to_howto calls. * elf32-mips.c: Likewise for mips_info_to_howto_rel. (mips_elf64_swap_reloc_in): Zero r_addend. (mips_elf64_be_swap_reloc_in): Likewise. (mips_elf64_slurp_one_reloc_table): Simplify. * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries. * elf64-hppa.c (hppa64_elf_size_info): Likewise. * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2002-10-11 * sh.h: Add SH TLS relocs.Kaz Kojima
2002-09-30[include/elf]Richard Sandiford
* mips.h (E_MIPS_MACH_4120, E_MIPS_MACH_5400, E_MIPS_MACH_5500): New. [bfd/] * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New. (bfd_mach_mips5500): New. * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New. (arch_info_struct): Add corresponding entries here. * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120, E_MIPS_MACH_5400 and E_MIPS_MACH_5500. (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120, bfd_mach_mips5400 and bfd_mach_mips5500. (_bfd_mips_elf_mach_extends_p): New function. (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge the EF_MIPS_MACH flags. * bfd-in2.h: Regenerate.
2002-09-27bfd/Jakub Jelinek
* reloc.c: Add x86-64 TLS relocs. * bfd-in2.h, libbfd.h: Rebuilt. * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit relocs. Add TLS relocs. (x86_64_reloc_map): Add TLS relocs. (elf64_x86_64_info_to_howto): Adjust for added TLS relocs. (struct elf64_x86_64_link_hash_entry): Add tls_type field. (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define. (elf64_x86_64_hash_entry): Define. (struct elf64_x86_64_obj_tdata): New. (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define. (struct elf64_x86_64_link_hash_table): Add tls_ld_got. (link_hash_newfunc): Initialize tls_type. (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got. (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary. (elf64_x86_64_mkobject): New. (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata. (elf64_x86_64_tls_transition): New. (elf64_x86_64_check_relocs): Add r_type variable and use it. Handle TLS relocs. (elf64_x86_64_gc_sweep_hook): Handle TLS relocs. (allocate_dynrelocs): Allocate GOT space for TLS relocs. (elf64_x86_64_size_dynamic_sections): Likewise. (dtpoff_base, tpoff): New. (elf64_x86_64_relocate_section): Handle TLS relocs. (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT entries. (bfd_elf64_mkobject): Define. * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set DF_STATIC_TLS if shared. gas/ * config/tc-i386.c (tc_i386_fix_adjustable): Add x86-64 TLS relocs. Define them if not BFD_ASSEMBLER. (lex_got): Handle @tlsgd, @dtpoff and @tpoff in 64-bit mode, add @tlsld. (md_apply_fix3): No addend for BFD_RELOC_X86_64_TLSGD, BFD_RELOC_X86_64_TLSLD and BFD_RELOC_X86_64_GOTTPOFF. (tc_gen_reloc): Handle x86-64 TLS relocs. include/ * elf/x86-64.h: Add TLS relocs. ld/testsuite/ * lib/ld-lib.exp (run_ld_link_tests): Add. * ld-sh/sh64/sh64.exp (run_ld_link_tests, regexp_diff, file_contents): Remove. (sh64tests): Add 6th field to the tests array. * ld-i386/i386.exp (run_ld_link_tests): Remove. * ld-x86-64/x86-64.exp: New. * ld-x86-64/tlsbin.dd: New test. * ld-x86-64/tlsbinpic.s: New test. * ld-x86-64/tlsbin.rd: New test. * ld-x86-64/tlsbin.s: New test. * ld-x86-64/tlsbin.sd: New test. * ld-x86-64/tlsbin.td: New test. * ld-x86-64/tlslib.s: New test. * ld-x86-64/tlspic1.s: New test. * ld-x86-64/tlspic2.s: New test. * ld-x86-64/tlspic.dd: New test. * ld-x86-64/tlspic.rd: New test. * ld-x86-64/tlspic.sd: New test. * ld-x86-64/tlspic.td: New test.
2002-09-19bfd/Jakub Jelinek
* reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE, BFD_RELOC_386_TLS_GOTIE): Add. * bfd-in2.h, libbfd.h: Rebuilt. * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE and R_386_TLS_GOTIE. (elf_i386_reloc_type_lookup): Handle it. (struct elf_i386_link_hash_entry): Change tls_type type to unsigned char instead of enum, change GOT_* into defines. (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define. (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE. (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is accessed both as normal and TLS symbol. Move R_386_TLS_LDM and R_386_PLT32 cases so that R_386_TLS_IE can fall through. Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs. (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE. Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs. (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if tls_type is GOT_TLS_IE_BOTH. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE. Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs. (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch all 4 GOT_TLS_* TLS types. gas/ * config/tc-i386.c (tc_i386_fix_adjustable): Handle BFD_RELOC_386_TLS_IE and BFD_RELOC_386_TLS_GOTIE. (BFD_RELOC_386_TLS_IE, BFD_RELOC_386_TLS_GOTIE): Define to 0 if not defined. (lex_got): Handle @GOTNTPOFF and @INDNTPOFF. (md_apply_fix3, tc_gen_reloc): Handle BFD_RELOC_386_TLS_IE and BFD_RELOC_386_TLS_GOTIE. gas/testsuite/ * gas/i386/tlspic.s: Add tests. * gas/i386/tlspic.d: Regenerated. * gas/i386/tlsnopic.s: Add tests. * gas/i386/tlsnopic.d: Regenerated. include/ * elf/i386.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE): Define. ld/testsuite/ * ld-i386/i386.exp: New. * ld-i386/tlsbin.dd: New test. * ld-i386/tlsbinpic.s: New test. * ld-i386/tlsbin.rd: New test. * ld-i386/tlsbin.s: New test. * ld-i386/tlsbin.sd: New test. * ld-i386/tlsbin.td: New test. * ld-i386/tlslib.s: New test. * ld-i386/tlsnopic1.s: New test. * ld-i386/tlsnopic2.s: New test. * ld-i386/tlsnopic.dd: New test. * ld-i386/tlsnopic.rd: New test. * ld-i386/tlsnopic.sd: New test. * ld-i386/tlspic1.s: New test. * ld-i386/tlspic2.s: New test. * ld-i386/tlspic.dd: New test. * ld-i386/tlspic.rd: New test. * ld-i386/tlspic.sd: New test. * ld-i386/tlspic.td: New test.
2002-09-12Handle DW_OP_GNU_push_tls_address.Nick Clifton
Synch up with the gcc's dwarf2.h
2002-08-29Add linker relaxation to v850 toolchainNick Clifton
2002-08-15 * i370.h: Define relocs using reloc-macros.h.Alan Modra
2002-08-13 * m68hc11.h (E_M68HC12_BANKS, E_M68HC11_I32, E_M68HC11_F64,Stephane Carrez
EF_M68HC11_ABI): Define for ABI specification. (STO_M68HC12_FAR, STO_M68HC12_INTERRUPT): Symbol flags for linker and debugger. (R_M68HC11_24, R_M68HC11_LO16, R_M68HC11_PAGE): New relocs. (R_M68HC11_RL_JUMP, R_M68HC11_RL_GROUP): New reloc for linker relaxation.
2002-07-17oops - omitted from previous deltaNick Clifton
2002-07-17Add IP2k support to BFD and LDNick Clifton
2002-07-10 * readelf.c (get_dynamic_type): Handle DT_GNU_PRELINKED,Jakub Jelinek
DT_GNU_CONFLICT* and DT_GNU_LIBLISZ*. (get_section_type_name): Handle SHT_GNU_LIBLIST. (process_dynamic_segment): Handle DT_GNU_CONFLICTSZ, DT_GNU_LIBLISTSZ and DT_GNU_PRELINKED. (process_gnu_liblist): New. (process_file): Call it. * elf/common.h (SHT_GNU_LIBLIST, DT_GNU_PRELINKED, DT_GNU_CONFLICT*, DT_GNU_LIBLIST*): Define.
2002-07-02typo fixAlan Modra
2002-07-01include/elf:Jason Thorpe
2002-07-01 Matt Thomas <matt@3am-software.com> * Rename EF_* to EF_VAX_*. bfd: 2002-07-01 Matt Thomas <matt@3am-software.com> * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_* to EF_VAX_*. binutils: 2002-07-01 Matt Thomas <matt@3am-software.com> * readelf.c: Include "elf/vax.h". (guess_is_rela): Move EM_VAX from unknown to RELA case. (dump_relocations): Handle VAX relocations. (get_machine_flags): Handle VAX machine flags.
2002-06-192002-06-18 Dave Brolley <brolley@redhat.com>Dave Brolley
From Catherine Moore, Michael Meissner, Dave Brolley: * common.h (EM_CYGNUS_FRV): New macro. * frv.h: New file.
2002-06-06 * common.h: Change registry@sco.com to registry@caldera.com.Alan Modra
(EM_PDP10, EM_PDP11): Define.
2002-06-05bfd/Jason Thorpe
* Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo. (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c. (elf32-sh64-com.lo): New dependency list. * Makefile.in: Regenerate. * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec) (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add elf32-sh64-com.lo. * configure: Regenerate. * elf32-sh64.c (sh64_address_in_cranges) (sh64_get_contents_type, sh64_address_is_shmedia): Move to... (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb): (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to... * elf32-sh64-com.c: ...here. New file. include/elf/ * sh.h (_bfd_sh64_crange_qsort_cmpb, _bfd_sh64_crange_qsort_cmpl) (_bfd_sh64_crange_bsearch_cmpb, _bfd_sh64_crange_bsearch_cmpl): New prototypes.
2002-06-02 include/elf/Richard Henderson
* alpha.h (LITUSE_ALPHA_ADDR, LITUSE_ALPHA_BASE, LITUSE_ALPHA_BYTOFF, LITUSE_ALPHA_JSR, LITUSE_ALPHA_TLSGD, LITUSE_ALPHA_TLSLDM): New. gas/ * config/tc-alpha.c: Move LITUSE constants to "elf/alpha.h". Rename them LITUSE_ALPHA_*. bfd/ * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New. (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs in shared libraries. Fix DTPRELHI and TPRELHI value. (INSN_ADDQ, INSN_RDUNIQ): New. (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent. (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend argument. Reject dynamic symbols. Use LITUSE symbolic constants. (elf64_alpha_relax_got_load): Rename from relax_without_lituse. Handle GOTDTPREL and GOTTPREL relocations. (elf64_alpha_relax_gprelhilo): New. (elf64_alpha_relax_tls_get_addr): New. (elf64_alpha_relax_find_tls_segment): New. (elf64_alpha_relax_section): Handle TLS relocations. (ALPHA_ELF_LINK_HASH_TLS_IE): New. (elf64_alpha_check_relocs): Set it.
2002-05-312002-05-31 Michal Ludvig <mludvig@suse.cz>Michal Ludvig
* elf/dwarf2.h (DW_CFA_low_user, DW_CFA_high_user): Renamed to DW_CFA_lo_user, DW_CFA_hi_user respectively.
2002-05-31include/elf/Richard Henderson
* alpha.h (R_ALPHA_TLSGD, R_ALPHA_TLSLDM, R_ALPHA_DTPMOD64, R_ALPHA_GOTDTPREL, R_ALPHA_DTPREL64, R_ALPHA_DTPRELHI, R_ALPHA_DTPRELLO, R_ALPHA_DTPREL16, R_ALPHA_GOTTPREL, R_ALPHA_TPREL64, R_ALPHA_TPRELHI, R_ALPHA_TPRELLO, R_ALPHA_TPREL16): New. bfd/ * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD, ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New. (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove. (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove. (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated. (struct alpha_elf_obj_tdata): Rename total_got_entries and n_local_got_entries to total_got_size and local_got_size. (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs. (alpha_got_entry_size): New. (elf64_alpha_relax_with_lituse): Use it. (elf64_alpha_relax_without_lituse): Likewise. (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES. (get_got_entry): New. (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize. (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask. (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type. (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise. (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size. (elf64_alpha_calc_got_offsets): Likewise. (alpha_dynamic_entries_for_reloc): New. (elf64_alpha_calc_dynrel_sizes): Use it. (elf64_alpha_size_dynamic_sections): Likewise. (elf64_alpha_relocate_section): Handle TLS relocations. * reloc.c: Add Alpha TLS relocations. * bfd-in2.h, libbfd.h: Rebuild. gas/ * expr.h (operatorT): Add O_md17..O_md32. * config/tc-alpha.c (O_lituse_tlsgd, O_lituse_tlsldm, O_tlsgd, O_tlsldm, O_gotdtprel, O_dtprelhi, O_dtprello, O_dtprel, O_gottprel, O_tprelhi, O_tprello, O_tprel): New. (USER_RELOC_P, alpha_reloc_op_tag, debug_exp): Include them. (DUMMY_RELOC_LITUSE_TLSGD, DUMMY_RELOC_LITUSE_TLSLDM): New. (LITUSE_TLSGD, LITUSE_TLSLDM): New. (struct alpha_reloc_tag): Add master, saw_tlsgd, saw_tlsld, saw_lu_tlsgd, saw_lu_tlsldm. Make multi_section_p a bit field. (md_apply_fix3): Handle TLS relocations. (alpha_force_relocation, alpha_fix_adjustable): Likewise. (alpha_adjust_symtab_relocs): Sort LITERAL relocs after the associated TLS reloc. Check lituse_tls relocs match up. (emit_insn): Handle TLS relocations. (ldX_op): Remove. gas/testsuite/ * gas/alpha/elf-tls-1.s, gas/alpha/elf-tls-1.d: New. * gas/alpha/elf-tls-2.s, gas/alpha/elf-tls-1.l: New. * gas/alpha/elf-tls-3.s, gas/alpha/elf-tls-1.l: New. * gas/alpha/alpha.exp: Run them.
2002-05-302002-05-29 Matt Thomas <matt@3am-software.com>Jason Thorpe
* vax.h: New file
2002-05-28Add DLX targetNick Clifton
2002-05-23 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCALJakub Jelinek
for symbols from SHF_TLS section. (_bfd_elf_print_private_bfd_data): Add PT_TLS. (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections. (map_sections_to_segments): Build PT_TLS segment if necessary. (assign_file_positions_for_segments): Likewise. (get_program_header_size): Account for PT_TLS segment. (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from SEC_THREAD_LOCAL sections to STT_TLS. * reloc.c: Add 386 and IA-64 TLS relocs. * section.c (SEC_THREAD_LOCAL): Define. (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS): Remove. * elflink.h (elf_link_add_object_symbols): Support .tcommon. (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS unconditionally. (struct elf_final_link_info): Add first_tls_sec. (elf_bfd_final_link): Set first_tls_sec. Compute elf_hash_table (info)->tls_segment. (elf_link_output_extsym): Handle STT_TLS symbols. (elf_link_input_bfd): Likewise. * syms.c (BSF_THREAD_LOCAL): Define. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt. * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff, elf_i386_mkobject, elf_i386_object_p): New functions. (elf_howto_table): Add TLS relocs. (elf_i386_reloc_type_lookup): Support TLS relocs. (elf_i386_info_to_howto_rel): Likewise. (struct elf_i386_link_hash_entry): Add tls_type. (struct elf_i386_obj_tdata): New. (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type): New macros. (struct elf_i386_link_hash_table): Add tls_ldm_got. (link_hash_newfunc): Clear tls_type. (elf_i386_check_relocs): Support TLS relocs. (elf_i386_gc_sweep_hook): Likewise. (allocate_dynrelocs): Likewise. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_finish_dynamic_symbol): Likewise. (bfd_elf32_mkobject, elf_backend_object_p): Define. * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset, dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done, want_tprel, want_dtpmod, want_dtprel. (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions. (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to R_IA64_LTOFF_TPREL22. (elf_code_to_howto_index): Add TLS relocs. (elfNN_ia64_check_relocs): Support TLS relocs. (allocate_global_data_got): Account for TLS .got data. (allocate_dynrel_entries): Account for TLS dynamic relocations. (elfNN_ia64_install_value): Supprt TLS relocs. (set_got_entry): Support TLS relocs. (elfNN_ia64_relocate_section): Likewise. * config/obj-elf.c (elf_common): Renamed from obj_elf_common. (obj_elf_common): Call elf_common. (obj_elf_tls_common): New function. (elf_pseudo_tab): Support .tls_common. (special_sections): Add .tdata and .tbss. (obj_elf_change_section): Set SEC_THREAD_LOCAL for SHF_TLS sections. (obj_elf_parse_section_letters): Support T in section flags (SHF_TLS). (obj_elf_parse_section_letters): Include T in error message. * config/tc-ppc.c (ppc_section_letter): Likewise. * config/tc-alpha.c (alpha_elf_section_letter): Likewise. (tc_gen_reloc): Handle SEC_THREAD_LOCAL the same way as SEC_MERGE. * config/tc-sparc.c (md_apply_fix3): Likewise. * config/tc-i386.c (tc_i386_fix_adjustable): Add TLS relocs. Define them if not BFD_ASSEMBLER. (lex_got): Support @TLSGD, @TLSLDM, @GOTTPOFF, @TPOFF, @DTPOFF and @NTPOFF. (md_apply_fix3): Add TLS relocs. * config/tc-ia64.c (enum reloc_func): Add FUNC_DTP_MODULE, FUNC_DTP_RELATIVE, FUNC_TP_RELATIVE, FUNC_LT_DTP_MODULE, FUNC_LT_DTP_RELATIVE, FUNC_LT_TP_RELATIVE. (pseudo_func): Support @dtpmod(), @dtprel() and @tprel(). (ia64_elf_section_letter): Include T in error message. (md_begin): Support TLS operators. (md_operand): Likewise. (ia64_gen_real_reloc_type): Support TLS relocs. * testsuite/gas/i386/tlspic.s: New file. * testsuite/gas/i386/tlsd.s: New file. * testsuite/gas/i386/tlsnopic.s: New file. * testsuite/gas/i386/tlsd.d: New file. * testsuite/gas/i386/tlsnopic.d: New file. * testsuite/gas/i386/tlspic.d: New file. * testsuite/gas/i386/i386.exp: Add tlsd, tlsnopic and tlspic tests. * testsuite/gas/ia64/tls.s: New file. * testsuite/gas/ia64/tls.d: New file. * testsuite/gas/ia64/ia64.exp: Add tls test. * write.c (adjust_reloc_syms): Don't change symbols in SEC_THREAD_LOCAL sections to STT_SECTION + addend. * elf/common.h (PT_TLS, SHF_TLS, STT_TLS, DF_STATIC_TLS): Define. * elf/ia64.h (R_IA64_LTOFF_TPREL22): Renamed from R_IA64_LTOFF_TP22. * elf/i386.h: Add TLS relocs. * scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss. * ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for output section if necessary. Handle .tbss. (lang_size_sections): Clear _raw_size for .tbss section (it allocates space in PT_TLS segment only). * ldwrite.c (build_link_order): Build link order for .tbss too. * readelf.c (get_segment_type): Add PT_TLS. (get_elf_section_flags): Add SHF_TLS. (get_dynamic_flags): Optimize. Add DF_STATIC_TLS. (process_dynamic_segment): Use puts instead of printf. (get_symbol_type): Support STT_TLS. * objdump.c (dump_section_header): Remove SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS. Add SEC_THREAD_LOCAL.
2002-05-08* common.h (NT_GNU_ABI_TAG): Define.Jason Thorpe
(GNU_ABI_TAG_LINUX): Define. (GNU_ABI_TAG_HURD): Define. (GNU_ABI_TAG_SOLARIS): Define. (NT_NETBSD_IDENT): Define. (NT_FREEBSD_ABI_TAG): Define.
2002-04-252002-04-24 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni
* dwarf2.h: Add DW_AT_GNU_vector.
2002-02-13bfd:Jason Thorpe
2002-02-13 Matt Fredette <fredette@netbsd.org> * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize EF_M68000. bintuls: 2002-02-13 Matt Fredette <fredette@netbsd.org> * readelf.c (get_machine_flags): Recognize EF_M68000. gas: 2002-02-13 Matt Fredette <fredette@netbsd.org> * config/tc-m68k.c (md_show_usage): No longer display a hard-coded "68020" for the default CPU, instead display the canonical name of the true, configured default CPU. (m68k_elf_final_processing): Mark objects for sub-68020 CPUs with the new EF_M68000 flag. include/elf: 2002-02-13 Matt Fredette <fredette@netbsd.org> * m68k.h (EF_M68000): Define.
2002-02-12Add DT_PPC64_OPD and DT_PPC64_OPDSZ dynamic tagsAlan Modra
2002-02-10 * alpha.h (R_ALPHA_BRSGP): New.Richard Henderson
2002-02-08Contribute sh64-elf.Alexandre Oliva
2002-01-23 Alexandre Oliva <aoliva@redhat.com> * sh.h (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16, R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16, R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16, R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16, R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16, R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16, R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16, R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8, R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64): New relocs. (R_SH_FIRST_INVALID_RELOC_4): Adjust. 2001-05-16 Alexandre Oliva <aoliva@redhat.com> * sh.h: Renumbered and renamed some SH5 relocations to match official numbers and names; moved unmaching ones to the range 0xf2-0xff. 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com> * sh.h (sh64_get_contents_type): Declare. (sh64_address_is_shmedia): Likewise. 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com> * sh.h (sh64_elf_crange): New type. (struct sh64_section_data): New. (sh64_elf_section_data): New macro. (EF_SH5): Rename back from EF_SH64. 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com> * sh.h (SHF_SH5_ISA32_MIXED, SHT_SH5_CR_SORTED, SH64_CRANGES_SECTION_NAME, SH64_CRANGE_SIZE, SH64_CRANGE_CR_ADDR_OFFSET, SH64_CRANGE_CR_SIZE_OFFSET, SH64_CRANGE_CR_TYPE_OFFSET): New macros. 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com> * sh.h (EF_SH64): Don't define EF_SH64_ABI64. 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com> * sh.h (EF_SH64_32BIT_ABI, EF_SH64_64BIT_ABI): Delete. (EF_SH64_ABI64): New. 2000-11-23 Hans-Peter Nilsson <hpn@cygnus.com> * sh.h (EF_SH64): Rename from EF_SH5. (EF_SH64_32BIT_ABI): New. (EF_SH64_64BIT_ABI): New. (R_SH_PT_16, R_SH_SHMEDIA_CODE R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2, R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16, R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16, R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL, R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL): New relocs. 2000-09-01 Ben Elliston <bje@redhat.com> * sh.h (EF_SH5): Define.
2002-02-01 * mmix.h: Tweak comments.Hans-Peter Nilsson
(MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME): New. [BFD_ARCH_SIZE] (_bfd_mmix_prepare_linker_allocated_gregs, _bfd_mmix_finalize_linker_allocated_gregs, _bfd_mmix_check_all_relocs): Provide prototypes.
2002-01-31Add support for OpenRISC 32-bit embedded processorNick Clifton
2002-01-29elf/dwarf2.h: Sync with gcc version.Jason Merrill
2002-01-16* coff/arm.h (F_VFP_FLOAT): Define.Richard Earnshaw
* elf/arm.h (F_VFP_FLOAT, EF_ARM_VFP_FLOAT): Define.
2002-01-16 * ppc.h (DT_PPC64_GLINK): Define.Alan Modra
2002-01-09include/elf:Jason Thorpe
* common.h: Update copyright years. (NT_NETBSDCORE_PROCINFO): Define. (NT_NETBSDCORE_FIRSTMACH): Define. bfd: * elf.c: Update copyright years. (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO and NT_NETBSDCORE_FIRSTMACH. Improve a comment. bintuils: * readelf.c (get_netbsd_elfcore_note_type): Use NT_NETBSDCORE_PROCINFO and NT_NETBSDCORE_FIRSTMACH.
2002-01-06 * ia64.h (ELF_STRING_ia64_unwind_hdr): New Macro for HP-UX.Alan Modra
(SHT_IA_64_HP_OPT_ANOT): Ditto (PT_IA_64_HP_OPT_ANOT): Ditto (PT_IA_64_HP_HSL_ANOT): Ditto (PT_IA_64_HP_STACK): Ditto (SHN_IA_64_ANSI_COMMON): Ditto
2001-12-17 Support for more than 64k ELF sections.Alan Modra
include/elf/ChangeLog * external.h (Elf_External_Sym_Shndx): Declare. * internal.h (struct elf_internal_sym <st_shndx>): Make it an unsigned int. * common.h (SHN_BAD): Define. bfd/ChangeLog * configure.in: Bump bfd version. * configure: Regenerate. * elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param. (bfd_elf32_swap_symbol_in): Likewise. (bfd_elf32_swap_symbol_out): Likewise. (bfd_elf64_swap_symbol_in): Likewise. (bfd_elf64_swap_symbol_out): Likewise. (elf_reloc_cookie): Add locsym_shndx field. Make locsyms a PTR. (elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and symtab_shndx_section. (elf_numsections): Define. (elf_symtab_shndx): Define. * elf.c (setup_group): Use elf_numsections rather than header e_shnum. (bfd_elf_find_section): Likewise. (bfd_section_from_elf_index): Likewise. (bfd_section_from_shdr): Likewise. Handle SHT_SYMTAB_SHNDX. (bfd_section_from_r_symndx): Read symbol shndx extension, and translate st_shndx for > SHN_HIRESERVE. (assign_section_numbers): Skip reserved sections. Assign symtab_shndx_section and elf_numsections. Exclude reserved sections from e_shnum. Set up symtab_shndx_hdr. (_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr. (map_sections_to_segments): Don't map eh_frame_hdr unless required. (assign_file_positions_except_relocs): Use elf_numsections rather than header e_shnum. Skip reserved sections and symtab_shndx_section. (prep_headers): Set name for symtab_shndx_hdr. (_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections. (_bfd_elf_write_object_contents): Likewise. Skip reserved sections. (_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section first. Use elf_section_data if available. Use elf_numsections. Start scan at index 1. (copy_private_bfd_data ): Comment fixes. (MAP_ONESYMTAB): Define above SHN_HIOS. (MAP_DYNSYMTAB): Likewise. (MAP_STRTAB): Likewise. (MAP_SHSTRTAB): Likewise. (MAP_SYM_SHNDX): New define. (_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section. (swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too. * elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx extension. (elf_swap_symbol_out): Likewise. (elf_object_p): Set elf_numsections, and use instead of e_shnum. Initialialise reserved elf_elfsections to point at shdr[0]. Remove redundant bfd_release calls. (elf_slurp_symbol_table): Read symbol shndx extension, and use with elf_swap_symbol_in. Translate st_shndx for > SHN_HIRESERVE too. * elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx extension, and use with elf_swap_symbol_in. (elf_link_record_local_dynamic_symbol): Likewise. (elf_link_add_object_symbols): Likewise. Also translate st_shndx for elf sections > SHN_HIRESERVE. (NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out call. (struct elf_final_link_info): Add locsym_shndx and symshndxbuf. (elf_bfd_final_link): Allocate the above, and tidy code allocating other buffers. Use elf_numsections instead of e_shnum. Adjust elf_swap_symbol_out calls. (elf_link_output_sym): Swap out symbol shndx extension too. (elf_link_flush_output_syms): And flush them to disk. (elf_link_output_extsym): Use SHN_BAD. Adjust elf_swap_symbol_out calls. (elf_gc_mark): Read symbol shndx extension, and use with elf_swap_symbol_in. (elf_link_input_bfd): Likewise, Translate st_shndx for elf sections > SHN_HIRESERVE too. Use SHN_BAD. (elf_reloc_symbol_deleted_p): Use symbol shndx extensions with elf_swap_symbol_in. Translate st_shndx > SHN_HIRESERVE too. (elf_bfd_discard_info): Read symbol shndx extension. Don't attempt to continue after a bfd error. * elf-m10200.c (mn10200_elf_relax_section): Only read local syms. Stash them immediately to symtab_hdr->contents rather than later in multiple places. Clean up afterwards. Read symbol shndx extension, and use with swap_symbol_in. Translate SHN_UNDEF, SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd sections too. Remove dead code. (mn10200_elf_relax_delete_bytes): Use symbol shndx extension when swapping in symbols. Tidy code adjusting global syms. Don't swap in global syms. (mn10200_elf_symbol_address_p): Likewise. Remove extsyms param. (mn10200_elf_get_relocated_section_contents): Read symbol shndx extension, and use with swap_symbol_in. Rename "size" -> "amt" to maximize code in common with other files. Translate st_shndx for > SHN_HIRESERVE too. Remove dead code. * elf-m10300.c (mn10300_elf_relax_section): Only read local syms. Stash them immediately to symtab_hdr->contents rather than later in multiple places. Clean up afterwards. Read symbol shndx extension, and use with swap_symbol_in. Remove dead code. (mn10300_elf_relax_delete_bytes): As for elf-m10200.c. (mn10300_elf_symbol_address_p): Likewise. (mn10300_elf_get_relocated_section_contents): Likewise. * elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c. (elf32_h8_relax_delete_bytes): Likewise. (elf32_h8_symbol_address_p): Likewise. (elf32_h8_get_relocated_section_contents): Likewise. * elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx extension, and use with swap_symbol_in. * elf64-hppa.c (elf64_hppa_check_relocs): Likewise. * elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to bfd_elf32_swap_symbol_out. * elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate elf sections > SHN_HIRESERVE too. * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read local syms. Read symbol shndx extension, and use with swap_symbol_in. * elf32-mips.c (_bfd_mips_elf_final_write_processing): Use elf_numsections rather than header e_shnum. * elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c. (sh_elf_relax_delete_bytes): Likewise. (sh_elf_get_relocated_section_contents): Likewise. Only read local symbols. * elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to hold section index. Use elf_numsections rather than e_shnum. Rename "index" -> "indx" to avoid shadowing warning. (v850_elf_add_symbol_hook): Likewise. * elf64-alpha.c (elf64_alpha_relax_section): Only read local syms. Read symbol shndx extension, and use with swap_symbol_in. * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise. Translate SHN_COMMON and elf sections > SHN_HIRESERVE too. * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise. (elfNN_ia64_aix_add_symbol_hook): Use elf_numsections. * elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks before calling bfd_section_from_elf_index on local syms. * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise. * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise. * elf32-cris.c (cris_elf_gc_mark_hook): Likewise. * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise. * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise. * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise. * elf32-i386.c (elf_i386_gc_mark_hook): Likewise. * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise. * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise. * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise. * elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise. * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise. * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise. * elf32-s390.c (elf_s390_gc_mark_hook): Likewise. * elf32-sh.c (sh_elf_gc_mark_hook): Likewise. * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise. * elf32-v850.c (v850_elf_gc_mark_hook): Likewise. * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise. * elf64-mips.c (mips_elf64_gc_mark_hook): Likewise. * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise. * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise. * elf64-s390.c (elf_s390_gc_mark_hook): Likewise. * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise. binutils/ChangeLog * readelf.c (symtab_shndx_hdr): New global. (SECTION_HEADER_INDEX): Define. (SECTION_HEADER_NUM): Define. (SECTION_HEADER): Define. (GET_ELF_SYMBOLS): Pass two params rather than three. (get_32bit_elf_symbols): Take file and section args. Read and use SHT_SYMTAB_SHNDX. (get_64bit_elf_symbols): Likewise. (dump_relocations): Use SECTION_HEADER to index "section_headers". (process_section_headers): Likewise. Use SECTION_HEADER_NUM too. Remember symtab_shdx_hdr. (process_program_headers): Scan from index 1 for segment map. (slurp_ia64_unwind_table): Use SECTION_HEADER to index "section_headers". (process_relocs): Likewise. Also adjust call to GET_ELF_SYMBOLS. (process_unwind): Likewise. (process_version_sections): Likewise. (process_symbol_table): Likewise. (display_debug_info): Likewise. (process_dynamic_segment): Fake up a symtab section for changed GET_ELF_SYMBOLS. (get_symbol_index_type): Check SHN_LOOS before SHN_LORESERVE. (process_program_headers): Kill signed/unsigned warning. (load_debug_str): Likewise. (display_debug_info): Likewise.
2001-12-13 * elf-bfd.h (enum elf_link_info_type): New.Jakub Jelinek
(struct bfd_elf_section_data): Remove stab_info and merge_info fields, add sec_info and sec_info_type. (struct elf_obj_tdata): Add eh_frame_hdr field. (_bfd_elf_discard_section_eh_frame): New prototype. (_bfd_elf_discard_section_eh_frame_hdr): Likewise. (_bfd_elf_eh_frame_section_offset): Likewise. (_bfd_elf_write_section_eh_frame): Likewise. (_bfd_elf_write_section_eh_frame_hdr): Likewise. * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo. (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c. (elf-eh-frame.lo): New. * Makefile.in: Rebuilt. * configure.in (elf): Add elf-eh-frame.lo. * configure: Rebuilt. * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME. (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested. (get_program_header_size): Take into account PT_GNU_EH_FRAME segment. (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info. (_bfd_elf_rel_local_sym): Likewise. (_bfd_elf_section_offset): Likewise. Call _bfd_elf_eh_frame_section_offset too. * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and sec_info. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf-eh-frame.c: New file. * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE .stab sections. Set sec_info_type, use sec_info instead of merge_info and stab_info. (elf_link_create_dynamic_sections): Create .eh_frame_hdr section if --eh-frame-hdr. (elf_bfd_final_link): Write .eh_frame_hdr section. (elf_link_sec_merge_syms): Use sec_info_type and sec_info. (elf_link_input_bfd): Likewise. Call _bfd_elf_write_section_eh_frame to write .eh_frame sections. (elf_bfd_discard_info): Add output_bfd argument. Call _bfd_elf_discard_section_eh_frame and _bfd_elf_discard_section_eh_frame_hdr. (elf_section_ignore_discarded_relocs): Use sec_info_type, not section names. * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust prototypes. * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise. * elf/common.h (PT_GNU_EH_FRAME): Define. * bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field. * emultempl/elf32.em (finish): Supply output_bfd to bfd_elf*_discard_info. (OPTION_EH_FRAME_HDR): Define. (longopts): Add --eh-frame-hdr. (parse_args): Handle it. (list_options): Add --eh-frame-hdr to help. * emultempl/hppaelf.em (finish): Supply output_bfd to bfd_elf*_discard_info. * scripttempl/elf.sc (.eh_frame_hdr): Add. * readelf.c (get_segment_type): Support PT_GNU_EH_FRAME.