FireBirdLib - Topfield TMS PVR TAP Programming Library
ELFGetSectionAddress.c
Go to the documentation of this file.
1#include "ELF.h"
2#include "FBLib_elf.h"
3
4bool ELFGetSectionAddress(dword SectionIndex, dword *SectionAddress, dword *SectionSize)
5{
7
8 if(SectionIndex >= ELFHeader->e_shnum)
9 {
10 TRACEEXIT();
11 return FALSE;
12 }
13
14 if(SectionAddress) *SectionAddress = SectionHeaders[SectionIndex].sh_addr;
15 if(SectionSize) *SectionSize = SectionHeaders[SectionIndex].sh_size;
16
17 TRACEEXIT();
18 return TRUE;
19}
bool ELFGetSectionAddress(dword SectionIndex, dword *SectionAddress, dword *SectionSize)
Elf32_Shdr * SectionHeaders
Definition: ELFOpenFile.c:7
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
Elf32_Addr sh_addr
Definition: ELF.h:53
Elf32_Word sh_size
Definition: ELF.h:55