summaryrefslogtreecommitdiffstats
path: root/dwarflint/where.h
diff options
context:
space:
mode:
authorPetr Machata <[email protected]>2010-08-19 17:08:14 +0200
committerPetr Machata <[email protected]>2010-08-19 17:08:14 +0200
commit60983b50de63e9278fcd906e954fc955e68b4f48 (patch)
tree5dd89bd75a0b476275add9fed1a7f7e8e52bfecf /dwarflint/where.h
parent7bbb5a3b9cf7b5aaf054bba3f46aa6ebbf958eb7 (diff)
dwarflint: Declare template "section" using an enum type
* split out enum section_id to separate file to make this possible * also define section names there
Diffstat (limited to 'dwarflint/where.h')
-rw-r--r--dwarflint/where.h38
1 files changed, 2 insertions, 36 deletions
diff --git a/dwarflint/where.h b/dwarflint/where.h
index f8fd6c13..feefd054 100644
--- a/dwarflint/where.h
+++ b/dwarflint/where.h
@@ -1,6 +1,8 @@
#ifndef DWARFLINT_WHERE_H
#define DWARFLINT_WHERE_H
+#include "section_id.h"
+
#include <stdint.h>
#include <stdlib.h>
@@ -10,42 +12,6 @@ extern "C"
{
#endif
-#define DEBUGINFO_SECTIONS \
- SEC (info) \
- SEC (abbrev) \
- SEC (aranges) \
- SEC (pubnames) \
- SEC (pubtypes) \
- SEC (str) \
- SEC (line) \
- SEC (loc) \
- SEC (mac) \
- SEC (ranges)
-
- enum section_id
- {
- sec_invalid = 0,
-
- /* Debuginfo sections: */
-#define SEC(n) sec_##n,
- DEBUGINFO_SECTIONS
- count_debuginfo_sections,
-#undef SEC
-
- /* Non-debuginfo sections: */
- sec_rel = count_debuginfo_sections,
- sec_rela,
-
- /* Non-sections: */
- sec_locexpr, /* Not a section, but a portion of file that
- contains a location expression. */
- rel_value, /* For relocations, this denotes that the
- relocation is applied to taget value, not a
- section offset. */
- rel_address, /* Same as above, but for addresses. */
- rel_exec, /* Some as above, but we expect EXEC bit. */
- };
-
enum where_formatting
{
wf_plain = 0, /* Default formatting for given section. */