diff options
author | Peter Wemm <peter@FreeBSD.org> | 2001-09-03 04:39:38 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2001-09-03 04:39:38 +0000 |
commit | c92c4c8f793904a61cb82fd3bf2d4704bc3f91e2 (patch) | |
tree | 1c015e9355457175842aa1a225329d8c1a0bb44e /sys/kern/link_elf_obj.c | |
parent | 00dda5e82b657d17cf1b133ad82b024068a01bba (diff) | |
download | src-c92c4c8f793904a61cb82fd3bf2d4704bc3f91e2.tar.gz src-c92c4c8f793904a61cb82fd3bf2d4704bc3f91e2.zip |
Unindent a if (1) { that was left behind in the last commit.
(commits were seperated to not obscure the real change)
Notes
Notes:
svn path=/head/; revision=82848
Diffstat (limited to 'sys/kern/link_elf_obj.c')
-rw-r--r-- | sys/kern/link_elf_obj.c | 90 |
1 files changed, 44 insertions, 46 deletions
diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index d07528141476..c19e0eef64e3 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -184,58 +184,56 @@ link_elf_init(void* arg) #else dp = 0; #endif - if (1) { - modname = NULL; - modptr = preload_search_by_type("elf kernel"); - if (modptr) - modname = (char *)preload_search_info(modptr, MODINFO_NAME); - if (modname == NULL) - modname = "kernel"; - linker_kernel_file = linker_make_file(modname, &link_elf_class); - if (linker_kernel_file == NULL) - panic("link_elf_init: Can't create linker structures for kernel"); - - ef = (elf_file_t) linker_kernel_file; - ef->preloaded = 1; - ef->address = 0; + modname = NULL; + modptr = preload_search_by_type("elf kernel"); + if (modptr) + modname = (char *)preload_search_info(modptr, MODINFO_NAME); + if (modname == NULL) + modname = "kernel"; + linker_kernel_file = linker_make_file(modname, &link_elf_class); + if (linker_kernel_file == NULL) + panic("link_elf_init: Can't create linker structures for kernel"); + + ef = (elf_file_t) linker_kernel_file; + ef->preloaded = 1; + ef->address = 0; #ifdef SPARSE_MAPPING - ef->object = 0; + ef->object = 0; #endif - ef->dynamic = dp; - - if (dp) - parse_dynamic(ef); - linker_kernel_file->address = (caddr_t) KERNBASE; - linker_kernel_file->size = -(intptr_t)linker_kernel_file->address; - - if (modptr) { - ef->modptr = modptr; - baseptr = preload_search_info(modptr, MODINFO_ADDR); - if (baseptr) - linker_kernel_file->address = *(caddr_t *)baseptr; - sizeptr = preload_search_info(modptr, MODINFO_SIZE); - if (sizeptr) - linker_kernel_file->size = *(size_t *)sizeptr; - } - (void)link_elf_preload_parse_symbols(ef); + ef->dynamic = dp; + + if (dp) + parse_dynamic(ef); + linker_kernel_file->address = (caddr_t) KERNBASE; + linker_kernel_file->size = -(intptr_t)linker_kernel_file->address; + + if (modptr) { + ef->modptr = modptr; + baseptr = preload_search_info(modptr, MODINFO_ADDR); + if (baseptr) + linker_kernel_file->address = *(caddr_t *)baseptr; + sizeptr = preload_search_info(modptr, MODINFO_SIZE); + if (sizeptr) + linker_kernel_file->size = *(size_t *)sizeptr; + } + (void)link_elf_preload_parse_symbols(ef); #ifdef DDB - ef->gdb.l_addr = linker_kernel_file->address; - newfilename = malloc(strlen(modname) + 1, M_LINKER, M_WAITOK); - strcpy(newfilename, modname); - ef->gdb.l_name = newfilename; - ef->gdb.l_ld = dp; - ef->gdb.l_prev = 0; - ef->gdb.l_next = 0; - - r_debug.r_map = &ef->gdb; - r_debug.r_brk = r_debug_state; - r_debug.r_state = RT_CONSISTENT; - - r_debug_state(NULL, NULL); /* say hello to gdb! */ + ef->gdb.l_addr = linker_kernel_file->address; + newfilename = malloc(strlen(modname) + 1, M_LINKER, M_WAITOK); + strcpy(newfilename, modname); + ef->gdb.l_name = newfilename; + ef->gdb.l_ld = dp; + ef->gdb.l_prev = 0; + ef->gdb.l_next = 0; + + r_debug.r_map = &ef->gdb; + r_debug.r_brk = r_debug_state; + r_debug.r_state = RT_CONSISTENT; + + r_debug_state(NULL, NULL); /* say hello to gdb! */ #endif - } #endif } |