[kaffe] CVS kaffe (alex): DROPS/L4 specific shared library wrapper is obsolete.

Kaffe CVS cvs-commits at kaffe.org
Sat Mar 25 07:13:54 PST 2006


PatchSet 7172 
Date: 2006/03/25 15:00:21
Author: alex
Branch: HEAD
Tag: (none) 
Log:
DROPS/L4 specific shared library wrapper is obsolete.
Instead usage of new ldso package of DROPS, which is now
detected by configure and used by libltdl.

Members: 
	ChangeLog:1.4690->1.4691 
	FAQ/FAQ.drops:1.1->1.2 
	kaffe/kaffevm/slib.h:1.10->1.11 
	kaffe/kaffevm/systems/drops-l4threads/jthread.h:1.2->1.3 
	kaffe/kaffevm/systems/drops-l4threads/l4_loader.h:1.1->1.2(DEAD) 
	kaffe/kaffevm/systems/drops-l4threads/l4thread.c:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4690 kaffe/ChangeLog:1.4691
--- kaffe/ChangeLog:1.4690	Sat Mar 25 13:16:11 2006
+++ kaffe/ChangeLog	Sat Mar 25 15:00:21 2006
@@ -1,3 +1,17 @@
+2006-03-25 Alexander Boettcher  <alex at kaffe.org>
+	
+	DROPS/L4 specific shared library wrapper is obsolete.
+	Instead usage of new ldso package of DROPS, which is now
+	detected by configure and used by libltdl.
+
+	* kaffe/kaffevm/slib.h: remove obsolete DROPS/L4 specific include
+	* kaffe/kaffevm/systems/drops-l4threads/jthread.h,
+	  kaffe/kaffevm/systems/drops-l4threads/l4thread.c:
+	  adapt to data type changes in l4_thread_ex_regs function
+	* kaffe/kaffevm/systems/drops-l4threads/l4_loader.h:
+	  remove obsolete
+	* FAQ/FAQ.drops: Update information because of loader changes
+
 2006-03-25  Dalibor Topic  <robilad at kaffe.org>
 
 	* FAQ/FAQ.awt: Added information on runtime switches to use
Index: kaffe/FAQ/FAQ.drops
diff -u kaffe/FAQ/FAQ.drops:1.1 kaffe/FAQ/FAQ.drops:1.2
--- kaffe/FAQ/FAQ.drops:1.1	Tue Dec 20 21:54:25 2005
+++ kaffe/FAQ/FAQ.drops	Sat Mar 25 15:00:27 2006
@@ -2,7 +2,15 @@
 ==========================
 
 author: Alexander Boettcher <alex at kaffe.org>
-date: 20.12.2005
+date: 25.03.2006
+
+Changes
+-------
+20.12.2005
+ - initial checkin
+25.03.2006
+ - DROPS/L4 specific shared library wrapper removed
+ - usage of ldso packet in order to support shared libraries
 
 Notes about the DROPS port
 --------------------------
@@ -10,7 +18,7 @@
 which requires the L4Env [2] threading packet. Additionally, it uses the
 semaphore implementation of L4Env for the KSem interface of Kaffe. Further,
 the DROPS Kaffe port requires the DietLibC port, which does not provide
-the full LibC functionality (state 2005). Therefore, you will find a lot of
+the full LibC functionality (state 2006). Therefore, you will find a lot of
 unimplemented functions in the syscall interface of Kaffe, because they are
 not enabled or supported in the DROPS port of the DietLibC.
  
@@ -84,34 +92,28 @@
 
 TARGET   = kaffevm
 SYSTEMS  = x86-l4v2
-
-#INSTALL_TARGET =
+MODE     = l4env_base
 
 include $(L4DIR)/mk/prog.mk
 
-L4DIR_ABS        =$(shell cd $(L4DIR);pwd)
-
 #
 # Kaffe configure parameters
 # 
