diff options
author | peter <peter@FreeBSD.org> | 1999-01-04 18:37:41 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-01-04 18:37:41 +0000 |
commit | 2304ebab76f03b0fe89f35f8defd1a6e279130f9 (patch) | |
tree | b17f0dc7269e63969e6404fa54fdcff4d0037e77 /sys/boot/common/load_elf.c | |
parent | b9b93bcb855b2aae132f761e63d19346ce1379d2 (diff) | |
download | FreeBSD-src-2304ebab76f03b0fe89f35f8defd1a6e279130f9.zip FreeBSD-src-2304ebab76f03b0fe89f35f8defd1a6e279130f9.tar.gz |
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)
Diffstat (limited to 'sys/boot/common/load_elf.c')
-rw-r--r-- | sys/boot/common/load_elf.c | 15 |
1 files changed, 8 insertions, 7 deletions
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 <sys/param.h> @@ -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; |