library/src/ELF/ELF32/BP-ELFExtraction.cc
// extract a section and return a section list element; all pointers are
// NULL.
extract a section and return a section list element; all pointers are
NULL.
extract a section and return a section list element ; all pointers are NULL .
P_ELF_SECTION_HDR_32BIT ELF32_ExtractSectionHeader_File(P_ELF_32BIT_LOOKUP_TABLE fullHeader, FILE *elfFile){
	if(fullHeader == NULL)
		return NULL;
	if(fullHeader->header == NULL)
		return NULL;
	if(elfFile == NULL)
		return NULL;
	P_ELF_HDR_32BIT elfHdr = fullHeader->header;
	P_ELF_SECTION_HDR_32BIT header = (P_ELF_SECTION_HDR_32BIT) bpmalloc(sizeof(ELF_SECTION_HDR_32BIT));
		memset(header, 0x00, sizeof(ELF_SECTION_HDR_32BIT));
	if( fread((void *) header, 1, sizeof(ELF_SECTION_HDR_32BIT), elfFile) == 0)
		return NULL;
	return header;
}
P_ELF_SECTION_HDR_32BIT ELF32_ExtractSectionHeader_File ( P_ELF_32BIT_LOOKUP_TABLE fullHeader , FILE * elfFile ) { if ( fullHeader == NULL ) return NULL ; if ( fullHeader -> header == NULL ) return NULL ; if ( elfFile == NULL ) return NULL ; P_ELF_HDR_32BIT elfHdr = fullHeader -> header ; P_ELF_SECTION_HDR_32BIT header = ( P_ELF_SECTION_HDR_32BIT ) bpmalloc ( sizeof ( ELF_SECTION_HDR_32BIT ) ) ; memset ( header , 0x00 , sizeof ( ELF_SECTION_HDR_32BIT ) ) ; if ( fread ( ( void * ) header , 1 , sizeof ( ELF_SECTION_HDR_32BIT ) , elfFile ) == 0 ) return NULL ; return header ; }
extract a section and return a section list element; all pointers are
NULL.
extract a section and return a section list element ; all pointers are NULL .
// default checks // return NULL if we cannot read out of the file