bool
-ElfObject::loadGlobalSymbols(SymbolTable *symtab)
+ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding)
{
Elf *elf;
- int secidx = 1; // there is a 0 but it is nothing, go figure
- int sec_idx = 1; /* there is a 0 but it is nothing, go figure*/
++ int sec_idx = 1; // there is a 0 but it is nothing, go figure
Elf_Scn *section;
GElf_Shdr shdr;
Elf_Data *data;
assert(elf != NULL);
-
- /* Get the first section */
+ // Get the first section
- section = elf_getscn(elf, secidx);
+ section = elf_getscn(elf, sec_idx);
- /* While there are no more sections */
- while (section != NULL)
- {
+ // While there are no more sections
+ while (section != NULL) {
gelf_getshdr(section, &shdr);
-
- if(shdr.sh_type == SHT_SYMTAB)
- {
+ if (shdr.sh_type == SHT_SYMTAB) {
found = true;
data = elf_getdata(section, NULL);
count = shdr.sh_size / shdr.sh_entsize;