Skip to content

Commit 85681b3

Browse files
committed
support for separate debug info: build-ids
1 parent f6a7853 commit 85681b3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

elf_parser.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
// SOFTWARE.
2222

2323
#include "elf_parser.hpp"
24+
#include <sys/stat.h>
25+
#include <cstring>
2426
using namespace elf_parser;
2527

2628
std::vector<section_t> Elf_parser::get_sections() {

elf_parser.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,16 @@ typedef struct {
6363
std::intptr_t relocation_plt_address;
6464
} relocation_t;
6565

66+
// Note header for ELF64.
67+
struct Elf64_Nhdr {
68+
Elf64_Word n_namesz;
69+
Elf64_Word n_descsz;
70+
Elf64_Word n_type;
71+
};
6672

6773
class Elf_parser {
6874
public:
69-
Elf_parser (std::string &program_path): m_program_path{program_path} {
75+
Elf_parser (const std::string &program_path): m_program_path{program_path} {
7076
load_memory_map();
7177
}
7278
std::vector<section_t> get_sections();

0 commit comments

Comments
 (0)