aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2008-11-14 14:56:51 +0000
committerTristan Gingold <gingold@adacore.com>2008-11-14 14:56:51 +0000
commitf5913efec8065b7c490cb47b1196a7167f1c5136 (patch)
treecf9830d249ec21c6b727cf3197e688c14f831c92 /binutils/objdump.c
parent2b0bc0884c18624ca338cc984cff5f0a0c0ca9cd (diff)
downloadfsf-binutils-gdb-f5913efec8065b7c490cb47b1196a7167f1c5136.zip
fsf-binutils-gdb-f5913efec8065b7c490cb47b1196a7167f1c5136.tar.gz
fsf-binutils-gdb-f5913efec8065b7c490cb47b1196a7167f1c5136.tar.bz2
2008-11-14 Tristan Gingold <gingold@adacore.com>
Remove outdated mach-o specific tests. * objdump.c (load_debug_section): Remove mach-o specific test. (mach_o_uncompressed_dwarf_sections): Removed. (mach_o_compressed_dwarf_sections): Removed. (generic_uncompressed_dwarf_sections): Removed. (generic_compressed_dwarf_sections): Removed. (check_mach_o_dwarf): Removed. (dump_dwarf): Remove call to check_mach_o_dwarf.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c96
1 files changed, 1 insertions, 95 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 76f595b..b1411d9 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -2082,19 +2082,7 @@ load_debug_section (enum dwarf_section_display_enum debug, void *file)
return 0;
section_is_compressed = section->name == section->compressed_name;
- /* Compute a bias to be added to offsets found within the DWARF debug
- information. These offsets are meant to be relative to the start of
- the dwarf section, and hence the bias should be 0. For MACH-O however
- a dwarf section is really just a region of a much larger section and so
- the bias is the address of the start of that area within the larger
- section. This test is important for PE and COFF based targets which
- use DWARF debug information, since unlike ELF, they do not allow the
- dwarf sections to be placed at address 0. */
- if (bfd_get_flavour (abfd) == bfd_target_mach_o_flavour)
- section->address = bfd_get_section_vma (abfd, sec);
- else
- section->address = 0;
-
+ section->address = 0;
section->size = bfd_get_section_size (sec);
section->start = xmalloc (section->size);
@@ -2177,86 +2165,6 @@ dump_dwarf_section (bfd *abfd, asection *section,
}
}
-static const char *mach_o_uncompressed_dwarf_sections [] = {
- "LC_SEGMENT.__DWARFA.__debug_abbrev", /* .debug_abbrev */
- "LC_SEGMENT.__DWARFA.__debug_aranges", /* .debug_aranges */
- "LC_SEGMENT.__DWARFA.__debug_frame", /* .debug_frame */
- "LC_SEGMENT.__DWARFA.__debug_info", /* .debug_info */
- "LC_SEGMENT.__DWARFA.__debug_line", /* .debug_line */
- "LC_SEGMENT.__DWARFA.__debug_pubnames", /* .debug_pubnames */
- ".eh_frame", /* .eh_frame */
- "LC_SEGMENT.__DWARFA.__debug_macinfo", /* .debug_macinfo */
- "LC_SEGMENT.__DWARFA.__debug_str", /* .debug_str */
- "LC_SEGMENT.__DWARFA.__debug_loc", /* .debug_loc */
- "LC_SEGMENT.__DWARFA.__debug_pubtypes", /* .debug_pubtypes */
- "LC_SEGMENT.__DWARFA.__debug_ranges", /* .debug_ranges */
- "LC_SEGMENT.__DWARFA.__debug_static_func", /* .debug_static_func */
- "LC_SEGMENT.__DWARFA.__debug_static_vars", /* .debug_static_vars */
- "LC_SEGMENT.__DWARFA.__debug_types", /* .debug_types */
- "LC_SEGMENT.__DWARFA.__debug_weaknames" /* .debug_weaknames */
-};
-
-static const char *mach_o_compressed_dwarf_sections [] = {
- "LC_SEGMENT.__DWARFA.__zdebug_abbrev", /* .zdebug_abbrev */
- "LC_SEGMENT.__DWARFA.__zdebug_aranges", /* .zdebug_aranges */
- "LC_SEGMENT.__DWARFA.__zdebug_frame", /* .zdebug_frame */
- "LC_SEGMENT.__DWARFA.__zdebug_info", /* .zdebug_info */
- "LC_SEGMENT.__DWARFA.__zdebug_line", /* .zdebug_line */
- "LC_SEGMENT.__DWARFA.__zdebug_pubnames", /* .zdebug_pubnames */
- ".eh_frame", /* .eh_frame */
- "LC_SEGMENT.__DWARFA.__zdebug_macinfo", /* .zdebug_macinfo */
- "LC_SEGMENT.__DWARFA.__zdebug_str", /* .zdebug_str */
- "LC_SEGMENT.__DWARFA.__zdebug_loc", /* .zdebug_loc */
- "LC_SEGMENT.__DWARFA.__zdebug_pubtypes", /* .zdebug_pubtypes */
- "LC_SEGMENT.__DWARFA.__zdebug_ranges", /* .zdebug_ranges */
- "LC_SEGMENT.__DWARFA.__zdebug_static_func", /* .zdebug_static_func */
- "LC_SEGMENT.__DWARFA.__zdebug_static_vars", /* .zdebug_static_vars */
- "LC_SEGMENT.__DWARFA.__zdebug_types", /* .zdebug_types */
- "LC_SEGMENT.__DWARFA.__zdebug_weaknames" /* .zdebug_weaknames */
-};
-
-static const char *generic_uncompressed_dwarf_sections [max];
-static const char *generic_compressed_dwarf_sections [max];
-
-static void
-check_mach_o_dwarf (bfd *abfd)
-{
- static enum bfd_flavour old_flavour = bfd_target_unknown_flavour;
- enum bfd_flavour current_flavour = bfd_get_flavour (abfd);
- enum dwarf_section_display_enum i;
-
- if (generic_uncompressed_dwarf_sections [0] == NULL)
- for (i = 0; i < max; i++)
- {
- generic_uncompressed_dwarf_sections [i]
- = debug_displays[i].section.uncompressed_name;
- generic_compressed_dwarf_sections [i]
- = debug_displays[i].section.compressed_name;
- }
-
- if (old_flavour != current_flavour)
- {
- if (current_flavour == bfd_target_mach_o_flavour)
- for (i = 0; i < max; i++)
- {
- debug_displays[i].section.uncompressed_name
- = mach_o_uncompressed_dwarf_sections [i];
- debug_displays[i].section.compressed_name
- = mach_o_compressed_dwarf_sections [i];
- }
- else if (old_flavour == bfd_target_mach_o_flavour)
- for (i = 0; i < max; i++)
- {
- debug_displays[i].section.uncompressed_name
- = generic_uncompressed_dwarf_sections [i];
- debug_displays[i].section.compressed_name
- = generic_compressed_dwarf_sections [i];
- }
-
- old_flavour = current_flavour;
- }
-}
-
/* Dump the dwarf debugging information. */
static void
@@ -2275,8 +2183,6 @@ dump_dwarf (bfd *abfd)
else
abort ();
- check_mach_o_dwarf (abfd);
-
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);