2005-10-29 20:27:43 +04:00
|
|
|
SubDir HAIKU_TOP src system runtime_loader ;
|
2005-03-21 19:15:33 +03:00
|
|
|
|
2005-07-17 01:07:17 +04:00
|
|
|
UsePrivateHeaders runtime_loader ;
|
2005-11-27 16:31:50 +03:00
|
|
|
UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ;
|
2005-07-17 01:07:17 +04:00
|
|
|
|
2005-11-27 16:31:50 +03:00
|
|
|
# Don't let gcc inject built-in function code. This will cause dependencies
|
|
|
|
# to libroot, which we don't link against.
|
|
|
|
SubDirCcFlags -fno-builtin ;
|
2006-05-18 01:40:29 +04:00
|
|
|
SubDirC++Flags -fno-builtin -fno-exceptions ;
|
2005-11-27 03:27:19 +03:00
|
|
|
|
2007-06-01 22:09:32 +04:00
|
|
|
# default to BeOS style symbol resolution
|
2007-07-27 06:32:19 +04:00
|
|
|
DEFINES += BEOS_STYLE_SYMBOLS_RESOLUTION
|
2007-07-30 01:36:49 +04:00
|
|
|
KMESSAGE_CONTAINER_ONLY
|
2007-07-27 06:32:19 +04:00
|
|
|
_LOADER_MODE
|
|
|
|
;
|
2007-06-01 22:09:32 +04:00
|
|
|
|
2007-10-02 19:22:13 +04:00
|
|
|
AddResources runtime_loader : runtime_loader.rdef ;
|
|
|
|
|
2006-05-31 19:59:42 +04:00
|
|
|
# needed for "runtime_loader" only
|
2006-03-30 20:29:53 +04:00
|
|
|
StaticLibrary libruntime_loader.a :
|
2005-11-27 16:31:50 +03:00
|
|
|
kernel_vsprintf.c
|
2007-07-27 06:32:19 +04:00
|
|
|
kernel_cpp.cpp
|
|
|
|
KMessage.cpp
|
2005-11-27 16:31:50 +03:00
|
|
|
:
|
2005-04-13 17:59:17 +04:00
|
|
|
<src!system!libroot!os>syscalls.o
|
|
|
|
<src!system!libroot!os>sem.o
|
2005-10-29 20:27:43 +04:00
|
|
|
<src!system!libroot!os!arch!$(TARGET_ARCH)>atomic.o
|
|
|
|
<src!system!libroot!os!arch!$(TARGET_ARCH)>thread.o
|
2005-03-21 19:15:33 +03:00
|
|
|
|
2005-04-13 17:59:17 +04:00
|
|
|
<src!system!libroot!posix>errno.o
|
2005-03-21 19:15:33 +03:00
|
|
|
|
2005-04-13 17:59:17 +04:00
|
|
|
<src!system!libroot!posix!glibc!ctype>ctype-info.o
|
|
|
|
<src!system!libroot!posix!glibc!locale>C-ctype.o
|
|
|
|
<src!system!libroot!posix!glibc!locale>C_name.o
|
|
|
|
<src!system!libroot!posix!unistd>open.o
|
2005-03-21 19:15:33 +03:00
|
|
|
|
2005-04-13 17:59:17 +04:00
|
|
|
<src!system!libroot!posix!string>memchr.o
|
|
|
|
<src!system!libroot!posix!string>memcmp.o
|
|
|
|
<src!system!libroot!posix!string>memcpy.o
|
|
|
|
<src!system!libroot!posix!string>memmove.o
|
|
|
|
<src!system!libroot!posix!string>memset.o
|
|
|
|
<src!system!libroot!posix!string>strcasecmp.o
|
|
|
|
<src!system!libroot!posix!string>strcat.o
|
|
|
|
<src!system!libroot!posix!string>strchr.o
|
|
|
|
<src!system!libroot!posix!string>strcmp.o
|
|
|
|
<src!system!libroot!posix!string>strcpy.o
|
|
|
|
<src!system!libroot!posix!string>strcspn.o
|
|
|
|
<src!system!libroot!posix!string>strdup.o
|
|
|
|
<src!system!libroot!posix!string>strerror.o
|
|
|
|
<src!system!libroot!posix!string>strlcat.o
|
|
|
|
<src!system!libroot!posix!string>strlcpy.o
|
2006-03-17 04:18:20 +03:00
|
|
|
<src!system!kernel!lib>strlen.o
|
2005-04-13 17:59:17 +04:00
|
|
|
<src!system!libroot!posix!string>strncmp.o
|
|
|
|
<src!system!libroot!posix!string>strnlen.o
|
|
|
|
<src!system!libroot!posix!string>strpbrk.o
|
|
|
|
<src!system!libroot!posix!string>strrchr.o
|
|
|
|
<src!system!libroot!posix!string>strspn.o
|
|
|
|
<src!system!libroot!posix!string>strstr.o
|
2007-04-16 10:17:14 +04:00
|
|
|
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)>arch_string.o
|
2005-11-27 16:31:50 +03:00
|
|
|
|
|
|
|
[ FGristFiles kernel_vsprintf.o ]
|
2005-11-27 03:27:19 +03:00
|
|
|
;
|
2005-03-21 19:15:33 +03:00
|
|
|
|
2007-07-27 06:32:19 +04:00
|
|
|
SEARCH on [ FGristFiles kernel_cpp.cpp ]
|
|
|
|
= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
|
2005-11-27 16:31:50 +03:00
|
|
|
SEARCH on [ FGristFiles kernel_vsprintf.c ]
|
|
|
|
= [ FDirName $(HAIKU_TOP) src system kernel lib ] ;
|
2007-07-27 06:32:19 +04:00
|
|
|
SEARCH on [ FGristFiles KMessage.cpp ]
|
|
|
|
= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
|
2005-11-27 16:31:50 +03:00
|
|
|
|
2006-01-06 06:48:11 +03:00
|
|
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) arch $(TARGET_ARCH) ] ;
|
|
|
|
|
2005-11-27 16:31:50 +03:00
|
|
|
Objects
|
2006-03-30 20:29:53 +04:00
|
|
|
runtime_loader.c
|
2007-06-01 10:46:57 +04:00
|
|
|
elf.cpp
|
2006-03-30 20:29:53 +04:00
|
|
|
export.c
|
2006-10-11 20:02:43 +04:00
|
|
|
heap.cpp
|
2006-05-09 03:50:09 +04:00
|
|
|
utility.cpp
|
2006-01-06 06:48:11 +03:00
|
|
|
arch_relocate.c
|
2005-11-27 16:31:50 +03:00
|
|
|
;
|
|
|
|
|
2006-03-30 22:08:51 +04:00
|
|
|
Ld runtime_loader :
|
While investigating how our deals with doubled shared libs, I found two
issues:
* Our glue code was broken after all - it allowed Haiku apps to start under
BeOS (and vice versa), but the initialization/termination functions were
called with an invalid image ID - on *both* sides! As it turns out, the
Be glue code did *something* with %ebx, but certainly didn't put the image
ID in there, but just passed it on the stack, as we did before (just in
the wrong order...). Therefore, the arch_call_init_term stuff is not
necessary.
* When unloading add-ons, their termination functions were never called, as
the image (for get_image_symbol()) was already made inaccessible, and
therefore the symbol couldn't be found.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-27 02:09:13 +04:00
|
|
|
[ FGristFiles runtime_loader.o elf.o export.o heap.o utility.o arch_relocate.o ]
|
2006-03-30 20:29:53 +04:00
|
|
|
libruntime_loader.a
|
2005-11-27 16:31:50 +03:00
|
|
|
$(TARGET_GCC_LIBGCC)
|
2006-03-30 22:10:59 +04:00
|
|
|
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/runtime_loader.ld
|
2005-11-27 03:27:19 +03:00
|
|
|
;
|