* readelf.c (process_corefile_note_segment): Fix off-by-one errors
verifying the contents of a note.
* binutils-all/version.s: New test source file.
* binutils-all/readelf.n: New file: expected readelf output.
* binutils-all/readelf.exp: Add test of .note section contents.
(objdump -WL): Skip this test on MCore, Moxie and OpenRisc
targets.
* binutils-all/objcopy.exp (localize-hidden-1): Expect this test
to fail on MIPS based targets.
Fix a syntax error bug when compiling rc files with the VERSIONINFO resource
containing more than one language block inside a single StringFileInfo block.
* windint.h (rc_ver_stringtable): New structure definition.
(rc_ver_info): Use it.
* rcparse.y (verstringtable): New variable.
(verstringtables): New type.
(verstringtables:): New rule declaration.
(verblocks:): Use it.
* resrc.c (append_ver_stringtable): New function.
(append_ver_stringfileinfo): Update to use stringtables.
* windres.h (append_ver_stringfileinfo): Update declaration.
(append_ver_stringtable): New declaration.
* resrc.c (write_rc_versioninfo): Update to support multiple blocks.
* resbin.c (bin_to_res_version): Likewise.
(res_to_bin_versioninfo): Likewise.
* binutils-all\windres\version.rsd: Regenerate.
* binutils-all\windres\version_cat.rsd: Regenerate.
* binutils-all\windres\version_mlang.rc: Add new test.
* binutils-all\windres\version_mlang.rsd: Likewise.
2011-10-04 Paul Woegerer <paul_woegerer@mentor.com>
Carlos O'Donell <carlos@codesourcery.com>
* dwarf.c (display_debug_lines_decoded): Index directory_table with
directory_index from file_table entry.
binutils/testsuite/
2011-10-04 Carlos O'Donell <carlos@codesourcery.com>
* binutils-all/dw2-decodedline.S: New file.
* binutils-all/objdump.WL: New file.
* binutils-all/objdump.exp: Update copyright year.
New test case for -WL.
binutils/
2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/13180
* objcopy.c (is_strip_section_1): New.
(is_strip_section): Use it. Remove the group section if all
members are removed.
binutils/testsuite/
2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/13180
* binutils-all/group-6.d: New.
* binutils-all/group-6.s: Likewise.
* binutils-all/objcopy.exp: Run group-6 for ELF targrts.
* nm.c (filter_symbols): Treat unique symbols as global symbols.
* doc/binutils.texi (nm): Mention that some lowercase letters
actually indicate global symbols.
* lib/utils-lib.exp (run_dump_test): Allow nm as a program.
* binutils-all/nm.exp: Test running "nm -g" on an object file
containing a unique symbol.
opcodes/
* arm-dis.c (print_insn): init vars moved into private_data structure.
binutils/testsuite/
* binutils-all/arm/simple.s: Demo issue with objdump with
multiple input files
* binutils-all/arm/objdump.exp: added new ARM test case code
* tic6x.h (R_C6000_JUMP_SPLOT, R_C6000_EHTYPE,
R_C6000_PCR_H16, R_C6000_PCR_L16): New relocs.
(SHN_TIC6X_SCOMMON): Define.
bfd/
* elf32-tic6x.h (struct elf32_tic6x_params): New.
(elf32_tic6x_setup): Declare.
* elf32-tic6x.c: Include <limits.h>.
(ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
(struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
New structures.
(elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
(tic6x_elf_scom_section, tic6x_elf_scom_symbol,
tic6x_elf_scom_symbol_ptr): New static variables.
(elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
R_C6000_PCR_H16 and R_C6000_PCR_L16.
(elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
elf32_tic6x_adjust_dynamic_symbol): New static functions.
(elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
to weak symbols as required by the ABI.
Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
as needed when generating DSBT output.
(elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
New static functions.
(ELF_MAXPAGESIZE): Define to 0x1000.
(bfd_elf32_bfd_copy_private_bfd_data,
bfd_elf32_bfd_link_hash_table_create,
bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
elf_backend_want_got_plt, elf_backend_want_dynbss,
elf_backend_plt_readonly, elf_backend_got_header_size,
elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
elf_backend_check_relocs, elf_backend_add_symbol_hook,
elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
elf_backend_section_from_bfd_section,
elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
* bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
* bfd/bfd-in2.h: Regenerate.
* bfd/libbfd.h: Regenerate.
* config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
gas/
* config/tc-tic6x.c (sbss_section, scom_section, scom_symbol): New
static variables.
(md_begin): Initialize them.
(s_tic6x_scomm): New static function.
(md_pseudo_table): Add "scomm".
(tc_gen_reloc): Really undo all adjustments made by
bfd_install_relocation.
* doc/c-tic6x.texi: Document the .scomm directive.
gas/testsuite/
* gas/tic6x/scomm-directive-1.s: New test.
* gas/tic6x/scomm-directive-1.d: New test.
* gas/tic6x/scomm-directive-2.s: New test.
* gas/tic6x/scomm-directive-2.d: New test.
* gas/tic6x/scomm-directive-3.s: New test.
* gas/tic6x/scomm-directive-3.d: New test.
* gas/tic6x/scomm-directive-4.s: New test.
* gas/tic6x/scomm-directive-4.d: New test.
* gas/tic6x/scomm-directive-5.s: New test.
* gas/tic6x/scomm-directive-5.d: New test.
* gas/tic6x/scomm-directive-6.s: New test.
* gas/tic6x/scomm-directive-6.d: New test.
* gas/tic6x/scomm-directive-7.s: New test.
* gas/tic6x/scomm-directive-7.d: New test.
* gas/tic6x/scomm-directive-8.s: New test.
* gas/tic6x/scomm-directive-8.d: New test.
ld/
* emulparams/elf32_tic6x_le.sh (BIG_OUTPUT_FORMAT, EXTRA_EM_FILE,
GENERATE_SHLIB_SCRIPT): New defines.
(TEXT_START_ADDR): Define differently depending on target.
(.got): Redefine to include "*(.dsbt)".
(SDATA_START_SYMBOLS): Remove, replace with
(OTHER_GOT_SYMBOLS): New.
(OTHER_BSS_SECTIONS): Define only for ELF targets.
* emultempl/tic6xdsbt.em: New file.
* gen-doc.texi: Set C6X.
* ld.texinfo: Likewise.
(Options specific to C6X uClinux targets): New section.
binutils/
* readelf.c (get_symbol_index_type): Handle SCOM for TIC6X.
(dump_relocations): Likewise.
binutils/testsuite/
* lib/binutils-common.exp (is_elf_format): Accept tic6x*-*-uclinux*.
ld/testsuite/
* ld-scripts/crossref.exp: Add CFLAGS for tic6x*-*-*.
* ld-elf/sec-to-seg.exp: Remove tic6x from list of targets defining
pagesize to 1.
* ld-tic6x/tic6x.exp: Add support for DSBT shared library/executable
linking tests.
* ld-tic6x/dsbt.ld: New linker script.
* ld-tic6x/dsbt-be.ld: New linker script.
* ld-tic6x/dsbt-overflow.ld: New linker script.
* ld-tic6x/dsbt-inrange.ld: New linker script.
* ld-tic6x/shlib-1.s: New test.
* ld-tic6x/shlib-2.s: New test.
* ld-tic6x/shlib-app-1r.s: New test.
* ld-tic6x/shlib-app-1.s: New test.
* ld-tic6x/shlib-1.sd: New test.
* ld-tic6x/shlib-1.dd: New test.
* ld-tic6x/shlib-app-1.rd: New test.
* ld-tic6x/shlib-app-1rb.rd: New test.
* ld-tic6x/shlib-app-1.sd: New test.
* ld-tic6x/static-app-1rb.od: New test.
* ld-tic6x/shlib-app-1.dd: New test.
* ld-tic6x/shlib-app-1rb.sd: New test.
* ld-tic6x/static-app-1b.od: New test.
* ld-tic6x/static-app-1r.od: New test.
* ld-tic6x/shlib-1rb.rd: New test.
* ld-tic6x/shlib-app-1rb.dd: New test.
* ld-tic6x/shlib-1rb.sd: New test.
* ld-tic6x/shlib-1rb.dd: New test.
* ld-tic6x/shlib-app-1b.od: New test.
* ld-tic6x/tic6x.exp: New test.
* ld-tic6x/static-app-1rb.rd: New test.
* ld-tic6x/shlib-app-1r.od: New test.
* ld-tic6x/static-app-1.od: New test.
* ld-tic6x/static-app-1b.rd: New test.
* ld-tic6x/static-app-1r.rd: New test.
* ld-tic6x/static-app-1rb.sd: New test.
* ld-tic6x/static-app-1b.sd: New test.
* ld-tic6x/static-app-1rb.dd: New test.
* ld-tic6x/static-app-1r.sd: New test.
* ld-tic6x/static-app-1b.dd: New test.
* ld-tic6x/shlib-1b.rd: New test.
* ld-tic6x/static-app-1r.dd: New test.
* ld-tic6x/shlib-app-1b.rd: New test.
* ld-tic6x/shlib-1r.rd: New test.
* ld-tic6x/shlib-app-1r.rd: New test.
* ld-tic6x/shlib-1b.sd: New test.
* ld-tic6x/static-app-1.rd: New test.
* ld-tic6x/shlib-app-1b.sd: New test.
* ld-tic6x/shlib-1r.sd: New test.
* ld-tic6x/shlib-1b.dd: New test.
* ld-tic6x/shlib-app-1r.sd: New test.
* ld-tic6x/shlib-app-1b.dd: New test.
* ld-tic6x/shlib-1r.dd: New test.
* ld-tic6x/static-app-1.sd: New test.
* ld-tic6x/shlib-app-1r.dd: New test.
* ld-tic6x/static-app-1.dd: New test.
* ld-tic6x/shlib-noindex.rd: New test.
* ld-tic6x/shlib-noindex.dd: New test.
* ld-tic6x/shlib-noindex.sd: New test.
* ld-tic6x/got-reloc-local-1.s: New test.
* ld-tic6x/got-reloc-local-2.s: New test.
* ld-tic6x/got-reloc-local-r.d: New test.
* ld-tic6x/got-reloc-global.s: New test.
* ld-tic6x/got-reloc-global-addend-1.d: New test.
* ld-tic6x/got-reloc-global-addend-1.s: New test.
* ld-tic6x/got-reloc-global-addend-2.d: New test.
* ld-tic6x/got-reloc-inrange.d: New test.
* ld-tic6x/got-reloc-overflow.d: New test.
* ld-tic6x/got-reloc-global-addend-2.s: New test.
* ld-tic6x/dsbt-index-error.d: New test.
* ld-tic6x/dsbt-index.d: New test.
* ld-tic6x/dsbt-index.s: New test.
* ld-tic6x/shlib-app-1.od: New test.
* ld-tic6x/shlib-app-1rb.od: New test.
* ld-tic6x/shlib-1.rd: New test.
* ld-tic6x/weak.d: New test.
* ld-tic6x/weak-be.d: New test.
* ld-tic6x/weak.s: New test.
* ld-tic6x/weak-data.d: New test.
* ld-tic6x/common.d: New test.
* ld-tic6x/common.ld: New test.
* ld-tic6x/common.s: New test.
* config/tc-mips.c (file_ase_mips16): Adjust comment.
(append_insn): Update file_ase_mips16.
(mips_after_parse_args): Don't set file_ase_mips16 here.
gas/testsuite/
* gas/mips/elf_ase_mips16.d: Update test for new MIPS16 ASE flag
semantics.
* gas/mips/elf_ase_mips16-2.d: New test.
* gas/mips/nop.s: Source for the new test.
* gas/mips/mips.exp: Run the new test.
binutils/testsuite/
* lib/binutils-common.exp (regexp_diff): Implement inverse
matching, requested by `!'.
2010-11-15 H.J. Lu <hongjiu.lu@intel.com>
* binutils-all/compress.exp: Replace binutils_assemble with
binutils_assemble_flags for --nocompress-debug-sections.
* config/obj-elf.c (elf_adjust_symtab): New. Move group section
processing here from elf_frob_file. Ensure that group signature
symbols have the name of the group.
(elf_frob_file): Move group section processing to
elf_adjust_symtab.
* config/obj-elf.h (elf_adjust_symtab): Declare.
(obj_adjust_symtab): Define.
* config/tc-arm.c (arm_adjust_symtab): Call elf_adjust_symtab.
2010-10-23 Mark Mitchell <mark@codesourcery.com>
* gas/elf/elf.exp: Add group0c test.
* gas/elf/group0c.d: New.
* gas/elf/group0a.d: Expect ".group" for the name of group
sections.
* gas/elf/group0b.d: Likewise.
* gas/elf/group1a.d: Likewise.
* gas/elf/group1b.d: Likewise.
* gas/elf/groupautoa.d: Likewise.
* gas/elf/groupautob.d: Likewise.
* gas/elf/section4.d: Likewise.
* gas/ia64/group-1.d: Likewise. Adjust hard-coded constants.
2010-10-22 Mark Mitchell <mark@codesourcery.com>
* binutils-all/group-5.d: Expect ".group" for the name of group
sections.
* binutils-all/strip-2.d: Likewise.
2010-10-23 Mark Mitchell <mark@codesourcery.com>
* ld-elf/group10.d: Expect ".group" for the name of group
sections.
* ld-elf/group2.d: Likewise.
* ld-elf/group7.d: Likewise.
* binutils-all/copy-2.d: Update not-target list.
* binutils-all/note-1.d: Don't run on h8300.
* binutils-all/objcopy.exp: Don't run strip-10 on msp or hpux.
(objcopy_test): Remove h8300-rtems from xfails.
of more than one byte at a time.
(copy_width): New variable.
(copy_options): Add --interleave-width.
(copy_section): When interleaving copy in units of copy_width
bytes.
(copy_main): Parse the new option.
* doc/binutils: Document the new option.
* NEWS: Mention the new feature.
* binutils-all/objcopy.exp: Add test of new --interleave-width
option.
* dlltool.c (main): Query for bfd's underscoring default for
default target case.
2010-04-27 Kai Tietz <kai.tietz@onevision.com>
* binutils-all/dlltool.exp: Allow test for
arm-wince-pe target.
* objcopy.c (copy_main): Rewrite OPTION_ADD_SECTION code to work
with non-ordinary files like /dev/null.
binutils/testsuite/:
* lib/utils-lib.exp (run_dump_test): Permit option values to use
$srcdir to refer to the source directory.
* binutils-all/add-section.d: New test.
* binutils-all/add-empty-section.d: New test.
* binutils-all/empty-file: New test input file.
* binutils-all/objcopy.exp: Run new tests.
binutils/
2010-01-08 H.J. Lu <hongjiu.lu@intel.com>
* elfedit.c (input_elf_type): New.
(output_elf_type): Likewise.
(elf_type): Likewise.
(update_elf_header): Support updating ELF file type.
(command_line_switch): Add OPTION_INPUT_TYPE and
OPTION_OUTPUT_TYPE.
(options): Likewise.
(usage): Add --input-type and --output-type.
(main): Handle OPTION_INPUT_TYPE and OPTION_OUTPUT_TYPE. Check
one of --output-mach and --output-type must be specified.
* doc/binutils.texi: Document --input-type and --output-type
for elfedit.
binutils/testsuite/
2010-01-08 H.J. Lu <hongjiu.lu@intel.com>
* binutils-all/elfedit-2.d: New.
* binutils-all/elfedit.exp: Run elfedit-2.
* deflex.l: Allow '<' and '>' in ID names.
* defparse.y (EQUAL): New token constant.
(opt_import_name): New rule for emptry or '==' ID.
(expline): Add opt_import_name as last line element.
(impline): Likewise.
* dlltool.c (ifunct): New member its_name.
(export): Likewise.
(append_import): Add its_name argument.
(defexports): Likewise.
(defimport): Likewise.
(scan_drectve_symbols): Adjust calls to def_exports.
(dump_def_info): Print new optinal import/export table
symbol name.
(generate_idata_ofile): Use its_name member.
(make_one_lib_file): Likewise.
(nfunc): Take its_name in account on sort.
* dlltool.h (def_exports): Add its_name as argument.
(def_import): Likewise.
* doc/binutils.texi: Add new def file syntax extension.
* deflex.l (EQUAL): Add rule for '=='.
* NEWS: Mention new feature.
2009-10-23 Kai Tietz <kai.tietz@onevision.com>
* binutils-all/dlltool.exp: Add new test.
* binutils-all/alias-2.def: New file.
* binutils-all/arm/thumb2-cond.s: Use instructions instead of
.short.
gas/
* config/obj-elf.c (obj_elf_ident): Notify section change to the hook.
* config/tc-arm.c (make_mapping_symbol): New function, from
mapping_state. Save mapping symbols in the frag.
(insert_data_mapping_symbol): New.
(mapping_state): Use make_mapping_symbol, improve state transitions.
(mapping_state_2): New. Provide dummy definition.
(opcode_select): Do not call mapping_state.
(s_bss): Call md_elf_section_change_hook instead of mapping_state.
(output_inst): Update use of tc_frag_data.
(new_automatic_it_block): Call mapping_state before emitting the
IT instruction.
(md_assemble): Move mapping_state to just before outputting the
new instruction.
(arm_handle_align): Update use of tc_frag_data.
Call insert_data_mapping_symbol.
(arm_init_frag): Update use of tc_frag_data. Call
mapping_state_2.
(arm_elf_change_section): Always update the mapping symbol FSM state.
(check_mapping_symbols): New function.
(arm_adjust_symtab): Use check_mapping_symbols.
* config/tc-arm.h (struct arm_frag_type): New.
(TC_FRAG_TYPE): Change to struct arm_frag_type.
(TC_FRAG_INIT): Pass max_chars.
(arm_init_frag): Update prototype.
gas/testsuite/
* gas/arm/mapdir.d, gas/arm/mapdir.s: New files.
* gas/arm/mapping.d: Adapted to new symbols generation.
* gas/arm/mapping2.d: New test case.
* gas/arm/mapping2.s: New file.
* gas/arm/mapping3.d: New test case.
* gas/arm/mapping3.s: New file.
* gas/arm/mapping4.d: New test case.
* gas/arm/mapping4.s: New file.
* gas/arm/mapshort-eabi.d: Adapted to new symbols generation.
* gas/elf/section2.e-armeabi: Adapted to new symbols generation.
2009-03-11 Chris Demetriou <cgd@google.com>
* bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
* bfd-in2.h: Regenerate.
* archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
mode.
(bsd_write_armap): Likewise.
(_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
flag is set, do nothing.
(coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
for timestamp.
[binutils/ChangeLog]
2009-03-11 Chris Demetriou <cgd@google.com>
* ar.c (deterministic): New global variable.
(main): Recognize new 'D' option, which enables 'deterministic mode'.
(usage): Document new 'D' option.
(write_archive): Set BFD_DETERMINISTIC_OUTPUT in output archive's
flags if deterministic mode was requested.
* doc/binutils.texi (ar): Document deterministic mode ('D' option).
[binutils/testsuite/ChangeLog]
2009-03-11 Chris Demetriou <cgd@google.com>
* binutils-all/ar.exp (deterministic_archive): New test.
* gas/all/gas.exp: Expect forward test to fail for MeP.
Expect relax test to fail for MeP.
* gas/mep/relocs.d: Update expected disassembly.
* lib/ld-lib.exp (check_gc_sections_available): Add MeP to list of
targets which do not support garbage collection.
* ld-srec/srec.exp (run_srec_test): Expect tests to fail for MeP.
* ld-elf/group8a.d: Likewise.
* ld-elf/group8b.d: Likewise.
* ld-elf/group9a.d: Likewise.
* ld-elf/group9b.d: Likewise.
* binutils-all/objdump.W: Do not assume that high and low PC
addresses will have been computed.
* binutils-all/group-4.s: New.
* binutils-all/strip-8.d: Likewise.
* binutils-all/strip-9.d: Likewise.
* binutils-all/objcopy.exp: Test objcopy on group-4.s. Run
strip-8 and strip-9.
* binutils-all/group-3.s: New.
* binutils-all/strip-6.d: Likewise.
* binutils-all/strip-7.d: Likewise.
* binutils-all/objcopy.exp: Test objcopy on group-3.s. Run
strip-6 and strip-7.
* binutils-all/group-2.s: New.
* binutils-all/strip-4.d: Likewise.
* binutils-all/strip-5.d: Likewise.
* binutils-all/objcopy.exp: Test objcopy on group-2.s. Run
strip-4 and strip-5.