1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
|
/*
Copyright (C) 2017-2017 David Anderson. All Rights Reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of version 2 of the GNU General
Public License as published by the Free Software Foundation.
This program is distributed in the hope that it would be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Further, this software is distributed without any warranty
that it is free of the rightful claim of any third person
regarding infringement or the like. Any license provided
herein, whether implied or otherwise, applies only to this
software file. Patent licenses, if any, provided herein
do not apply to combinations of this program with other
software, or any other product whatsoever.
You should have received a copy of the GNU General Public
License along with this program; if not, write the Free
Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
Boston MA 02110-1301, USA.
*/
#ifndef SECTION_BITMAPS_H_INCLUDED
#define SECTION_BITMAPS_H_INCLUDED
/* section_bitmaps.h and .c actually involved bits,
bit shifting, and bit masks,
but now the 'maps' are simple byte arrays.
See reloc_map and section_map in dwarfdump.c */
/* Value is one of the DW_HDR_DEBUG_* names. */
struct section_map_s {
const char *name;
unsigned value;
};
extern struct section_map_s map_sectnames[] ;
#define DW_HDR_DEBUG_INFO 1
#define DW_HDR_DEBUG_INFO_DWO 2
#define DW_HDR_DEBUG_LINE 3
#define DW_HDR_DEBUG_LINE_DWO 4
#define DW_HDR_DEBUG_PUBNAMES 5
#define DW_HDR_DEBUG_ABBREV 6
#define DW_HDR_DEBUG_ABBREV_DWO 7
#define DW_HDR_DEBUG_ARANGES 8
#define DW_HDR_DEBUG_FRAME 9
#define DW_HDR_DEBUG_LOC 10
#define DW_HDR_DEBUG_LOCLISTS 11
#define DW_HDR_DEBUG_LOCLISTS_DWO 12
#define DW_HDR_DEBUG_RANGES 13
#define DW_HDR_DEBUG_RNGLISTS 14
#define DW_HDR_DEBUG_RNGLISTS_DWO 15
#define DW_HDR_DEBUG_STR 16
#define DW_HDR_DEBUG_STR_DWO 17
#define DW_HDR_DEBUG_STR_OFFSETS 18
#define DW_HDR_DEBUG_STR_OFFSETS_DWO 19
#define DW_HDR_DEBUG_PUBTYPES 20
#define DW_HDR_DEBUG_TYPES 21
#define DW_HDR_TEXT 22
#define DW_HDR_GDB_INDEX 23
#define DW_HDR_EH_FRAME 24
#define DW_HDR_DEBUG_MACINFO 25
#define DW_HDR_DEBUG_MACRO 26
#define DW_HDR_DEBUG_MACRO_DWO 27
#define DW_HDR_DEBUG_NAMES 28
#define DW_HDR_DEBUG_CU_INDEX 29
#define DW_HDR_DEBUG_TU_INDEX 30
#define DW_HDR_HEADER 31
#define DW_HDR_ARRAY_SIZE 32
/* Debug section names to be included in printing */
#define DW_SECTNAME_DEBUG_INFO ".debug_info"
#define DW_SECTNAME_DEBUG_INFO_DWO ".debug_info.dwo"
#define DW_SECTNAME_DEBUG_LINE ".debug_line"
#define DW_SECTNAME_DEBUG_LINE_DWO ".debug_line.dwo"
#define DW_SECTNAME_DEBUG_PUBNAMES ".debug_pubnames"
#define DW_SECTNAME_DEBUG_ABBREV ".debug_abbrev"
#define DW_SECTNAME_DEBUG_ABBREV_DWO ".debug_abbrev.dwo"
#define DW_SECTNAME_DEBUG_ARANGES ".debug_aranges"
#define DW_SECTNAME_DEBUG_FRAME ".debug_frame"
#define DW_SECTNAME_DEBUG_LOC ".debug_loc"
#define DW_SECTNAME_DEBUG_LOCLISTS ".debug_loclists"
#define DW_SECTNAME_DEBUG_LOCLISTS_DWO ".debug_loclists.dwo"
#define DW_SECTNAME_DEBUG_RANGES ".debug_ranges"
#define DW_SECTNAME_DEBUG_RNGLISTS ".debug_rnglists"
#define DW_SECTNAME_DEBUG_RNGLISTS_DWO ".debug_rnglists.dwo"
#define DW_SECTNAME_DEBUG_STR ".debug_str"
#define DW_SECTNAME_DEBUG_STR_DWO ".debug_str.dwo"
#define DW_SECTNAME_DEBUG_STR_OFFSETS ".debug_str_offsets"
#define DW_SECTNAME_DEBUG_STR_OFFSETS_DWO ".debug_str_offsets.dwo"
/* obsolete SGI-only section was .debug_typenames */
#define DW_SECTNAME_DEBUG_PUBTYPES ".debug_pubtypes"
#define DW_SECTNAME_DEBUG_TYPES ".debug_types"
#define DW_SECTNAME_TEXT ".text"
#define DW_SECTNAME_GDB_INDEX ".gdb_index"
#define DW_SECTNAME_EH_FRAME ".eh_frame"
#define DW_SECTNAME_DEBUG_SUP ".debug_sup"
#define DW_SECTNAME_DEBUG_MACINFO ".debug_macinfo"
#define DW_SECTNAME_DEBUG_MACRO ".debug_macro"
#define DW_SECTNAME_DEBUG_MACRO_DWO ".debug_macro.dwo"
#define DW_SECTNAME_DEBUG_NAMES ".debug_names"
#define DW_SECTNAME_DEBUG_CU_INDEX ".debug_cu_index"
#define DW_SECTNAME_DEBUG_TU_INDEX ".debug_tu_index"
/* Definitions for printing relocations. */
#define DW_SECTION_REL_DEBUG_INFO 1
#define DW_SECTION_REL_DEBUG_LINE 2
#define DW_SECTION_REL_DEBUG_PUBNAMES 3
#define DW_SECTION_REL_DEBUG_ABBREV 4
#define DW_SECTION_REL_DEBUG_ARANGES 5
#define DW_SECTION_REL_DEBUG_FRAME 6
#define DW_SECTION_REL_DEBUG_LOC 7
#define DW_SECTION_REL_DEBUG_LOCLISTS 8
#define DW_SECTION_REL_DEBUG_RANGES 9
#define DW_SECTION_REL_DEBUG_RNGLISTS 10
#define DW_SECTION_REL_DEBUG_TYPES 11
#define DW_SECTION_REL_DEBUG_STR_OFFSETS 12
#define DW_SECTION_REL_DEBUG_PUBTYPES 13
#define DW_SECTION_REL_GDB_INDEX 14
#define DW_SECTION_REL_EH_FRAME 15
#define DW_SECTION_REL_DEBUG_SUP 16
#define DW_SECTION_REL_DEBUG_MACINFO 17
#define DW_SECTION_REL_DEBUG_MACRO 18
#define DW_SECTION_REL_DEBUG_NAMES 19
#define DW_SECTION_REL_ARRAY_SIZE 20
#define DW_SECTNAME_RELA_DEBUG_INFO ".rela.debug_info"
#define DW_SECTNAME_RELA_DEBUG_LINE ".rela.debug_line"
#define DW_SECTNAME_RELA_DEBUG_PUBNAMES ".rela.debug_pubnames"
#define DW_SECTNAME_RELA_DEBUG_ABBREV ".rela.debug_abbrev"
#define DW_SECTNAME_RELA_DEBUG_ARANGES ".rela.debug_aranges"
#define DW_SECTNAME_RELA_DEBUG_FRAME ".rela.debug_frame"
#define DW_SECTNAME_RELA_DEBUG_LOC ".rela.debug_loc"
#define DW_SECTNAME_RELA_DEBUG_LOCLISTS ".rela.debug_loclists"
#define DW_SECTNAME_RELA_DEBUG_RANGES ".rela.debug_ranges"
#define DW_SECTNAME_RELA_DEBUG_RNGLISTS ".rela.debug_rnglists"
#define DW_SECTNAME_RELA_DEBUG_TYPES ".rela.debug_types"
#define DW_SECTNAME_RELA_DEBUG_STR_OFFSETS ".rela.debug_str_offsets"
#define DW_SECTNAME_RELA_DEBUG_PUBTYPES ".rela.debug_pubtypes"
#define DW_SECTNAME_RELA_GDB_INDEX ".rela.debug_gdb_index"
#define DW_SECTNAME_RELA_EH_FRAME ".rela.eh_frame"
#define DW_SECTNAME_RELA_DEBUG_SUP ".rela.debug_sup"
#define DW_SECTNAME_RELA_DEBUG_MACINFO ".rela.debug_macinfo"
#define DW_SECTNAME_RELA_DEBUG_MACRO ".rela.debug_macro"
#define DW_SECTNAME_RELA_DEBUG_NAMES ".rela.debug_names"
#define DW_SECTNAME_REL_DEBUG_INFO ".rel.debug_info"
#define DW_SECTNAME_REL_DEBUG_LINE ".rel.debug_line"
#define DW_SECTNAME_REL_DEBUG_PUBNAMES ".rel.debug_pubnames"
#define DW_SECTNAME_REL_DEBUG_ABBREV ".rel.debug_abbrev"
#define DW_SECTNAME_REL_DEBUG_ARANGES ".rel.debug_aranges"
#define DW_SECTNAME_REL_DEBUG_FRAME ".rel.debug_frame"
#define DW_SECTNAME_REL_DEBUG_LOC ".rel.debug_loc"
#define DW_SECTNAME_REL_DEBUG_LOCLISTS ".rel.debug_loclists"
#define DW_SECTNAME_REL_DEBUG_RANGES ".rel.debug_ranges"
#define DW_SECTNAME_REL_DEBUG_RNGLISTS ".rel.debug_rnglists"
#define DW_SECTNAME_REL_DEBUG_TYPES ".rel.debug_types"
#define DW_SECTNAME_REL_DEBUG_STR_OFFSETS ".rel.debug_str_offsets"
#define DW_SECTNAME_REL_DEBUG_PUBTYPES ".rel.debug_pubtypes"
#define DW_SECTNAME_REL_GDB_INDEX ".rel.debug_gdb_index"
#define DW_SECTNAME_REL_EH_FRAME ".rel.eh_frame"
#define DW_SECTNAME_REL_DEBUG_SUP ".rel.debug_sup"
#define DW_SECTNAME_REL_DEBUG_MACINFO ".rel.debug_macinfo"
#define DW_SECTNAME_REL_DEBUG_MACRO ".rel.debug_macro"
#define DW_SECTNAME_REL_DEBUG_NAMES ".rel.debug_names"
boolean section_name_is_debug_and_wanted(const char *section_name);
unsigned section_bitmap_array_size(void);
void set_all_section_defaults(void);
boolean any_section_header_to_print(void);
void enable_section_map_entry(unsigned index);
boolean section_map_enabled(unsigned index);
void set_all_sections_on(void);
void enable_reloc_map_entry(unsigned index);
boolean reloc_map_enabled(unsigned index);
void set_all_reloc_sections_on(void);
#endif /* SECTION_BITMAPS_H_INCLUDED*/
|