From: Ali Saidi Date: Thu, 15 Jan 2004 18:22:55 +0000 (-0500) Subject: mereged changes to elf_object.cc X-Git-Tag: m5_1.0_tutorial~421 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f013df643a57814e6db4988037c9718eab994e5a;p=gem5.git mereged changes to elf_object.cc base/loader/elf_object.cc: merged changes to elf_object.cc --HG-- extra : convert_revision : 2b7a6083d45f0221646e2ebe5b91ee45ec8c6b7c --- f013df643a57814e6db4988037c9718eab994e5a diff --cc base/loader/elf_object.cc index 93313fac6,df3e15f76..929d455a5 --- a/base/loader/elf_object.cc +++ b/base/loader/elf_object.cc @@@ -183,10 -211,10 +183,10 @@@ ElfObject::loadSections(FunctionalMemor 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; @@@ -205,14 -233,18 +205,14 @@@ 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;