+2010-08-14 Ivan Maidanski <ivmai@mail.ru>
+ * 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 <ivmai@mail.ru> (with help from Hans Boehm)
* include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
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.
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");
#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 <unistd.h>