1 | /* $Id: DBGPlugInCommonELF.h 31510 2010-08-10 08:48:11Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * DBGPlugInCommonELF - Common code for dealing with ELF images, Header.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2008 Oracle Corporation
|
---|
8 | *
|
---|
9 | * Oracle Corporation confidential
|
---|
10 | * All rights reserved
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef ___Debugger_DBGPlugInCommonELF_h
|
---|
14 | #define ___Debugger_DBGPlugInCommonELF_h
|
---|
15 |
|
---|
16 | #include <VBox/types.h>
|
---|
17 | #include "../Runtime/include/internal/ldrELF32.h"
|
---|
18 | #include "../Runtime/include/internal/ldrELF64.h"
|
---|
19 |
|
---|
20 | /** @name DBGDiggerCommonParseElf32Mod and DBGDiggerCommonParseElf64Mod flags
|
---|
21 | * @{ */
|
---|
22 | /** Wheter to adjust the symbol values or not. */
|
---|
23 | #define DBG_DIGGER_ELF_ADJUST_SYM_VALUE RT_BIT_32(0)
|
---|
24 | /** Indicates that we're missing section headers and that
|
---|
25 | * all section indexes are to be considered invalid. (Solaris hack.)
|
---|
26 | * This flag is incompatible with DBG_DIGGER_ELF_ADJUST_SYM_VALUE. */
|
---|
27 | #define DBG_DIGGER_ELF_FUNNY_SHDRS RT_BIT_32(1)
|
---|
28 | /** Valid bit mask. */
|
---|
29 | #define DBG_DIGGER_ELF_MASK UINT32_C(0x00000003)
|
---|
30 | /* @} */
|
---|
31 |
|
---|
32 | int DBGDiggerCommonParseElf32Mod(PVM pVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
|
---|
33 | Elf32_Ehdr const *pEhdr, Elf32_Shdr const *paShdrs,
|
---|
34 | Elf32_Sym const *paSyms, size_t cMaxSyms,
|
---|
35 | char const *pbStrings, size_t cbMaxStrings,
|
---|
36 | RTGCPTR MinAddr, RTGCPTR MaxAddr, uint64_t uModTag);
|
---|
37 |
|
---|
38 | int DBGDiggerCommonParseElf64Mod(PVM pVM, const char *pszModName, const char *pszFilename, uint32_t fFlags,
|
---|
39 | Elf64_Ehdr const *pEhdr, Elf64_Shdr const *paShdrs,
|
---|
40 | Elf64_Sym const *paSyms, size_t cMaxSyms,
|
---|
41 | char const *pbStrings, size_t cbMaxStrings,
|
---|
42 | RTGCPTR MinAddr, RTGCPTR MaxAddr, uint64_t uModTag);
|
---|
43 |
|
---|
44 | #endif
|
---|
45 |
|
---|