diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2016-02-06 17:21:19 -0800 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2016-02-06 17:21:19 -0800 |
commit | 5592798865ece858bab2b444bc782d19121e2566 (patch) | |
tree | 80803048c903c424ed9f1200b5dc1a29ed3ff6b8 /src/base/loader | |
parent | dc8018a5c3482008232e6faaa2d96cf20aed7485 (diff) | |
download | gem5-5592798865ece858bab2b444bc782d19121e2566.tar.xz |
style: fix missing spaces in control statements
Result of running 'hg m5style --skip-all --fix-control -a'.
Diffstat (limited to 'src/base/loader')
-rw-r--r-- | src/base/loader/elf_object.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc index c9684c42a..6bfc0e460 100644 --- a/src/base/loader/elf_object.cc +++ b/src/base/loader/elf_object.cc @@ -179,7 +179,7 @@ ElfObject::tryFile(const string &fname, size_t len, uint8_t *data) // 2 == solaris, 3 == freebsd data = elf_rawdata(section, NULL); assert(data->d_buf); - if(ehdr.e_ident[EI_DATA] == ELFDATA2LSB) + if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) osAbi = htole(((uint32_t*)data->d_buf)[4]); else osAbi = htobe(((uint32_t*)data->d_buf)[4]); @@ -218,7 +218,7 @@ ElfObject::tryFile(const string &fname, size_t len, uint8_t *data) result->_programHeaderCount = ehdr.e_phnum; //Record the size of each entry result->_programHeaderSize = ehdr.e_phentsize; - if(result->_programHeaderCount) //If there is a program header table + if (result->_programHeaderCount) //If there is a program header table { //Figure out the virtual address of the header table in the //final memory image. We use the program headers themselves @@ -226,11 +226,11 @@ ElfObject::tryFile(const string &fname, size_t len, uint8_t *data) GElf_Phdr phdr; uint64_t e_phoff = ehdr.e_phoff; result->_programHeaderTable = 0; - for(int hdrnum = 0; hdrnum < result->_programHeaderCount; hdrnum++) + for (int hdrnum = 0; hdrnum < result->_programHeaderCount; hdrnum++) { gelf_getphdr(elf, hdrnum, &phdr); //Check if we've found the segment with the headers in it - if(phdr.p_offset <= e_phoff && + if (phdr.p_offset <= e_phoff && phdr.p_offset + phdr.p_filesz > e_phoff) { result->_programHeaderTable = |