FireBirdLib - Topfield TMS PVR TAP Programming Library
ELFGetSectionIndex.c
Go to the documentation of this file.
1
#include "
ELF.h
"
2
#include "
FBLib_elf.h
"
3
4
dword
ELFGetSectionIndex
(
const
char
*SectionName)
5
{
6
TRACEENTER
();
7
8
int
i;
9
10
if
(SectionName)
11
{
12
//Loop through all section headers and locate SectionName
13
for
(i = 1; i <
ELFHeader
->
e_shnum
; i++)
14
if
(!strcmp(&
shstrtab
[
SectionHeaders
[i].sh_name], SectionName))
15
{
16
TRACEEXIT
();
17
return
i;
18
}
19
}
20
21
TRACEEXIT
();
22
return
0;
23
}
ELFGetSectionIndex
dword ELFGetSectionIndex(const char *SectionName)
Definition:
ELFGetSectionIndex.c:4
SectionHeaders
Elf32_Shdr * SectionHeaders
Definition:
ELFOpenFile.c:7
shstrtab
char * shstrtab
Definition:
ELFOpenFile.c:8
ELFHeader
Elf32_Ehdr * ELFHeader
Definition:
ELFOpenFile.c:6
ELF.h
FBLib_elf.h
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
Elf32_Ehdr::e_shnum
Elf32_Half e_shnum
Definition:
ELF.h:44
elf
ELFGetSectionIndex.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3