elf: Move stabs symbol table format into outelf.h

Get rid of code duplication

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2010-07-29 10:12:29 +04:00
parent 16cbf9b5c2
commit d7b654c73d
3 changed files with 9 additions and 16 deletions

View File

@ -80,6 +80,15 @@ extern const struct elf_known_section elf_known_sections[];
#define sec_stabstr (nsections-2) #define sec_stabstr (nsections-2)
#define sec_rel_stab (nsections-1) #define sec_rel_stab (nsections-1)
/* stabs symbol table format */
struct stabentry {
uint32_t n_strx;
uint8_t n_type;
uint8_t n_other;
uint16_t n_desc;
uint32_t n_value;
};
/* dwarf */ /* dwarf */
#define sec_debug_aranges (nsections-10) #define sec_debug_aranges (nsections-10)
#define sec_rela_debug_aranges (nsections-9) #define sec_rela_debug_aranges (nsections-9)

View File

@ -142,14 +142,6 @@ static struct SAA *elf_build_symtab(int32_t *, int32_t *);
static struct SAA *elf_build_reltab(int32_t *, struct Reloc *); static struct SAA *elf_build_reltab(int32_t *, struct Reloc *);
static void add_sectname(char *, char *); static void add_sectname(char *, char *);
struct stabentry {
uint32_t n_strx;
uint8_t n_type;
uint8_t n_other;
uint16_t n_desc;
uint32_t n_value;
};
struct erel { struct erel {
int offset, info; int offset, info;
}; };

View File

@ -143,14 +143,6 @@ static struct SAA *elf_build_symtab(int32_t *, int32_t *);
static struct SAA *elf_build_reltab(uint64_t *, struct Reloc *); static struct SAA *elf_build_reltab(uint64_t *, struct Reloc *);
static void add_sectname(char *, char *); static void add_sectname(char *, char *);
struct stabentry {
uint32_t n_strx;
uint8_t n_type;
uint8_t n_other;
uint16_t n_desc;
uint32_t n_value;
};
struct erel { struct erel {
int offset, info; int offset, info;
}; };