-# adapt KAFFE_KAFFEH, KAFFE_SRC to your environment !
+# adapt KAFFE_KAFFEH, KAFFE_SRC to your enviornment !
 #
 KAFFE_KAFFEH	 = $(shell cd $(PKGDIR);pwd)/native/kaffe/kaffeh/kaffeh
 KAFFE_SRC        = $(PKGDIR)/contrib
-#
-#
-#
 
-KAFFE_L4_OPTION  = -DARCH_$(ARCH) \
-                   -DDROPS_SHARED_LIBRARIES
+L4DIR_ABS        =$(shell cd $(L4DIR);pwd)
+KAFFE_L4_OPTION  = -DARCH_$(ARCH) 
 
-KAFFE_CC        = $(CC_x86) -nostdinc -nostdlib -DL4API_l4v2 $(KAFFE_L4_OPTION) -I$(L4DIR_ABS)/include/$(ARCH)/$(L4API) -I$(L4DIR_ABS)/include/$(ARCH) -I$(L4DIR_ABS)/include -I$(L4DIR_ABS)/include/l4/gmp -I$(L4DIR_ABS)/include/dietlibc -I$(GCCDIR_x86)/include -I$(DROPS_STDDIR)/include/$(ARCH)/$(L4API) -I$(DROPS_STDDIR)/include/$(ARCH) -I$(DROPS_STDDIR)/include -I$(L4DIR_ABS)/include/dietlibc -DSIZE_MAX=4294967295U
+KAFFE_CC        = $(CC_x86) -nostdinc -nostdlib -DL4API_l4v2 $(KAFFE_L4_OPTION) -I$(L4DIR_ABS)/include/$(ARCH)/$(L4API) -I$(L4DIR_ABS)/include/$(ARCH) -I$(L4DIR_ABS)/include -I$(L4DIR_ABS)/include/l4/gmp -I$(L4DIR_ABS)/include/dietlibc -I$(GCCDIR_x86)/include -I$(DROPS_STDDIR)/include/$(ARCH)/$(L4API) -I$(DROPS_STDDIR)/include/$(ARCH) -I$(DROPS_STDDIR)/include -I$(L4DIR_ABS)/include/dietlibc -DSIZE_MAX=4294967295U -I/$(L4DIR_ABS)/include/l4/zlib
 
 KAFFE_CXX       = $(KAFFE_CC)
 
-KAFFE_LDFLAGS   = -nostdlib -L$(L4DIR_ABS)/lib/$(ARCH)_$(CPU)/$(L4API) -L$(L4DIR_ABS)/lib/$(ARCH)_$(CPU) -Ttext=0x0154f000 -Wl,-gc-sections
+KAFFE_LDFLAGS   = -nostdlib -L$(L4DIR_ABS)/lib/$(ARCH)_$(CPU)/$(L4API) -L$(L4DIR_ABS)/lib/$(ARCH)_$(CPU) -Wl,--export-dynamic,--dynamic-linker=libld-l4.s.so -Wl,--rpath-link,$(L4DIR_ABS)/lib/$(ARCH)_$(CPU)/$(L4API)
 
-KAFFE_LIBS    = -T$(L4DIR_ABS)/lib/$(ARCH)_$(CPU)/main_stat.ld -lcrt0.o -lloader.s -ldiet_be_l4_start_stop -lc_be_io.o -lc_be_mmap -lc_be_mmap_util -lc_be_socket_io -lc_be_select -ldiet_c -lc_be_simple_mem -lc_be_mmap -lc_be_time -ll4util -lrtc -ll4env -lgcc -ldiet_be_simple_sleep -ll4vfs_select -ll4vfs_select_listener-server -ll4vfs_basic_name_server -ll4vfs_basic_io -ll4vfs_connection -ll4vfs_net_io -ll4vfs_name_server -ldiet_be_l4_start_stop -ll4vfs_common_io -lc_be_file-table
+KAFFE_LIBS = -nostdlib -Wl,-nostdlib -T$(L4DIR_ABS)/lib/$(ARCH)_$(CPU)/main_dyn.ld -Bdynamic -lloader.s -ldl.s -Bstatic -lcrt0.o -lc_be_io.o -lc_be_socket_io -lc_be_select -ldiet_c -u mmap_anon -lslab -lc_be_time -lrtc -lgcc -ldiet_be_simple_sleep -ll4vfs_select -ll4vfs_select_listener-server -ll4vfs_basic_name_server -ll4vfs_basic_io -ll4vfs_connection -ll4vfs_net_io -ll4vfs_name_server -ldiet_be_l4_start_stop -ll4vfs_common_io -lc_be_file-table
 
 kaffe_configure:
 	if [ ! -e ../build/config.ready ]; then \
