bfd/
* archures.c (bfd_mach_i386_nacl): Fix definition so it doesn't
collide with bfd_mach_l1om.
* bfd-in2.h: Regenerate.
* elf32-i386.c (elf32_i386_nacl_elf_object_p): New function.
(elf_backend_object_p): Use that in elf32-i386-nacl definition.
* elf64-x86-64.c (elf64_x86_64_nacl_elf_object_p): New function.
(elf_backend_object_p): Use that in elf64-x86-64-nacl definition.
(elf32_x86_64_nacl_elf_object_p): New function.
(elf_backend_object_p): Use that in elf32-x86-64-nacl definition.
binutils/
* objdump.c (dump_dwarf): Grok bfd_mach_x86_64_nacl and
bfd_mach_x64_32_nacl as equivalent to bfd_mach_x86_64.
ld/testsuite/
* ld-x86-64/x86-64.exp (mixed1, mixed2): Loosen error string match
so it accepts "i386:nacl" in place of "i386".
* ld-x86-64/ilp32-2.d: Likewise.
* ld-x86-64/ilp32-3.d: Likewise.
* ld-x86-64/lp64-2.d: Likewise.
* ld-x86-64/lp64-3.d: Likewise.
2012-10-18 Kai Tietz <ktietz@redhat.com>
PR binutils/14067
* coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
* coff-x86_64.c: Likewise.
* coffcode.h (DOT_ZDEBUG): New define.
(sec_to_styp_flags): Check for .zdebug.
(styp_to_sec_flags): Likewise.
* coffgen.c (make_a_section): Handle .debug_* section
compression/decompression flags.
* cofflink.c (mark_relocs): Ignore relocations
for a section, which isn't marked as used.
(_bfd_coff_link_input_bfd): Add support of compressed
debug sections.
* compress.c (decompress_contents): Loop as long
as there is input available and there is room for
output.
* bfd/pe-arm.c: Add .zdebug_ partial match entry.
* pe-i386.c: Likewise.
* pe-x86_64.c: Likewise.
* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
data-directories as this might destroy content.
* coff-i386.c (_bfd_generic_find_nearest_line_discriminator):
define as coff_find_nearest_line_discriminator.
* libcoff-in.h (coff_find_nearest_line_discriminator): New
* libcoff.h: Regenerated.
* coff-x86_64.c: Likewise.
* coffgen.c (coff_find_nearest_line_discriminator): New function.
prototype.
ChangeLog binutils
2012-10-18 Kai Tietz <ktietz@redhat.com>
* objdump.c (dump_bfd): Call dump headers after
call of slurp_symtab.
ChangeLog ld
2012-10-18 Kai Tietz <ktietz@redhat.com>
PR binutils/14067
* NEWS: Menition new feature.
* scripttempl/pep.sc: Add zdebug sections.
* scripttempl/pe.sc: L
bfd/
* bfd.c (bfd_find_nearest_line_discriminator): New macro.
* coff-rs6000.c: Init _bfd_find_nearest_line_discriminator.
* coff64-rs6000.c: Likewise.
* dwarf2.c (struct line_info): Add discriminator field.
(add_line_info): Fill in new discriminator field.
(decode_line_info): Record discriminator information instead
of ignoring it.
(lookup_address_in_line_info_table): Return discriminator field if
requested.
(comp_unit_find_nearest_line): Add discriminator argument.
(find_line): Likewise.
(_bfd_dwarf2_find_nearest_line): Likewise.
(_bfd_dwarf2_find_line): Likewise.
* elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New.
(_bfd_elf_find_line_discriminator): Likewise.
(_bfd_generic_find_nearest_line_discriminator): Likewise. Defined.
* elf.c (_bfd_elf_find_nearest_line): Change to a wrapper
that invokes _bfd_elf_find_nearest_line_discriminator with correct
arguments.
(_bfd_elf_find_nearest_line_discriminator): New.
(_bfd_elf_find_line): Change to a wrapper
that invokes _bfd_elf_find_line_discriminator with correct
arguments.
(_bfd_elf_find_line_discriminator): New.
* coffgen.c (coff_find_nearest_line_with_names): Handle
new discriminator argument.
* elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
* elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
* mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
* libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator
argument.
(_bfd_dwarf2_find_line): Likewise.
(_bfd_generic_find_nearest_line_discriminator): New.
* libbfd.c (_bfd_generic_find_nearest_line_discriminator): New.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.
* targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize
_bfd_find_nearest_line_discriminator with
_bfd_generic_find_nearest_line_discriminator.
(bfd_target): Add _bfd_find_nearest_line_discriminator.
binutils/
* addr2line.c (find_address_in_section): Invoke
bfd_find_nearest_line_discriminator to get the discriminator.
(find_offset_in_section): Likewise.
(translate_addresses): Print discriminator if it is non-zero.
* objdump.c (show_line): Invoke
bfd_find_nearest_line_discriminator to get the discriminator,
and keep track of prev_discriminator. Print discriminator
if it is non-zero.
(disassemble_data): Initialize prev_discriminator.
(dump_reloc_set): Invoke bfd_find_nearest_line_discriminator
to get the discriminator, and keep track of last_discriminator.
Print discriminator if it is non-zero.
* dwarf.c (dwarf_check): New global flag.
(fetch_indexed_string): New function.
(fetch_indexed_value): New function.
(get_FORM_name): Add DW_FORM_GNU_str_index and DW_FORM_GNU_addr_index.
(decode_location_expression): Add DW_OP_GNU_addr_index.
(read_and_display_attr_value): Add DW_FORM_GNU_str_index,
DW_FORM_GNU_addr_index, DW_AT_GNU_addr_base, and DW_AT_GNU_ranges_base.
(get_AT_name): Add new attributes for Fission.
(process_debug_info): Load new debug sections for Fission.
(load_debug_info): Check for .debug_info.dwo section.
(display_loc_list, display_loc_list_dwo): New functions.
(display_debug_loc): Move logic to above two functions.
(display_debug_info): Choose abbrev section based on info section.
(display_debug_types): Likewise.
(display_trace_info): Likewise.
(comp_addr_base): New function.
(display_debug_addr): New function.
(display_debug_str_offsets): New function.
(display_debug_ranges): Allow missing range lists. Suppress
diagnostics if dwarf_check not set.
(debug_displays): Add column to select abbrev section.
* dwarf.h (enum dwarf_section_display_enum): Add new debug sections
for Fission.
(struct dwarf_section): Add abbrev_sec field.
(struct dwarf_section_display): New type.
(debug_info): Add addr_base, ranges_base fields.
(dwarf_check): New global variable.
* objdump.c (usage): Add --dwarf-check option.
(enum option_values): Add OPTION_DWARF_CHECK.
(long_options): Add --dwarf-check.
(main): Likewise.
* readelf.c (OPTION_DWARF_CHECK): New macro.
(options): Add --dwarf-check.
(parse_args): Likewise.
(process_section_headers): Use const_strneq instead of
streq.
(bfd_nonfatal_message, report, list_matching_formats): Likewise.
(list_supported_targets): Tidy.
* objdump.c (free_only_list): Formatting.
(slurp_dynamic_symtab): Non-zero exit status for "not a dynamic
object".
(update_source_path): Delete redundant check for NULL filename.
(disassemble_bytes): Error if disassemble_fn returns a value
that won't increment address.
(disassemble_data): Don't capitalize error message.
(read_section_stabs): Likewise.
(main): Return non-zero exit status on bad options.
(init_dwarf_regnames): Use them.
* dwarf.h: Declare them.
* objdump.c (dump_dwarf): Use bfd_get_arch + bfd_get_mach to set up
the regnames, rather than using elf_machine_code.
a new address, so as not to reuse a previous, non-related reloc.
* gas/arm/arm-it-auto.d, gas/arm/bl-local-v4t.d,
gas/arm/blx-local.d, gas/arm/thumb-w-good.d: Update expected
results.
* objdump.c (only): Replace with linked list.
(only_size, only_used): Replace with only_list.
(process_section_p): Set seen field on matches sections.
(add_only): New function.
(free_only_list): New function.
(disassemble_section): Check only_list.
(main): Use add_only and free_only_list.
* gas/pe/aligncomm-c.d: Dump all sections.
* ld-sh/refdbg-0-dso.d: Dump all sections.
* arm-dis.c (print_insn_coprocessor): Check that a user specified
ARM architecture supports the matched instruction.
(print_insn_arm): Likewise.
(select_arm_features): New function. Fills in the fields of an
arm_feature_set structure based on a given arm machine number.
(print_insn): Initialise an arm_feature_set structure.
* objdump.c (disassemble_bytes): Set the
USER_SPECIFIED_MACHINE_TYPE flag in the disassemble_info structure
if the user has invoked the -m switch.
* doc/binutils.texi: Document the additional behaviour of
objdump's -m switch for ARM targets.
* dis-asm.h (USER_SPECIFIED_MACHINE_TYPE): New value for the flags
field of struct disassemble_info.
* gas/arm/align.s: Add labels so that COFF based targets can
correctly locate THUMB code.
* gas/arm/copro.d: Do not pass --architecture switch to objdump.
* arm-dis.c (print_insn): Ignore is_data if the user has requested
the disassembly of data as well as instructions.
* objdump.c (disassemble_bytes): Set the DISASSEMBLE_DATA bit in
the flags field of the disassemble_info structure if the -D switch
is in operation.
* dis-asm.h (struct disassemble_info): New value for the flags
field.