Age | Commit message (Collapse) | Author | Files | Lines |
|
binutils/
2017-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix compilation with GCC 4.4.7.
* dwarf.c (display_loclists_list, display_debug_rnglists_list):
Initialize begin and end.
|
|
PR 20881
* dlltool.c (secdata): Align .idata$6 on 2 byte boundary.
(make_one_lib_file): Export a symbol called __nm_<symbol> for use
with auto-importing.
|
|
On some targets, .string does not add a NUL string terminator.
* testsuite/binutils-all/dw5.S: Replace .string with .asciz.
Support hpux .comm variant.
* testsuite/binutils-all/readelf.exp: Define HPUX when assembling
dw5 test for hppa64-hpux.
|
|
reason for a function to return false.
(process_program_headers): Fix snafu - if the program headers are
not available then this is not a cause to fail.
(process_corefile_note_segments): Likewise.
|
|
* readelf.c (show_name, do_dynamic, do_syms, do_dyn_syms,
(do_reloc, do_sections, do_section_groups, do_section_details,
(do_segments, do_unwind, do_using_dynamic, do_header, do_dump,
(do_version, do_histogram, do_debugging, do_arch, do_notes,
(do_archive_index, is_32bit_elf, decompress_dumps): Use
bfd_boolean type.
(parse_args): Treat the do_* variables as booleans.
(print_vma): Return an unsigned int.
(print_symbol): Change width parameter to signed int.
(is_ia64_vms): Change return type to bfd_boolean.
(guess_is_rela): Likewise.
(slurp_rela_relocs): Likewise.
(slurp_rel_relocs): Likewise.
(dump_relocations): Likewise.
(process_file_header): Likewise.
(get_program_headers): Likewise.
(process_program_headers): Likewise.
(process_section_headers): Likewise.
(process_section_groups): Likewise.
(dump_ia64_vms_dynamic_fixups): Likewise.
(dump_ia64_vms_dynamic_relocs): Likewise.
(process_ia64_vms_dynamic_relocs): Likewise.
(process_relocs): Likewise.
(dump_ia64_unwind): Likewise.
(ia64_process_unwind): Likewise.
(dump_hppa_unwind): Likewise.
(slurp_hppa_unwind_table): Likewise.
(hppa_process_unwind): Likewise.
(decode_arm_unwind_bytecode): Likewise.
(decode_tic6x_unwind_bytecode): Likewise.
(decode_arm_unwind): Likewise.
(dump_arm_unwind): Likewise.
(arm_process_unwind): Likewise.
(process_unwind): Likewise.
(get_32bit_dynamic_section): Likewise.
(get_64bit_dynamic_section): Likewise.
(process_dynamic_section): Likewise.
(process_version_sections): Likewise.
(process_symbol_table): Likewise.
(process_syminfo): Likewise.
(apply_relocations): Likewise.
(disassemble_section): Likewise.
(dump_section_as_strings): Likewise.
(dump_section_as_bytes): Likewise.
(load_specific_debug_section): Likewise.
(load_debug_section): Likewise.
(display_debug_section): Likewise.
(process_section_contents): Likewise.
(process_attributes): Likewise.
(process_nds32_specific): Likewise.
(process_gnu_liblist): Likewise.
(print_core_note): Likewise.
(print_gnu_note): Likewise.
(print_v850_note): Likewise.
(process_netbsd_elf_note): Likewise.
(print_stapsdt_note): Likewise.
(print_ia64_vms_note): Likewise.
(process_note): Likewise.
(process_notes_at): Likewise.
(process_corefile_note_segments): Likewise.
(process_v850_notes): Likewise.
(process_note_sections): Likewise.
(process_notes): Likewise.
(process_arch_specific): Likewise.
(get_file_header): Likewise.
(process_object): Likewise.
(process_archive): Likewise.
(process_file): Likewise.
(section_subset): Make static.
(get_mips_reg_size): Return a signed integer.
(process_object): Reverse the logic of the return value.
(process_archive): Likewise.
(process_file): Likewise.
|
|
Remove a trailing space or a leading pipe character from version flags
printed with `readelf --version-info'.
For example with the `mips-linux' target we get:
$ cat ver_def.s
.data
.globl new_foo
.type new_foo, %object
new_foo:
.symver new_foo, foo@@ver_foo
$ cat ver_def.ver
{ global: *foo*; local: *; };
$ as -o ver_def.o ver_def.s
$ ld -e 0 --export-dynamic --version-script=ver_def.ver -o ver_def ver_def.o
$ readelf -V ver_def
Version symbols section '.gnu.version' contains 4 entries:
Addr: 000000000000007e Offset: 0x01007e Link: 2 (.dynsym)
000: 0 (*local*) 2 (ver_foo) 1 (*global*) 2 (ver_foo)
Version definition section '.gnu.version_d' contains 2 entries:
Addr: 0x0000000000000088 Offset: 0x010088 Link: 3 (.dynstr)
000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: ver_def
0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_foo
$
which includes an unnecessary space after `BASE'; both call sites
already provide suitable separation from output that follows. Also if
only unknown flags were present, then lone `| <unknown>' would be
printed.
binutils/
* readelf.c (get_ver_flags): Tidy the formatting of the string
returned
|
|
Make `isum' unsigned like data it is calculated from.
binutils/
* readelf.c (process_version_sections) <SHT_GNU_verdef>: Make
`isum' unsigned.
<SHT_GNU_verneed>: Likewise.
|
|
Fix a commit 74e1a04b9787 ("More fixes for reading corrupt ELF files.")
`readelf --version-info' regression that caused "Version definition past
end of section" to be always printed at the end, even with good section
data.
For example with the `mips-linux' target we get:
$ cat ver_def.s
.data
.globl new_foo
.type new_foo, %object
new_foo:
.symver new_foo, foo@@ver_foo
$ cat ver_def.ver
{ global: *foo*; local: *; };
$ as -o ver_def.o ver_def.s
$ ld -e 0 --export-dynamic --version-script=ver_def.ver -o ver_def ver_def.o
$ readelf -V ver_def
Version symbols section '.gnu.version' contains 4 entries:
Addr: 000000000000007e Offset: 0x01007e Link: 2 (.dynsym)
000: 0 (*local*) 2 (ver_foo) 1 (*global*) 2 (ver_foo)
Version definition section '.gnu.version_d' contains 2 entries:
Addr: 0x0000000000000088 Offset: 0x010088 Link: 3 (.dynstr)
000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: ver_def
0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_foo
Version definition past end of section
$
The cause is the `if (idx + ent.vd_next <= idx)' condition introduced to
ensure forward progress, which however always triggers for good version
definition section data as the last entry will have its `vd_next' value
set to 0.
Adjust the condition then, to say `if (idx + ent.vd_next < idx)' instead
and to ensure forward progress limit the number of entries processed to
the size of the version definition section, removing the problematic
message from output quoted above, while ensuring the original PR 17531
test case is still handled gracefully.
Add a suitable test case so that we have `readelf --version-info'
coverage; due to the lack of infrastructure needed to run the linker in
the `binutils' test suite and limited justification to implement it add
a new `readelf.exp' script to the `ld' test suite instead, intended to
gather any `readelf' test cases that require the linker to be run. If
ever we decide to have linker infrastructure added to the `binutils'
test suite, then the script can be moved between the test suites.
binutils/
* readelf.c (process_version_sections) <SHT_GNU_verdef>: Limit
the number of entries processed by the section size. Don't
break out of the loop if `ent.vd_next' is 0.
ld/
* testsuite/ld-elf/ver_def.d: New test.
* testsuite/ld-elf/ver_def.ld: New test linker script.
* testsuite/ld-elf/ver_def.ver: New test version script.
* testsuite/ld-elf/ver_def.s: New test source.
* testsuite/ld-elf/readelf.exp: New test script.
|
|
binutils/
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* testsuite/binutils-all/dw5.S: New file.
* testsuite/binutils-all/dw5.W: New file.
* testsuite/binutils-all/readelf.exp (readelf -wiaoRlL): New test.
|
|
binutils/
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (read_and_display_attr_value): Support DW_FORM_data16.
|
|
binutils/
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (display_debug_macro): Support DWARF-5. Rename
DW_MACRO_GNU_*.
|
|
binutils/
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (decode_location_expression): Support DW_OP_implicit_pointer,
DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type, DW_OP_convert
and DW_OP_reinterpret.
(read_and_display_attr_value): Support DW_AT_call_value,
DW_AT_call_data_value, DW_AT_call_target and
DW_AT_call_target_clobbered.
|
|
binutils/
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (fetch_indirect_line_string): New function.
(abbrev_attr): New field implicit_const.
(add_abbrev_attr): New parameter implicit_const.
(process_abbrev_section): Support DW_FORM_implicit_const.
(decode_location_expression): Support DW_OP_entry_value.
(read_and_display_attr_value): Add parameter implicit_const. Support
DW_FORM_line_strp and DW_FORM_implicit_const.
(read_and_display_attr): Add parameter implicit_const.
(process_debug_info): Support line_str and DWARF-5.
(read_debug_line_header): Support DWARF-5.
(display_formatted_table): New function.
(display_debug_lines_raw): New parameter file. Support DWARF-5.
(display_debug_lines_decoded): New parameter fileptr. Support DWARF-5.
(display_debug_lines): Pass file parameter.
(display_debug_macro): Update read_and_display_attr_value caller.
(display_debug_abbrev): Support DW_FORM_implicit_const.
(display_loclists_list): New function.
(display_loc_list): Support .debug_loclists.
(display_debug_ranges_list): New function from display_debug_ranges.
(display_debug_rnglists_list): New function.
(display_debug_ranges): Support .debug_rnglists.
(debug_displays): Add .debug_line_str, .debug_loclists and
.debug_rnglists.
* dwarf.h: Include dwarf2.h
(DWARF2_Internal_LineInfo): Add li_offset_size.
(DWARF2_Internal_CompUnit): Add cu_unit_type.
(enum dwarf_section_display_enum): Add line_str.
* readelf.c (process_section_headers): Add rnglists and loclists.
|
|
binutils/
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (display_block): Add parameter delimiter.
(decode_location_expression): Update display_block callers.
(read_and_display_attr_value): Add parameter delimiter.
(read_and_display_attr, display_debug_macro): Update
read_and_display_attr_value caller.
|
|
binutils/
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (display_loc_list): Use dwarf_vma for offset, base_address
and off.
(display_loc_list_dwo): Use dwarf_vma for offset.
(display_debug_loc): Use dwarf_vma for offset, base_address.
(struct range_entry, range_entry_compar): Use dwarf_vma for
ranges_offset.
(display_debug_ranges): Use dwarf_vma for ranges_offset, offset and
base_address.
|
|
known to support them.
* readelf.c (display_tag_value): Use an explicit signed type for
the tag parameter.
(display_gnu_attributes): Use an unsigned integer type for
attribute tags.
(display_power_gnu_attribute): Likewise.
(display_s390_gnu_attribute): Likewise.
(display_sparc_hwcaps): Likewise.
(display_sparc_hwcaps2): Likewise.
(display_sparc_gnu_attribute): Likewise.
(display_mips_gnu_attribute): Likewise.
(display_tic6x_attribute): Likewise.
(display_raw_attribute): Likewise.
(process_attributes): Likewise.
(process_arm_specific): Delete redundant function.
(process_power_specific): Likewise.
(process_s390_specific): Likewise.
(process_sparc_specific): Likewise.
(process_tic6x_specific): Likewise.
(process_msp430x_specific): Likewise.
(display_public_gnu_attributes): New function. Displays known
information about an unknown gnu attribute.
(display_generic_attribute): New function. Calls
display_tag_value for non-nul tags.
(process_arch_specific): Call process_attributes even for
architectures not known to specifically support gnu attributes.
|
|
binutils/
2017-02-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (decode_location_expression): Display also OP.
|
|
Fix a commit 74e1a04b9787 ("More fixes for reading corrupt ELF files.")
`readelf --version-info' output formatting regression where a dropped
new line caused section header information from the `.gnu.version_d'
version definition section to be printed on the same line as this
section's first entry.
For example with the `mips-linux' target we get:
$ cat ver_def.s
.data
.globl new_foo
.type new_foo, %object
new_foo:
.symver new_foo, foo@@ver_foo
$ cat ver_def.ver
{ global: *foo*; local: *; };
$ as -o ver_def.o ver_def.s
$ ld -e 0 --export-dynamic --version-script=ver_def.ver -o ver_def ver_def.o
$ readelf -V ver_def
Version symbols section '.gnu.version' contains 4 entries:
Addr: 000000000000007e Offset: 0x01007e Link: 2 (.dynsym)
000: 0 (*local*) 2 (ver_foo) 1 (*global*) 2 (ver_foo)
Version definition section '.gnu.version_d' contains 2 entries:
Addr: 0x0000000000000088 Offset: 0x010088 Link: 3 (.dynstr) 000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: ver_def
0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_foo
Version definition past end of section
$
Add the new line then, to get:
$ readelf -V ver_def
Version symbols section '.gnu.version' contains 4 entries:
Addr: 000000000000007e Offset: 0x01007e Link: 2 (.dynsym)
000: 0 (*local*) 2 (ver_foo) 1 (*global*) 2 (ver_foo)
Version definition section '.gnu.version_d' contains 2 entries:
Addr: 0x0000000000000088 Offset: 0x010088 Link: 3 (.dynstr)
000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: ver_def
0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_foo
Version definition past end of section
$
instead.
binutils/
* readelf.c (process_version_sections) <SHT_GNU_verdef>: Print a
new line between the heading and the first version definition
entry.
|
|
PR binutils/21156
* dwarf.c (cu_tu_indexes_read): Move into...
(load_cu_tu_indexes): ... here. Change the variable into
tri-state. Change the function into boolean, returning
false if the indicies could not be loaded.
(find_cu_tu_set): Return NULL if the indicies could not be
loaded.
|
|
PR binutils/21156
* readelf.c (find_section_in_set): Test for invalid section
indicies.
|
|
* readelf.c (get_section_type_name): Add decoding of GNU section
types.
|
|
The direct references in objcopy kind of look like a hack to me, so
I'm calling these symbols internal too. Certainly they aren't named
and documented as a public BFD symbol today anyway.
So ... give these bfd-internal symbols with external linkage a _bfd_
prefix to avoid collisions in the global symbol namespace.
While at it, give them names that more closely match the corresponding
option name that toggles them.
Also while at it, fix a few related comment typos.
gdb/ChangeLog:
2017-02-17 Pedro Alves <palves@redhat.com>
* srec.c (Chunk): Rename to ...
(_bfd_srec_len): ... this.
(S3Forced): Rename to ...
(_bfd_srec_forceS3): ... this.
* objcopy.c: Adjust all references.
|
|
* MAINTAINERS: (MIPS, MN10300): Move Eric Christopher to Past
Maintainers section.
|
|
PR binutils/21159
* readelf.c (dump_section_as_strings): Reset the start address if
no decompression is perfromed.
(dump_section_as_bytes): Likewise.
|
|
PR binutils/21158
* rddbg.c (read_symbol_stabs_debugging_info): Check for a null or
empty symbol name.
|
|
PR binutils/21157
* stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE
pairs.
(parse_number): Exit early if passed an empty string.
|
|
binaries.
PR binutils/21155
* readelf.c (IN_RANGE): New macro. Tests for an address + offset
being within a given range.
(target_specific_reloc_handling): Use macro to test for underflow
as well as overflow of reloc offset.
|
|
PR binutils/21150
* nm.c (file_symbol): Add test of string length before testing
string characters.
|
|
to other callers.
PR binutils/21135
(dump_section_as_bytes, load_specific_debug_section): Likewise.
|
|
PR binutils/21135
* readelf.c (dump_section_as_bytes): Handle the case where
uncompress_section_contents returns false.
|
|
too-small compressed section.
PR binutils/21149
* readelf.c (get_compression_header): Add size parameter. Check
size against sizeof compression header before attempting to
extract the header.
(process_section_headers): Pass size to get_compression_header.
(dump_section_as_strings): Likewise.
(dump_section_as_bytes): Likewise.
(load_specific_debug_section): Likewise.
|
|
PR binutils/21148
* readelf.c (process_version_sections): Include size of auxillary
version information when checking for buffer overflow.
|
|
PR binutils/21147
* readelf.c (process_section_contents): Fix off by one error
reporting un-dumped sections.
|
|
sections in an MSP430 binary.
PR binutils/21139
* readelf.c (target_specific_reloc_handling): Add num_syms
parameter. Check for symbol table overflow before accessing
symbol value. If reloc pointer is NULL, discard all saved state.
(apply_relocations): Pass num_syms to target_specific_reloc_handling.
Call target_specific_reloc_handling with a NULL reloc pointer
after processing all of the relocs.
|
|
files containing symbol-difference relocations.
PR binutils/21137
* readelf.c (target_specific_reloc_handling): Add end parameter.
Check for buffer overflow before writing relocated values.
(apply_relocations): Pass end to target_specific_reloc_handling.
|
|
PR 20343
ld * ld.texinfo (Options): Extend documentation of the --plugin
option. Include a description of where the plugins should be
located.
binutils* doc/binutils.texi (ar): Extend documentation of the --plugin
option. Include a description of where the plugins should be
located.
(nm): Likewise.
|
|
|
|
|
|
|
|
|
|
When displaying the section headers table using objdump (-h), the column
containing the section header name is currently fixed at 13 characters.
A section name that is longer than 13 characters will overflow the
column causing the table to become miss-aligned.
In this commit I change the behaviour so that _in wide mode_ (-w -h) the
section name column is dynamically resized to fit the longest section
name we plan to display. In wide mode the column still retains a
minimum width of 13 characters.
In non-wide more the behaviour is completely unchanged.
While I was changing the dump_headers function I have unified the two
printf lines that handled the different address widths into a single
printf, the address width is now passed into printf using the '*' field
width format character.
binutils/ChangeLog:
* objdump.c (dump_section_header): Extract max section name length
from data parameter, use this when formatting output.
(find_longest_section_name): New function.
(dump_headers): Calculate longest section name when in wide mode,
reformat to unify printing of header line.
ld/ChangeLog:
* testsuite/ld-elf/eh-frame-hdr.d: Update expected results.
|
|
PR 21059
binutils* arlex.l: Support processing with flex 2.6.3.
* deflex.l: Likewise.
gas * config/bfin-lex.l: Support processing with flex 2.6.3.
* itbl-lex.l: Likewise.
|
|
parsing/writing windows resource files.
binutils* resbin.c: Optional dialog control data immediately follow
the control description without alignment.
* testsuite/binutils-all/windres/controldata.rc: New test.
source.
* testsuite/binutils-all/windres/controldata.rsd: New test.
|
|
PR binutils/20876
bfd * opncls.c (find_separate_debug_file): Add include_dirs
parameter. Only include the directory part of the bfd's filename
in search paths if include_dirs is true. Add a couple of extra
locations for looking for debug files.
( bfd_follow_gnu_debuglink): Update invocation of
find_separate_debug_file.
(bfd_follow_gnu_debugaltlink): Likewise.
(get_build_id): New function: Finds the build-id of the given bfd.
(get_build_id_name): New function: Computes the name of the
separate debug info file for a bfd, based upon its build-id.
(check_build_id_file): New function: Checks to see if a separate
debug info file exists at the given location, and that its
build-id matches that of the original bfd.
(bfd_follow_build_id_debuglink): New function: Finds a separate
debug info file for a given bfd by using the build-id method.
* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
method of locating a separate debug info file before using the
debuglink method.
* bfd-in2.h: Regenerate.
binutils * NEWS: Mention the new feature.
* testsuite/binutils-all/objdump.exp (test_build_id_debuglink):
New proc to test the location of separate debug info files using
the build-id method.
|
|
PR 21034
* stabs.c (parse_stab_members): Fix thinko checking for g++
version 1 stabs information.
|
|
|
|
source code information.
bfd * dwarf2.c (lookup_address_in_function_table): Return early if
there are no functions in the given comp unit, or if the high
address of the last function in the comp unit is less than the
desired address.
binutils * objdump.c (display_file): Add new parameter 'last_file'. If
last_file is true, do not call bfd_close at the end of the
function.
(main): Set the value of the last_file parameter when calling
display_file.
|
|
ChangeLog entry missed from commit dd90581873.
* readelf.c (process_section_headers): Correct .rel.dyn/.rela.dyn
comment.
|
|
* MAINTAINERS: Move Paul Brook to the Past Maintainers section.
|
|
ld PR 20958
* ldlex.l (option): Add noyywrap
(yywrap): Delete.
* ldlex.h (yywrap): Delete prototype.
binutils
PR 20958
* syslex.l (option): Add noyywrap
(yywrap): Delete.
|