X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Flib%2Fao-elf.c;h=c44102f869a7fe2d6964b601ebea23f9e529a7f5;hb=c0ad087008856cfc2233b977abfc3f1dcbaccdcc;hp=99b37210781e553094f2e9aa52407392b7da2486;hpb=14204e3d147ad99cc249ad8de254809180fe5c38;p=fw%2Faltos diff --git a/ao-tools/lib/ao-elf.c b/ao-tools/lib/ao-elf.c index 99b37210..c44102f8 100644 --- a/ao-tools/lib/ao-elf.c +++ b/ao-tools/lib/ao-elf.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -206,7 +207,7 @@ get_load(Elf *e) #endif size_t nshdr; size_t s; - + if (elf_getshdrstrndx(e, &shstrndx) < 0) return 0; @@ -238,7 +239,7 @@ get_load(Elf *e) (uint32_t) phdr.p_filesz, (uint32_t) phdr.p_memsz); #endif - + for (s = 0; s < nshdr; s++) { scn = elf_getscn(e, s); @@ -256,7 +257,7 @@ get_load(Elf *e) #endif if (phdr.p_offset <= shdr.sh_offset && shdr.sh_offset < phdr.p_offset + phdr.p_filesz) { - + if (shdr.sh_size == 0) continue;