aboutsummaryrefslogtreecommitdiff
path: root/binutils
AgeCommit message (Collapse)AuthorFilesLines
2015-11-09binutils: Fix left shift of negative value.Dominik Vogt2-1/+5
This patch fixes all occurences of left-shifting negative constants in C code which is undefined by the C standard. binutils/ChangeLog: * dwarf.c (read_leb128): Fix left shift of negative value.
2015-11-03readelf verdef and verneedAlan Modra2-164/+143
readelf ought to notify when a symbol wrongly has both a version definition and a needed version. This patch does that, and removes the heuristic that only defined symbols in SHT_NOBITS sections have verneed entries. * readelf (process_version_sections): Check DT_VERNEED and DT_VERDEF for all symbols. Report "*both*" should a symbol have both a verneed and verdef. (get_symbol_version_string): Reduce indentation by early exits. Don't use SHT_NOBITS heuristic to detect case where a defined symbol has a verneed entry.
2015-10-30Updated (simplified) Chinese translations for ld, bfd, binutils and gold.Nick Clifton2-2439/+6989
* po/zh_CN.po: Updated (simplified) Chinese translation.
2015-10-27Add support to readelf for reading NetBSD ELF core notes.Stephen Fisher2-0/+43
binutils * binutils.c (process_netbsd_elf_note): New function. (process_note): Call the new function for NetBSD core notes. include * common.h (NT_NETBSD_MARCH): Define.
2015-10-22binutils/objcopy.c (setup_section): missing extract_symbol partHans-Peter Nilsson2-5/+5
* objcopy.c (setup_section): Don't omit bfd_copy_private_bfd_data call when extract_symbol.
2015-10-22Run add-symbol test on mipsAlan Modra2-4/+7
* binutils-all/add-symbol.d: Run test on mips. Support either order of NEW and NEWDATA symbols.
2015-10-21Fix typo in spelling of author's name.Ronald Hoogenboom2-2/+2
2015-10-21Add ability for objcopy to insert new symbols into a binary.Ronald Hoogenbllon7-100/+356
PR binutils/19104 binutils * objcopy.c (command_line_switch): Add OPTION_ADD_SYMBOL. (copy_options): Add add-symbol. (copy_usage): Likewise. (parse_symflags): New function. (need_sym_before): New function. (create_new_symbol): New function. (filter_symbols): Add code to insert new symbols. (copy_main): Process OPTION_ADD_SYMBOL. * doc/binutils.texi: Document new feature. * NEWS: Add note about the new feature. tests * binutils-all/add-symbol.d: New test. * binutils-all/objcopy.exp: Run the new test.
2015-10-18Fix PR binutils/19147 -- off by one when printing NT_FILE note.Paul Pluzhnikov2-1/+6
2015-10-15binutils objcopy test tidyAlan Modra2-109/+126
The main aim of this patch is to perform more objcopy tests when we can build executables but not run them. ie. non-native with cross compiler available. * binutils-all/objcopy.exp: Delete trailing whitespace. Use "string equal" rather than "string match" when making simple string comparisons. Revert 2008-07-08 host_triplet checks. Perform non-run tests when we can build executable. (strip_executable, strip_executable_with_saving_a_symbol): Move run test later. Take extra param on whether to perform run test. Update callers. (keep_debug_symbols_and_test_copy): Delete unused vars.
2015-10-15objcopy --extract-symbolAlan Modra2-5/+5
Calling bfd_copy_private_bfd_data is necessary to copy ELF file header info. binutils/ * objcopy.c (copy_object): Don't omit bfd_copy_private_bfd_data call when extract_symbol. bfd/ * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion that input and output .note.renesas sections are same size. Instead, only copy input to output if they are.
2015-10-12avr: Fix bugs in org/align tracking.Andrew Burgess2-3/+8
This commit fixes a few issues in the mechanism for passing information about ".org" and ".align" directives from the assembler to the linker, used by the avr target. In the original commit fdd410ac7a07dfb47dcb992201000582a280d8b2, there were some mistakes when writing out information about ".align" directives: - An align with fill does not write out its information correctly, the fill data overwrites the alignment data. - Each alignment directive is recorded at the location where the previous alignment directive should be recorded, the first alignment directive is discarded. In commit 137c83d69fad77677cc818593f9399caa777a0c5, the data produced by objdump is not correct: - It's miss-aligned due to a missing whitespace. - The fill data for align with fill records is not displayed correctly. All of the above issues are addressed in this commit, and the test is improved to cover these cases. binutils/ChangeLog: * od-elf32_avr.c (elf32_avr_dump_avr_prop): Fix printing of align specific data, fix formatting for align and org data. gas/ChangeLog: * config/tc-avr.c (avr_output_property_record): Fix overwrite bug for align and fill records. (avr_handle_align): Record fill information for align frags. (create_record_for_frag): Add next frag assertion, use correct address for align records. gas/testsuite/ChangeLog: * gas/avr/avr-prop-1.s: Use fill in some cases. * gas/avr/avr-prop-1.d: Update expected results.
2015-10-07New ARC implementation.Nick Clifton4-2/+90
bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-09-30Handle symbolic link when copying source fileH.J. Lu2-0/+12
* lib/utils-lib.exp (run_dump_test): Handle symbolic link when copying source file.
2015-09-29Don't use the output section size to copy input sectionH.J. Lu8-28/+54
We can't use the output section size to copy input section since --interleave will shrink the output section. Instead, we change bfd_convert_section_contents to return the updated input section size. When we do that, we don't need to adjust the output section size to skip gap fills. bfd/ PR binutils/19020 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter. * bfd-in2.h: Regenerated. binutils/ PR binutils/19020 * objcopy.c (copy_object): Don't adjust the output section size when copying from input sections. (copy_section): Use input section size for the copy. Get the updated section size from bfd_convert_section_contents. binutils/testsuite/ PR binutils/19020 * binutils-all/objcopy.exp: Run pr19020a and pr19020b. * lib/utils-lib.exp (run_dump_test): Support binary input. * binutils-all/pr19020.in: New file. * binutils-all/pr19020a.d: Likewise. * binutils-all/pr19020b.d: Likewise.
2015-09-29Adjust the output section size to skip gap fillsH.J. Lu2-4/+27
In objcopy, copy_object calls copy_section to copy contents of input section to output section. When --gap-fill= is used, objcopy extends the size of output sectios to fill gaps between output sections with gap fills. In this case, we adjust the output section size to skip gap files to avoid reading beypond the input section buffer before calling copy_section and restore the output section size after input sections have been copied. binutils/ PR binutils/19005 * objcopy.c (copy_object): Adjust the output section size to skip gap fills between sections when copying from input sections to output sections. ld/testsuite/ PR binutils/19005 * ld-elf/pr19005.d: New file. * ld-elf/pr19005.s: Likewise. * ld-elf/pr19005.t: Likewise.
2015-09-28Updare French translation for binutils and German translation for opcodes.Nick Clifton2-7/+11
2015-09-25The FT32's disassembly of 10-bit literals has the incorrect mask.jamesbowman1-0/+4
[opcodes] * ft32-dis.c (print_insn_ft32): Fix incorrect data field mask.
2015-09-23Add support for files that contain multiple symbol index tables. Fixes PR 15835Nick Clifton2-46/+68
binutils PR binutils/15835 * readelf.c (struct elf_section_list): New structure. (symtab_shndx_hdr): Replace with symtab_shndx_list. (get_32bit_elf_symbols): Scan for a symbol index table matching the symbol table in use. (get_64bit_elf_symbols): Likewise. (process_section_headers): Handle multiple symbol index sections. bfd * elf-bfd.h (struct elf_section_list): New structure. (struct elf_obj_tdata): Replace symtab_shndx_hdr with symtab_shndx_list. Delete symtab_shndx_section. (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list. * elf.c (bfd_elf_get_syms): If symtab index sections are present, scan them for the section that matches the provided symbol table. (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections. (assign_section_numbers): Use the first symtab index table in the list. (_bfd_elf_compute_section_file_positions): Replace use of symtab_shndx_hdr with use of symtab_shndx_list. (find_section_in_list): New function. (assign_file_postions_except_relocs): Use new function. (_bfd_elf_copy_private_symbol_data): Likewise. (swap_out_syms): Handle multiple symbol table index sections. * elf32-m32c.c (m32c_elf_relax_section): Replace use of symtab_shndx_hdr with use of symtab_shndx_list. * elf32-rl78.c (rl78_elf_relax_section): Likewise. * elf32-rx.c (rx_relax_section): Likewise. * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise. * elflink.c (bfd_elf_final_link): Likewise.
2015-09-22Solaris PIE supportRainer Orth2-0/+14
include/elf: * common.h (DF_1_STUB, DF_1_PIE): Define. ld: * emulparams/solaris2.sh (GENERATE_PIE_SCRIPT): Set to yes. * emultempl/elf32.em: Include ldlex.h. (gld${EMULATION_NAME}_handle_option) [GENERATE_PIE_SCRIPT] <OPTION_PIE>: Set DF_1_PIE. binutils: * readelf.c (process_dynamic_section): Handle DF_1_STUB, DF_1_PIE.
2015-09-10Adds an option to the strings program to specify a separator between the ↵Erik Ackermann4-2/+37
emitted pieces of text. * strings.c: Add -s/--output-separator option to specify custom separator string. * NEWS: Mention the new feature. * doc/binutils.text (strings): Document the new command line option.
2015-09-09Remove sentance in binutils documentation saying that thin archives cannot ↵Nick Clifton2-2/+6
contain absolute paths or paths outside of the current directory - they can. * doc/binutils.texi (ar): Remove bogus sentance concerning thin archives and invalid paths.
2015-09-03Fix seg-fault in readelf when scanniing a corrupt binary.Nick Clifton2-1/+20
PR binutils/18879 * readelf.c (get_unwind_section_word): Check for negative offsets and very small sections. (dump_arm_unwind): Warn if the table offset is too large.
2015-08-28Also install readelf into tooldir/bin directoryH.J. Lu3-2/+7
* Makefile.am (TOOL_PROGS): Add readelf. * Makefile.in: Regenerated.
2015-08-24Missing parts of fixes for in-tree libiconvYaakov Selkowitz2-26/+71
(Commit d23d1dff missed pushing the config/iconv.m4 change, and to regenerate binutils' configure.) Original description: This is the second in a series of patches to make a build with an in-tree GNU libiconv work as designed. Currently GDB is the only toolchain component which actually uses an in-tree libiconv. This patch modifies the common AM_ICONV to use an in-tree libiconv when present and not already provided by libc. (GDB's workaround uses an in-tree libiconv even when libc provides iconv(3); I'm not sure when or why that would be desirable.) config/ChangeLog: 2015-08-24 Yaakov Selkowitz <yselkowi@redhat.com> * iconv.m4 (AM_ICONV_LINK): Use in-tree libiconv when present. binutils/ChangeLog: 2015-08-24 Yaakov Selkowitz <yselkowi@redhat.com> * configure: Regenerate.
2015-08-17Regen binutils/configureAlan Modra2-67/+30
Looks like previous regen wasn't using current sources. * configure: Regenerate.
2015-08-12Remove trailing spaces in binutilsH.J. Lu42-296/+296
2015-08-11Tweak binutils testsuiteAlan Modra7-13/+27
Some targets provide aligned .bss sections, so explicitly align. msp430 and rl78 emit "magic" symbols when assembling symbol.s, and mips targets emit STT_OBJECT rather than STT_NOTYPE syms. * binutils-all/strip-12.s: Align .bss section. * binutils-all/strip-12.d: Adjust. * binutils-all/symbols-1.d: Allow extraneous symbols. * binutils-all/symbols-2.d: Likewise, and V for weakened syms. * binutils-all/symbols-3.d: Likewise. * binutils-all/symbols-4.d: Likewise.
2015-08-08binutils-all/strip-12.s: Use ".section .bss" instead of ".bss"Hans-Peter Nilsson2-1/+6
which isn't supported by all ELF targets.
2015-08-07Check sh_type/sh_flags/sh_addralign/sh_entsize when copying sh_link/sh_infoH.J. Lu4-0/+21
When copying the sh_link and sh_info fields in stripped section headers, we also check if the sh_type, sh_flags, /sh_addralign and sh_entsize fields of the output section match the output. Since --only-keep-debug turns all non-debug sections into SHT_NOBITS sections, the output SHT_NOBITS type matches any input type. bfd/ PR binutils/18785 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the sh_link and sh_info fields in stripped section headers, we also check if the sh_type, sh_flags, /sh_addralign and sh_entsize fields of the output section match the output. Since --only-keep-debug turns all non-debug sections into SHT_NOBITS sections, the output SHT_NOBITS type matches any input type. binutils/testsuite/ PR binutils/18785 * binutils-all/objcopy.exp: Run strip-12. * binutils-all/strip-12.d: New file. * binutils-all/strip-12.s: Likewise.
2015-08-07objcopy: Improve wildcard matching for symbols with '!' prefix.Andrew Burgess9-4/+102
When using options such as --localize-symbol, --globalize-symbol, etc, along with the --wildcard option, prefixing a symbol name with '!' should provide non-matching behaviour, as example the following example is given in the manual: --wildcard --weaken-symbol !foo --weaken-symbol fo* which should weaken all symbols matching the pattern 'fo*', but not the symbol 'foo'. However, this currently does not work, the current logic will waken all symbols matching the pattern 'fo*' AND all symbols that are not 'foo'. The symbol 'foo' is covered by the first condition, and so is weakened, while, other symbols, for example 'bar' will match the second condition, and so be weakened. This patch adjusts the logic so that a pattern prefixed with '!' specifically DOES NOT apply the relevant change to any matching symbols, instead of applying the change to all non-matching symbols. So this: --weaken-symbol !foo will ensure that the symbol 'foo' is not weakened, but says nothing about symbols that are not 'foo'. As a result, a pattern prefixed with '!' now only makes sense when used alongside a more wide ranging wildcard pattern. This change should make the wildcard matching feature more useful, with no overall loss of functionality. The example given in the manual, weaken all symbols matching 'fo*' except 'foo' can now be achieved, but so too can more complex examples, such as weaken all symbols matching 'fo*' except 'foo', 'foa', and 'fob', like this: --wildcard --weaken-symbol !foo \ --weaken-symbol !foa \ --weaken-symbol !fob \ --weaken-symbol fo* Under the previous scheme, something as symbols as, weaken all symbols except 'foo' could have been achieved with this: --weaken-symbol !foo however, this will no longer work. To achieve the same result under the new scheme this is now required: --weaken-symbol !foo --weaken-symbol * binutils/ChangeLog: * objcopy.c (is_specified_symbol_predicate): Don't stop at first match. Non-match rules set found to FALSE. binutils/testsuite/ChangeLog: * binutils-all/objcopy.exp: Run new symbol tests. (objcopy_test_symbol_manipulation): New function. * binutils-all/symbols-1.d: New file. * binutils-all/symbols-2.d: New file. * binutils-all/symbols-3.d: New file. * binutils-all/symbols-4.d: New file. * binutils-all/symbols.s: New file.
2015-08-06Yaakov Selkowitz: fixes for in-tree libiconvDJ Delorie2-26/+71
* Makefile.def (libiconv): Define bootstrap=true. Mark pdf/html/info as missing. (configure-gcc): Depend on all-libiconv. (all-gcc): Ditto. (configure-libcpp): Ditto. (all-libcpp): Ditto. (configure-intl): Ditto. (all-intl): Ditto. * Makefile.in: Regenerate. binutils/ * configure: Regenerate. gdb/ * Makefile.in (LIBICONV): Define. (CLIBS): Add LIBICONV. * acinclude.m4: Use config/iconv.m4 instead of custom AM_ICONV. * configure: Regenerate.
2015-08-05Change the behaviour of the --only-keep-debug option to objcopy and strip so ↵Nick Clifton4-2/+94
that the sh_link and sh_info fields in stripped section headers are preserved. bfd * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and sh_info fields of sections whose type has been changed to SHT_NOBITS. bin * doc/binutils.texi: Document that the --only-keep-debug option to strip and objcopy preserves the section headers of stripped sections. tests * binutils-all/objcopy.exp (keep_debug_symbols_and_check_links): New proc. Checks that debug-info-only binaries retain the sh_link field in stripped sections.
2015-08-04Fix stack buffer overflows when parsing corrupt ihex files.Yuriy M. Kaminskiy2-1/+12
PR binutils/18750 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message and stack overflow when char is signed and \200-\376 was in place of hex digit; also fixes \377 was handled as EOF instead of "incorrect character". (ihex_read_section): Changed for consistency. (ihex_bad_byte): Prevent (now impossible to trigger) stack overflow and incorrect escape sequence handling. * srec.c (srec_bad_byte): Likewise. * readelf.c (process_mips_specific): Fix incorrect escape sequence handling.
2015-08-04Fix memory leak in ar if it encounters an invalid path whilst extracting files.Nick Clifton1-0/+1
* ar.c (extract_file): Free cbuf if the path is invalid.
2015-08-04Update description of proc run_dump_testNick Clifton2-14/+29
* lib/utils-lib.exp (run_dump_test): Document DUMPPROG, readelf and size parameters. Alpha-sort switch tables. Include addr2line, and size in list of possible auto-detected dump programs.
2015-07-27Regenerate configure filesH.J. Lu2-2/+6
bfd/ * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gold/ * configure: Regenerated. gprof/ * configure: Regenerated. ld/ * configure: Regenerated. opcodes/ * configure: Regenerated.
2015-07-24Use 0xffffffffffffffffLL to silence GCC 6 warningH.J. Lu2-1/+5
GCC 6 warns: error: result of ‘4294967295ll << 32’ requires 65 bits to represent, but ‘long long int’ only has 64 bits [-Werror=shift-overflow=] on ((((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff). This patch replaces it with bfd_signed_vma) 0xffffffffffffffffLL. * stabs.c (parse_stab_range_type): Use 0xffffffffffffffffLL.
2015-07-24Fix the evaluation of RL78 complex relocs, by making immediate values be ↵Nick Clifton3-0/+9
computed relative to a new absolute symbol. gas * config/tc-rl78.c (rl78_abs_sym): New local variable. (md_begin): Initialise the new symbol. (OPIMM): Define the value to be relative to the new symbol and not the absolute section symbol. ld * emulparams/elf32rl78.sh (OTHER_SECTIONS): Provide a value for the _-rl78_abs__ symbol. tests * gas/all/struct.d: Allow for extra symbols in the output. * gas/macros/test1.d: Likewise. * gas/elf/elf.exp: Add an rl78 machine. * gas/elf/sections2e-rl78: New file. tests * binutils-all/localize-hidden-1.d: Allow for extra symbols in the output. * binutils-all/strip-11.d: Skip for the RL78.
2015-07-24Remove leading/trailing white spaces in ChangeLogH.J. Lu1-2/+2
2015-07-23readelf display of 0x800...000 addendAlan Modra2-10/+8
* readelf.c (dump_relocations): Show MIN_INT addends as negative.
2015-07-20Regen two filesAlan Modra2-3/+7
bfd/ * po/SRC-POTFILES.in: Regenerate. binutils/ * doc/Makefile.in: Regenerate.
2015-07-17Correct readelf dynamic section buffer overlow testAlan Modra2-3/+9
PR binutils/18672 * readelf.c (get_32bit_dynamic_section): Correct buffer limit test. (get_64bit_dynamic_section): Likewise.
2015-07-14Make default compression gABI compliantH.J. Lu5-17/+35
All programs in binutils+gdb git repo now support gABI compression with the SHF_COMPRESSED bit. This patch makes the zlib-gabi option as compression default for gas, gold, ld and objcopy, instead of the zlib-gnu option whose outputs are incompatible with gABI. binutils/ * objcopy.c (copy_file): Set BFD_COMPRESS_GABI if not zlib-gnu. * doc/binutils.texi: Change --compress-debug-sections and --compress-debug-sections=zlib to zlib-gabi. binutils/testsuite/ * binutils-all/compress.exp: Update. gas/ * as.c (parse_args): Make --compress-debug-sections and --compress-debug-sections=zlib the same as --compress-debug-sections=zlib-gabi. * doc/as.texinfo: Change --compress-debug-sections and --compress-debug-sections=zlib to zlib-gabi. gold/ * compressed_output.cc (Output_compressed_section::set_final_data_size): Make --compress-debug-sections=zlib the same as --compress-debug-sections=zlib-gabi. * testsuite/Makefile.am (flagstest_compress_debug_sections.check): Expect ".debug_.*" with the SHF_COMPRESSED bit, instead of ".zdebug_". * testsuite/Makefile.in: Regenerated. ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Make --compress-debug-sections=zlib the same as --compress-debug-sections=zlib-gabi. * ld.texinfo: Change --compress-debug-sections=zlib to zlib-gabi. ld/testsuite/ * ld-elf/zlibbegin.rS: Updated to .debug_.* with the SHF_COMPRESSED bit. * ld-elf/zlibnormal.rS: Likewise.
2015-07-10Properly convert objects between different ELF classesH.J. Lu4-2/+117
The output SHF_COMPRESSED section size is different from input if ELF classes of input and output aren't the same. We must adjust the section sizes as well as the compression headers in SHF_COMPRESSED sections when converting objects between different ELF classes. bfd/ PR binutils/18656 * bfd.c (bfd_convert_section_size): New function. (bfd_convert_section_contents): Likewise. * bfd-in2.h: Regenerated. binutils/ 2015-07-10 H.J. Lu <hongjiu.lu@intel.com> PR binutils/18656 * objcopy.c (setup_section): Call bfd_convert_section_size to get the output section size. (copy_section): Get the section size from the output section and call bfd_get_full_section_contents to convert section contents for output. binutils/testsuite/ PR binutils/18656 * binutils-all/compress.exp (convert_test): New proc. Run conversion tests between x86-64 and x32.
2015-07-10Warn unsupported compress type and corrupted compressed sectionH.J. Lu2-13/+45
* readelf.c (dump_section_as_strings): Warn unsupported compress type and corrupted compressed section. (dump_section_as_bytes): Likewise. (load_specific_debug_section): Likewise.
2015-07-10Updated to accept .debug_* sectionsH.J. Lu2-2/+6
* binutils-all/dw2-3.W: Updated to accept .debug_* sections.
2015-07-092015-07-09 Catherine Moore <clm@codesourcery.com>Catherine Moore2-0/+8
include/ * elf/mips/mips.h (Val_GNU_MIPS_ABI_FP_NAN2008): New. gas/ * config/tc-mips.c (check_fpabi): Handle VAL_GNU_MIPS_ABI_FP_NAN2008. binutils/ * readelf.c (print_mips_fp_abi_value): Handle Val_GNU_MIPS_ABI_FP_NAN2008. ld/testsuite/ * ld-mips-elf/attr-gnu-4-08.d: Update expected output. * ld-mips-elf/attr-gnu-4-09.d: New. * ld-mips-elf/attr-gnu-4-19.d: New. * ld-mips-elf/attr-gnu-4-29.d: New. * ld-mips-elf/attr-gnu-4-39.d: New. * ld-mips-elf/attr-gnu-4-49.d: New. * ld-mips-elf/attr-gnu-4-59.d: New. * ld-mips-elf/attr-gnu-4-69.d: New. * ld-mips-elf/attr-gnu-4-79.d: New. * ld-mips-elf/attr-gnu-4-89.d: New. * ld-mips-elf/attr-gnu-4-9.s: New. * ld-mips-elf/mips-elf.exp: Run new tests.
2015-06-26Add support for DT_MIPS_RLD_MAP_REL.Matthew Fortune2-0/+5
This tag makes it possible to access the debug map when debugging position independent executables. bfd/ * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable instead of !shared to indicate an application vs shared library. (_bfd_mips_elf_size_dynamic_sections): Likewise. (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL. (_bfd_mips_elf_get_target_dtag): Likewise. binutils/ * readelf.c (get_mips_dynamic_type): Handle DT_MIPS_RLD_MAP_REL. include/ * elf/mips.h (DT_MIPS_RLD_MAP_REL): New macro. ld/testsuite/ * ld-mips-elf/pic-and-nonpic-3b.ad: Adjust for extra dynamic tag. * ld-mips-elf/pic-and-nonpic-4b.ad: Likewise. * ld-mips-elf/pic-and-nonpic-5b.ad: Likewise. * ld-mips-elf/pic-and-nonpic-6-n32.ad: Likewise. * ld-mips-elf/pic-and-nonpic-6-n64.ad: Likewise. * ld-mips-elf/pic-and-nonpic-6-o32.ad: Likewise. * ld-mips-elf/tlsdyn-o32-1.d: Likewise. * ld-mips-elf/tlsdyn-o32-1.got: Likewise. * ld-mips-elf/tlsdyn-o32-2.d: Likewise. * ld-mips-elf/tlsdyn-o32-2.got: Likewise. * ld-mips-elf/tlsdyn-o32-3.d: Likewise. * ld-mips-elf/tlsdyn-o32-3.got: Likewise. * ld-mips-elf/tlsdyn-o32.d: Likewise. * ld-mips-elf/tlsdyn-o32.got: Likewise. * ld-mips-elf/pie-n32.d: New file. * ld-mips-elf/pie-n64.d: Likewise. * ld-mips-elf/pie-o32.d: Likewise. * ld-mips-elf/pie.s: Likewise. * ld-mips-elf/mips-elf.exp: Add new tests.
2015-06-22Stop "objdump -d" from disassembling past a symbolic address.Nick Clifton3-7/+35
include * dis-asm.h (struct disassemble_info): Add stop_vma field. binuti * objdump.c (disassemble_bytes): Set the stop_vma field in the disassemble_info structure when disassembling code sections with -d. * doc/binutils.texi (objdump): Document the discrepancy between -d and -D. opcodes * dis-buf.c (buffer_read_memory): Fail is stop_vma is set and the requested region lies beyond it. * bfin-dis.c (print_insn_bfin): Ignore sysop instructions when looking for 32-bit insns. * mcore-dis.c (print_insn_mcore): Disable stop_vma when reading data. * sh-dis.c (print_insn_sh): Likewise. * tic6x-dis.c (print_insn_tic6x): Disable stop_vma when reading blocks of instructions. * vax-dis.c (print_insn_vax): Check that the requested address does not clash with the stop_vma. tests * gas/arm/backslash-at.s: Add extra .byte directives so that the foo symbol does not appear to point half way through an instruction. * gas/arm/backslash-at.d: Update expected disassembly. * gas/i386/ilp32/x86-64-opcode-inval-intel.d: Likewise. * gas/i386/ilp32/x86-64-opcode-inval.d: Likewise. * gas/i386/x86-64-opcode-inval-intel.d: Likewise. * gas/i386/x86-64-opcode-inval.d: Likewise.