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
4dword ELFGetSectionIndex(const char *SectionName)
5{
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}
dword ELFGetSectionIndex(const char *SectionName)
Elf32_Shdr * SectionHeaders
Definition: ELFOpenFile.c:7
char * shstrtab
Definition: ELFOpenFile.c:8
Elf32_Ehdr * ELFHeader
Definition: ELFOpenFile.c:6
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243
Elf32_Half e_shnum
Definition: ELF.h:44