@@ -125,20 +127,28 @@
 	        CC="$(KAFFE_CC)" \
         	CXX="$(KAFFE_CXX)" \
 	        $(KAFFE_SRC)/configure --build=i386-linux --host=i386-drops \
-                               --enable-pure-java-math --disable-sound --without-alsa --without-esd \
-                               --with-threads=drops-l4threads --with-engine=intrp \
-                               --disable-boehm-gc-configuration \
-                               --disable-nls --disable-gjdoc --disable-largefile \
-                               --disable-gtk-peer \
+                               --enable-pure-java-math \
+				--disable-sound \
+				--without-alsa \
+				--without-esd \
+				--with-threads=drops-l4threads \
+				--disable-boehm-gc-configuration \
+				--disable-nls \
+				--disable-gjdoc --disable-largefile \
+				--disable-gtk-peer \
+				--with-engine=intrp \
+				--disable-fastjar \
 		&& echo "ready" >config.ready; \
 	fi
 
 kaffevm: kaffe_configure
-	ln ../build/kaffe/kaffe/kaffe-bin kaffevm -sf
 	cd ../build \
-	&& make 
-	if [ ! -L ../build/libraries/javalib/rt.jar ]; then \
-		ln -s external/classpath/lib/glibj.zip ../build/libraries/javalib/rt.jar; \
+	&& make;
+	#ld -s ../build/kaffe/kaffe/kaffe-bin -o kaffevm
+	cp ../build/kaffe/kaffe/kaffe-bin kaffevm
+	if [ ! -e ../build/libraries/javalib/rt.jar ]; then \
+	  ln -s -f external/classpath/lib/glibj.zip \
+		../build/libraries/javalib/rt.jar; \
 	fi
 
 clean::
@@ -147,4 +157,4 @@
 cleanall::
 	rm build -rf
 
-.PHONY: kaffe_configure kaffevm
+.PHONY: clean cleanall kaffe_configure kaffevm
Index: kaffe/kaffe/kaffevm/slib.h
diff -u kaffe/kaffe/kaffevm/slib.h:1.10 kaffe/kaffe/kaffevm/slib.h:1.11
--- kaffe/kaffe/kaffevm/slib.h:1.10	Thu Dec  1 23:51:05 2005
+++ kaffe/kaffe/kaffevm/slib.h	Sat Mar 25 15:00:27 2006
@@ -14,13 +14,6 @@
 /* ------------------------------------------------------------------------ */
 
 /*
- * DROPS/L4Env loader shared library interface.
- */
-#if defined(DROPS_SHARED_LIBRARIES)
-   #include <l4_loader.h>
-#endif
-
-/*
  * MACH style shared library interface.
  */
 #if defined(HAVE_MACH_O_RLD_H)
Index: kaffe/kaffe/kaffevm/systems/drops-l4threads/jthread.h
diff -u kaffe/kaffe/kaffevm/systems/drops-l4threads/jthread.h:1.2 kaffe/kaffe/kaffevm/systems/drops-l4threads/jthread.h:1.3
--- kaffe/kaffe/kaffevm/systems/drops-l4threads/jthread.h:1.2	Wed Dec 28 23:42:12 2005
+++ kaffe/kaffe/kaffevm/systems/drops-l4threads/jthread.h	Sat Mar 25 15:00:28 2006
@@ -40,8 +40,8 @@
         struct _jthread * next; /* next live thread */
         struct _jthread * prev; /* prev live thread */
 	void   (*func)(void *); /* Start function */
