* No longer tries to start an application that doesn't export an entry point != NULL.
This fixes bug #360. * Also removed no longer necessary undefining of _KERNEL_MODE, as we're now built correctly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16930 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4192c21428
commit
87a9cb2d70
@ -8,11 +8,6 @@
|
||||
*/
|
||||
|
||||
|
||||
// ToDo: this should not really be built with the kernel build rules...
|
||||
#ifdef _KERNEL_MODE
|
||||
# undef _KERNEL_MODE
|
||||
#endif
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <elf32.h>
|
||||
@ -970,7 +965,9 @@ load_container(char const *name, image_type type, const char *rpath, image_t **_
|
||||
goto err3;
|
||||
}
|
||||
|
||||
image->entry_point = eheader.e_entry + image->regions[0].delta;
|
||||
if (eheader.e_entry != NULL)
|
||||
image->entry_point = eheader.e_entry + image->regions[0].delta;
|
||||
|
||||
image->type = type;
|
||||
register_image(image, fd, path);
|
||||
|
||||
@ -1202,6 +1199,11 @@ load_program(char const *path, void **_entry)
|
||||
remap_images();
|
||||
// ToDo: once setup_system_time() is fixed, move this one line higher!
|
||||
|
||||
if (sProgramImage->entry_point == NULL) {
|
||||
status = B_NOT_AN_EXECUTABLE;
|
||||
goto err;
|
||||
}
|
||||
|
||||
*_entry = (void *)(sProgramImage->entry_point);
|
||||
|
||||
rld_unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user