From 0dabb2c8a032abf0975eac9d91c3c58cc3bc4ae3 Mon Sep 17 00:00:00 2001 From: David Xu Date: Sat, 21 Aug 2004 11:49:19 +0000 Subject: [PATCH] Pull debug symbols in for statically linked binary. Reviewed by: desichen --- lib/libkse/thread/thr_init.c | 4 ++++ lib/libpthread/thread/thr_init.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/libkse/thread/thr_init.c b/lib/libkse/thread/thr_init.c index baee1bbd89c3..719195f8cc61 100644 --- a/lib/libkse/thread/thr_init.c +++ b/lib/libkse/thread/thr_init.c @@ -73,6 +73,7 @@ int __pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *); int __pthread_mutex_lock(pthread_mutex_t *); int __pthread_mutex_trylock(pthread_mutex_t *); void _thread_init_hack(void); +extern int _thread_state_running; static void init_private(void); static void init_main_thread(struct pthread *thread); @@ -224,6 +225,9 @@ _libpthread_init(struct pthread *curthread) if ((references[0] == NULL) || (libgcc_references[0] == NULL)) PANIC("Failed loading mandatory references in _thread_init"); + /* Pull debug symbols in for static binary */ + _thread_state_running = PS_RUNNING; + /* * Check the size of the jump table to make sure it is preset * with the correct number of entries. diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c index baee1bbd89c3..719195f8cc61 100644 --- a/lib/libpthread/thread/thr_init.c +++ b/lib/libpthread/thread/thr_init.c @@ -73,6 +73,7 @@ int __pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *); int __pthread_mutex_lock(pthread_mutex_t *); int __pthread_mutex_trylock(pthread_mutex_t *); void _thread_init_hack(void); +extern int _thread_state_running; static void init_private(void); static void init_main_thread(struct pthread *thread); @@ -224,6 +225,9 @@ _libpthread_init(struct pthread *curthread) if ((references[0] == NULL) || (libgcc_references[0] == NULL)) PANIC("Failed loading mandatory references in _thread_init"); + /* Pull debug symbols in for static binary */ + _thread_state_running = PS_RUNNING; + /* * Check the size of the jump table to make sure it is preset * with the correct number of entries.