diff options
| author | Andriy Gapon <avg@FreeBSD.org> | 2010-08-21 18:51:25 +0000 |
|---|---|---|
| committer | Andriy Gapon <avg@FreeBSD.org> | 2010-08-21 18:51:25 +0000 |
| commit | d6e69ef4efb7a4ae2d6dd2c00ee011a177dca34b (patch) | |
| tree | 45bd8fdd63308f5d43f4a05ca855fab71746da2e /sys/boot | |
| parent | 23055db15625cb747fd6540b4616f626ec08cae3 (diff) | |
Notes
Diffstat (limited to 'sys/boot')
| -rw-r--r-- | sys/boot/common/load_elf_obj.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/boot/common/load_elf_obj.c b/sys/boot/common/load_elf_obj.c index 4b3aaeae7865..6f3b3493aa3d 100644 --- a/sys/boot/common/load_elf_obj.c +++ b/sys/boot/common/load_elf_obj.c @@ -221,6 +221,8 @@ __elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off) for (i = 0; i < hdr->e_shnum; i++) shdr[i].sh_addr = 0; for (i = 0; i < hdr->e_shnum; i++) { + if (shdr[i].sh_size == 0) + continue; switch (shdr[i].sh_type) { case SHT_PROGBITS: case SHT_NOBITS: |
