blob: 68d9986eb2eec84a777161df9ad928c02a617db0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <assert.h>
#include <stdlib.h>
#include <libelf/libelf.h>
#include <libelf/gelf.h>
#include <libelfu/libelfu.h>
char* elfu_mScnName(ElfuElf *me, ElfuScn *ms)
{
assert(me);
assert(ms);
if (!me->shstrtab) {
return NULL;
}
if (!me->shstrtab->data.d_buf) {
return NULL;
}
return &((char*)me->shstrtab->data.d_buf)[ms->shdr.sh_name];
}
|