The boot loader does now set the names of the images it loads to the
full paths. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27665 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6aa2c9ecf1
commit
b34e395eaf
@ -126,9 +126,9 @@ load_elf_symbol_table(int fd, preloaded_image *image)
|
|||||||
status = B_ERROR;
|
status = B_ERROR;
|
||||||
goto error1;
|
goto error1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// find symbol table in section headers
|
// find symbol table in section headers
|
||||||
|
|
||||||
for (int32 i = 0; i < elfHeader.e_shnum; i++) {
|
for (int32 i = 0; i < elfHeader.e_shnum; i++) {
|
||||||
if (sectionHeaders[i].sh_type == SHT_SYMTAB) {
|
if (sectionHeaders[i].sh_type == SHT_SYMTAB) {
|
||||||
stringHeader = §ionHeaders[sectionHeaders[i].sh_link];
|
stringHeader = §ionHeaders[sectionHeaders[i].sh_link];
|
||||||
@ -423,7 +423,11 @@ elf_load_image(Directory *directory, const char *path)
|
|||||||
|
|
||||||
status_t status = elf_load_image(fd, image);
|
status_t status = elf_load_image(fd, image);
|
||||||
if (status == B_OK) {
|
if (status == B_OK) {
|
||||||
image->name = kernel_args_strdup(path);
|
char tmpPath[B_PATH_NAME_LENGTH];
|
||||||
|
if (directory->GetPath(path, tmpPath, sizeof(tmpPath)) == B_OK)
|
||||||
|
image->name = kernel_args_strdup(tmpPath);
|
||||||
|
else
|
||||||
|
image->name = kernel_args_strdup(path);
|
||||||
image->inode = stat.st_ino;
|
image->inode = stat.st_ino;
|
||||||
|
|
||||||
// insert to kernel args
|
// insert to kernel args
|
||||||
|
@ -51,7 +51,7 @@ is_bootable(Directory *volume)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
load_kernel(stage2_args *args, Directory *volume)
|
load_kernel(stage2_args *args, Directory *volume)
|
||||||
{
|
{
|
||||||
int fd = open_from(volume, KERNEL_PATH, O_RDONLY);
|
int fd = open_from(volume, KERNEL_PATH, O_RDONLY);
|
||||||
@ -75,6 +75,12 @@ load_kernel(stage2_args *args, Directory *volume)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char tmpPath[B_PATH_NAME_LENGTH];
|
||||||
|
if (volume->GetPath(KERNEL_PATH, tmpPath, sizeof(tmpPath)) == B_OK)
|
||||||
|
gKernelArgs.kernel_image.name = kernel_args_strdup(tmpPath);
|
||||||
|
else
|
||||||
|
gKernelArgs.kernel_image.name = kernel_args_strdup("kernel");
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +168,7 @@ load_module(Directory *volume, const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
load_modules(stage2_args *args, Directory *volume)
|
load_modules(stage2_args *args, Directory *volume)
|
||||||
{
|
{
|
||||||
int32 failed = 0;
|
int32 failed = 0;
|
||||||
|
@ -4052,8 +4052,6 @@ vm_init(kernel_args *args)
|
|||||||
|
|
||||||
allocate_kernel_args(args);
|
allocate_kernel_args(args);
|
||||||
|
|
||||||
args->kernel_image.name = "kernel";
|
|
||||||
// the lazy boot loader currently doesn't set the kernel's name...
|
|
||||||
create_preloaded_image_areas(&args->kernel_image);
|
create_preloaded_image_areas(&args->kernel_image);
|
||||||
|
|
||||||
// allocate areas for preloaded images
|
// allocate areas for preloaded images
|
||||||
|
Loading…
Reference in New Issue
Block a user