-        unsigned int eip; 
-        unsigned int esp;
+        l4_umword_t eip; 
+        l4_umword_t esp;
         l4thread_t l4thread;    /* native thread id */
 	int interrupting;       /* FLAG, if thread is in interrupting state */
 #ifdef REALTIME_EXTENSION
===================================================================
Checking out kaffe/kaffe/kaffevm/systems/drops-l4threads/l4_loader.h
RCS:  /home/cvs/kaffe/kaffe/kaffe/kaffevm/systems/drops-l4threads/Attic/l4_loader.h,v
VERS: 1.1
***************
--- kaffe/kaffe/kaffevm/systems/drops-l4threads/l4_loader.h	Sat Mar 25 15:13:53 2006
+++ /dev/null	Sun Aug  4 19:57:58 2002
@@ -1,147 +0,0 @@
-/*
- * l4_loader.h
- * Support for shared libraries
- * 
- * Copyright (c) 2004, 2005
- *	TU Dresden, Operating System Group.  All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file.
- *
- * written by Alexander Boettcher <ab764283 at os.inf.tu-dresden.de>
- */
-
-#ifndef __l4_loader_h
-#define __l4_loader_h
-
-#if defined(DROPS_SHARED_LIBRARIES)
-  #include <l4/l4vfs/basic_name_server.h>
-  #include <l4/log/l4log.h> /* LOG */
-  #include <l4/util/util.h> /* for l4_sleep*/
-  #include <l4/sys/types.h>
-  #include <l4/l4vfs/name_server.h>
-
-  #include <stdio.h>
-  #include <l4/names/libnames.h>
-  #include <l4/loader/loader-client.h>
-  #include <l4/env/env.h>
-  #include <l4/loader/loader.h>
-
-
-  #define LIBRARYHANDLE                   void *
-
-  extern const struct {
- 		const char *name;
-		void * address;
-  }
-  lt_preloaded_symbols[];
-
-  envpage_t envpage;
-
-  static inline void *
-  KaffeLib_Load(const char *LIB){
-    LIBRARYHANDLE HAND = 0;
-    unsigned int error,len;							
-    CORBA_Environment _env = dice_default_environment;			
-    l4env_infopage_t *env;						
-    l4_threadid_t loader_id,fprov_id;				
-    char * lpath = getenv(LIBRARYPATH);                                 
-									
-    if (lpath != 0){
-      len = strlen(lpath);
-      if (memcmp(LIB,lpath,len)==0){
-        if (memcmp(LIB+len,"/libnative",10)==0)
-          HAND = (LIBRARYHANDLE) 1;
-        else if (memcmp(LIB+len,"/libjavaio.so",13)==0)
-          HAND = (LIBRARYHANDLE) 1;
-        else if (memcmp(LIB+len,"/libjavanio.so",14)==0)
-          HAND = (LIBRARYHANDLE) 1;
-        else if (memcmp(LIB+len,"/libnet",7)==0)
-          HAND = (LIBRARYHANDLE) 1;
-        else if (memcmp(LIB+len,"/libqtawt",9)==0)
-          HAND = (LIBRARYHANDLE) 1;
-        else if (memcmp(LIB+len,"/libjavalang",12)==0)
-          HAND = (LIBRARYHANDLE) 1;
-      }
-    }
-
-    if (HAND == NULL){
-     if (names_query_name("fprov_proxy_fs",&fprov_id)){
-      if (!names_waitfor_name("LOADER", &loader_id, 5000))
-       LOG_Error("Dynamic loader LOADER not found\n");
-      else
-       if ((error = l4loader_app_lib_open_call(&loader_id, LIB,	
-                                 &fprov_id, 0, &envpage, &_env))	
-                 || _env.major != CORBA_NO_EXCEPTION){			
-        LOG_Error("Loading lib failed (error %d, exc=%d.%d)\n",		
-                                error, _env.major, _env.repos_id);	
-       }else{								
-        env = (l4env_infopage_t*)envpage;					
-									
-        l4loader_attach_relocateable(env);				
- 									
-        if ((error = l4loader_app_lib_link_call(&loader_id, &envpage, &_env))	
-	      || _env.major != CORBA_NO_EXCEPTION){				
-          LOG_Error("Linking lib failed (error %d, exc=%d.%d)\n",		
-                          error, _env.major, _env.repos_id);		
-        }else HAND = (LIBRARYHANDLE) 1;
-       }
-     }
-    }
-    return HAND;
-  }
-
-  static inline void
-  KaffeLib_Unload(LIBRARYHANDLE handle UNUSED)
-  {
-  }
-
-  static inline void *
-  KaffeLib_GetSymbol(LIBRARYHANDLE handle UNUSED, const char *STUB)
-  {
-    void * FUNC = 0;
-    int z;                                                  
-    int error;					
-    l4_addr_t addr = 0;					
-    CORBA_Environment _env = dice_default_environment;			
-    l4_threadid_t loader_id;				
-
-    for (z = 0; lt_preloaded_symbols[z].name != 0; z++) {		
-      if (strcmp(lt_preloaded_symbols[z].name, STUB) == 0) {	
-        FUNC = (void *)lt_preloaded_symbols[z].address;	
-        break;                                  
-      } 
-    }  
-    if (FUNC==0){							
-      if (!names_waitfor_name("LOADER", &loader_id, 5000)){	
-        LOG_Error("Dynamic loader LOADER not found\n");	
-      }else{					
-        if ((error = l4loader_app_lib_dsym_call(&loader_id, STUB,
-                                    &envpage, &addr, &_env))	
-		      || _env.major != CORBA_NO_EXCEPTION){
-	//		LOG("%s not found",STUB);
-        }else
-        {
-          FUNC = (void *)addr;
-        }
-      }
-    }
-
-    return FUNC;
-  }  
-
-  static inline const char *
-  KaffeLib_GetError(void)
-  {
-    return "No specific error support";
-  }
-
-  static inline void
-  KaffeLib_Init(void)
-  {
-  }
-
-#endif
-
-#endif /* __l4_loader_h */
-
Index: kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c
diff -u kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c:1.1 kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c:1.2
--- kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c:1.1	Fri Nov 25 13:41:28 2005
+++ kaffe/kaffe/kaffevm/systems/drops-l4threads/l4thread.c	Sat Mar 25 15:00:28 2006
@@ -98,7 +98,7 @@
 void 
 jthread_suspendall(void)
 {
- unsigned int  old_eflags;
+ l4_umword_t   old_eflags;
  l4_umword_t   dummy;
  l4_msgdope_t  result;
  l4_threadid_t src;
@@ -154,7 +154,7 @@
 jthread_unsuspendall(void)
 {
  volatile unsigned long int * ret_addr;
- unsigned int old_eflags,dummy;
+ l4_umword_t   old_eflags,dummy;
  l4_threadid_t preempter = L4_INVALID_ID;
  l4_threadid_t pager     = L4_INVALID_ID;
  l4thread_t    myself    = l4thread_myself();
@@ -200,7 +200,7 @@
 
 int jthread_extract_stack(jthread_t jtid, void **from, unsigned *len)
 {
-  unsigned int esp,eip,eflags;
+  l4_umword_t esp,eip,eflags;
   l4_addr_t low,high;
   l4_threadid_t pager     = L4_INVALID_ID;
   l4_threadid_t preempter = L4_INVALID_ID;



More information about the kaffe mailing list