From 2304ebab76f03b0fe89f35f8defd1a6e279130f9 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 4 Jan 1999 18:37:41 +0000 Subject: Don't forget a trailing \n when loading a kernel that has been stripped. (This might make ELF_VERBOSE look funny, but I'm tempted to delete that anyway) --- sys/boot/common/load_elf.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'sys') diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c index 9ef93d9..ff1f506 100644 --- a/sys/boot/common/load_elf.c +++ b/sys/boot/common/load_elf.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: load_elf.c,v 1.8 1998/10/16 03:04:15 peter Exp $ + * $Id: load_elf.c,v 1.9 1998/10/17 03:06:38 peter Exp $ */ #include @@ -323,11 +323,11 @@ elf_loadimage(struct loaded_module *mp, int fd, vm_offset_t off, if (shdr == NULL) goto nosyms; if (lseek(fd, ehdr->e_shoff, SEEK_SET) == -1) { - printf("\nelf_loadimage: cannot lseek() to section headers\n"); + printf("\nelf_loadimage: cannot lseek() to section headers"); goto nosyms; } if (read(fd, shdr, chunk) != chunk) { - printf("\nelf_loadimage: read section headers failed\n"); + printf("\nelf_loadimage: read section headers failed"); goto nosyms; } symtabindex = -1; @@ -382,7 +382,7 @@ elf_loadimage(struct loaded_module *mp, int fd, vm_offset_t off, lastaddr += sizeof(long); #ifdef ELF_VERBOSE - printf("%s: 0x%lx@0x%lx -> 0x%lx-0x%lx\n", secname, + printf("\n%s: 0x%lx@0x%lx -> 0x%lx-0x%lx", secname, shdr[i].sh_size, shdr[i].sh_offset, lastaddr, lastaddr + shdr[i].sh_size); #else @@ -392,14 +392,14 @@ elf_loadimage(struct loaded_module *mp, int fd, vm_offset_t off, #endif if (lseek(fd, shdr[i].sh_offset, SEEK_SET) == -1) { - printf("\nelf_loadimage: could not seek for symbols - skipped!\n"); + printf("\nelf_loadimage: could not seek for symbols - skipped!"); lastaddr = ssym; ssym = 0; goto nosyms; } if (archsw.arch_readin(fd, lastaddr, shdr[i].sh_size) != shdr[i].sh_size) { - printf("\nelf_loadimage: could not read symbols - skipped!\n"); + printf("\nelf_loadimage: could not read symbols - skipped!"); lastaddr = ssym; ssym = 0; goto nosyms; @@ -414,13 +414,14 @@ elf_loadimage(struct loaded_module *mp, int fd, vm_offset_t off, } esym = lastaddr; #ifndef ELF_VERBOSE - printf("]\n"); + printf("]"); #endif mod_addmetadata(mp, MODINFOMD_SSYM, sizeof(ssym), &ssym); mod_addmetadata(mp, MODINFOMD_ESYM, sizeof(esym), &esym); nosyms: + printf("\n"); ret = lastaddr - firstaddr; mp->m_addr = firstaddr; -- cgit v1.1