From: ivmai Date: Sat, 14 Aug 2010 09:28:38 +0000 (+0000) Subject: 2010-08-14 Ivan Maidanski X-Git-Tag: gc7_2alpha5-20110107~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24a998358610e865d9d98f8fff83dc7330a1dd18;p=gc 2010-08-14 Ivan Maidanski * extra/threadlibs.c (main): Remove --wrap for "read" (since not wrapped anymore). * doc/README.linux (GC_USE_LD_WRAP): Ditto. * os_dep.c (__wrap_read): Ditto (in the comment). --- diff --git a/ChangeLog b/ChangeLog index 9a558a93..c6e11189 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-08-14 Ivan Maidanski + * extra/threadlibs.c (main): Remove --wrap for "read" (since not + wrapped anymore). + * doc/README.linux (GC_USE_LD_WRAP): Ditto. + * os_dep.c (__wrap_read): Ditto (in the comment). + 2010-08-14 Ivan Maidanski (with help from Hans Boehm) * include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the diff --git a/doc/README.linux b/doc/README.linux index e462e711..dc0fa543 100644 --- a/doc/README.linux +++ b/doc/README.linux @@ -37,14 +37,14 @@ To use threads, you need to abide by the following requirements: 3b) A new alternative to (3a) is to build the collector and compile GC clients with -DGC_USE_LD_WRAP, and to link the final program with - (for ld) --wrap read --wrap dlopen --wrap pthread_create \ + (for ld) --wrap dlopen --wrap pthread_create \ --wrap pthread_join --wrap pthread_detach \ --wrap pthread_sigmask --wrap pthread_exit --wrap pthread_cancel - (for gcc) -Wl,--wrap -Wl,read -Wl,--wrap -Wl,dlopen -Wl,--wrap \ - -Wl,pthread_create -Wl,--wrap -Wl,pthread_join -Wl,--wrap \ - -Wl,pthread_detach -Wl,--wrap -Wl,pthread_sigmask \ - -Wl,--wrap -Wl,pthread_exit -Wl,--wrap -Wl,pthread_cancel + (for gcc) -Wl,--wrap -Wl,dlopen -Wl,--wrap -Wl,pthread_create \ + -Wl,--wrap -Wl,pthread_join -Wl,--wrap -Wl,pthread_detach \ + -Wl,--wrap -Wl,pthread_sigmask -Wl,--wrap -Wl,pthread_exit \ + -Wl,--wrap -Wl,pthread_cancel In any case, _REENTRANT should be defined during compilation. diff --git a/extra/threadlibs.c b/extra/threadlibs.c index 5184ef88..aaf43e40 100644 --- a/extra/threadlibs.c +++ b/extra/threadlibs.c @@ -23,7 +23,7 @@ int main(void) { # if defined(GC_USE_LD_WRAP) - printf("-Wl,--wrap -Wl,read -Wl,--wrap -Wl,dlopen " + printf("-Wl,--wrap -Wl,dlopen " "-Wl,--wrap -Wl,pthread_create -Wl,--wrap -Wl,pthread_join " "-Wl,--wrap -Wl,pthread_detach -Wl,--wrap -Wl,pthread_sigmask " "-Wl,--wrap -Wl,pthread_exit -Wl,--wrap -Wl,pthread_cancel\n"); diff --git a/os_dep.c b/os_dep.c index e7bb4a28..1a0f794f 100644 --- a/os_dep.c +++ b/os_dep.c @@ -3489,8 +3489,6 @@ ssize_t read(int fd, void *buf, size_t nbyte) #if defined(GC_USE_LD_WRAP) && !defined(THREADS) /* We use the GNU ld call wrapping facility. */ - /* This requires that the linker be invoked with "--wrap read". */ - /* This can be done by passing -Wl,"--wrap read" to gcc. */ /* I'm not sure that this actually wraps whatever version of read */ /* is called by stdio. That code also mentions __read. */ # include