projects
/
centaur.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
68d9986eb2eec84a777161df9ad928c02a617db0
[centaur.git]
/
src
/
model
/
section-name.c
1
#include <assert.h>
2
#include <stdlib.h>
3
#include <libelf/libelf.h>
4
#include <libelf/gelf.h>
5
#include <libelfu/libelfu.h>
6
7
8
9
char* elfu_mScnName(ElfuElf *me, ElfuScn *ms)
10
{
11
assert(me);
12
assert(ms);
13
14
if (!me->shstrtab) {
15
return NULL;
16
}
17
18
if (!me->shstrtab->data.d_buf) {
19
return NULL;
20
}
21
22
return &((char*)me->shstrtab->data.d_buf)[ms->shdr.sh_name];
23
}