scripts/gen_offset_header/gen_offset_header.c
/**
 *
 * symTblFind - search the section headers for the symbol table
 *
 * This routine searches the section headers for the symbol table.  There is
 * expected to be only one symbol table in the section headers.
 *
 * @param pSymTblOffset ptr to symbol table offset
 * @param pSymTblSize ptr to symbol table size
 * @returns 0 if found, -1 if not
 */
search the section headers for the symbol table
This routine searches the section headers for the symbol table.  There is
expected to be only one symbol table in the section headers.

@param pSymTblOffset ptr to symbol table offset
@param pSymTblSize ptr to symbol table size
@returns 0 if found, -1 if not
search the section headers for the symbol table This routine searches the section headers for the symbol table . There is expected to be only one symbol table in the section headers . @param pSymTblOffset ptr to symbol table offset @param pSymTblSize ptr to symbol table size @returns 0 if found - 1 if not
static int symTblFind(unsigned *pSymTblOffset, unsigned *pSymTblSize)
{
	unsigned  ix;    
	for (ix = 0; ix < ehdr.e_shnum; ++ix)
	{
		if (shdr[ix].sh_type == SHT_SYMTAB)
		{
			*pSymTblOffset = shdr[ix].sh_offset;
			*pSymTblSize   = shdr[ix].sh_size;
			return 0;
		}
	}
	fprintf(stderr, "Object module missing symbol table!\n");
	return -1;
}
static int symTblFind ( unsigned * pSymTblOffset , unsigned * pSymTblSize ) { unsigned ix ; for ( ix = 0 ; ix < ehdr . e_shnum ; ++ ix ) { if ( shdr [ ix ] . sh_type == SHT_SYMTAB ) { * pSymTblOffset = shdr [ ix ] . sh_offset ; * pSymTblSize = shdr [ ix ] . sh_size ; return 0 ; } } fprintf ( stderr , " \n " ) ; return -1 ; }
symTblFind - search the section headers for the symbol table
 This routine searches the section headers for the symbol table.
symTblFind - search the section headers for the symbol table This routine searches the section headers for the symbol table .
/* loop index */