Index: config_office/configure.in
===================================================================
RCS file: /cvs/tools/config_office/configure.in,v
retrieving revision 1.139
diff -u -p -u -r1.139 configure.in
--- config_office/configure.in	25 Oct 2005 11:23:57 -0000	1.139
+++ config_office/configure.in	18 Nov 2005 15:00:30 -0000
@@ -1056,6 +1113,24 @@ if test "$GCC" = "yes"; then
 fi
 AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
 
+if test "$GCC" = "yes"; then
+   AC_MSG_CHECKING( for -Bdirect linker support )
+   bdirect_ldflags_save=$LDFLAGS
+   LDFLAGS="$LDFLAGS -Wl,-Bdirect"
+   AC_LINK_IFELSE([AC_LANG_PROGRAM([
+   #include <stdio.h>
+   ],[
+    printf ("hello world\n");
+   ])], HAVE_LD_BDIRECT=TRUE, [])
+   if test "z$HAVE_LD_BDIRECT" = "zTRUE"; then
+     AC_MSG_RESULT( found )
+   else
+     AC_MSG_RESULT( not found )
+   fi
+   LDFLAGS=$bdirect_ldflags_save
+fi
+AC_SUBST(HAVE_LD_BDIRECT)
+
 dnl ===================================================================
 dnl Search all the common names for GNU make
 dnl ===================================================================


RCS file: /cvs/tools/config_office/set_soenv.in,v
retrieving revision 1.78
diff -u -p -u -r1.78 set_soenv.in
--- config_office/set_soenv.in	28 Oct 2005 11:59:53 -0000	1.78
+++ config_office/set_soenv.in	18 Nov 2005 15:00:31 -0000
@@ -1702,6 +1707,7 @@ ToFile( "JAVAHOME",          $JAVAHOME, 
 ToFile( "CC",                $CC,                "e" );
 ToFile( "HAVE_GCC_VISIBILITY_FEATURE",
 		"@HAVE_GCC_VISIBILITY_FEATURE@", "e" );
+ToFile( "HAVE_LD_BDIRECT",   "@HAVE_LD_BDIRECT@","e" );
 ToFile( "CXX",               $CXX,               "e" );
 ToFile( "USE_SYSTEM_STL",    "@USE_SYSTEM_STL@", "e" );
 ToFile( "ENABLE_SYMBOLS",    "@ENABLE_SYMBOLS@",    "e" );



Index: solenv/inc/unxlngi6.mk
===================================================================
RCS file: /cvs/tools/solenv/inc/unxlngi6.mk,v
retrieving revision 1.16
diff -u -p -u -r1.16 unxlngi6.mk
--- solenv/inc/unxlngi6.mk	5 Oct 2005 11:34:22 -0000	1.16
+++ solenv/inc/unxlngi6.mk	18 Nov 2005 15:03:14 -0000
@@ -145,6 +145,10 @@ LINKC*=$(CC)
 LINKFLAGSDEFS*=-Wl,-z,defs
 LINKFLAGSRUNPATH*=-Wl,-rpath,\''$$ORIGIN'\'
 LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGSRUNPATH)
+.IF "$(HAVE_LD_BDIRECT)"  == "TRUE"
+LINKFLAGS += -Wl,-Bdirect
+.ENDIF
+LINKFLAGS += -Wl,-zdynsort
 
 # linker flags for linking applications
 LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec

Index: icu/makefile.mk
===================================================================
RCS file: /cvs/external/icu/makefile.mk,v
retrieving revision 1.27
diff -u -p -u -r1.27 makefile.mk
--- icu/makefile.mk	7 Sep 2005 17:43:26 -0000	1.27
+++ icu/makefile.mk	29 Nov 2005 14:11:41 -0000
@@ -64,9 +64,14 @@ CXX:=$(COMPATH)$/bin$/CC
 icu_CFLAGS+=-O $(ARCH_FLAGS)
 icu_CXXFLAGS+=-O $(ARCH_FLAGS)
 
+.IF "$(HAVE_LD_BDIRECT)"  == "TRUE"
+LDFLAGSADD=-Wl,-Bdirect
+.ELSE
+LDFLAGSADD=
+.ENDIF
 CONFIGURE_DIR=source
 
-CONFIGURE_ACTION=sh -c 'CFLAGS="$(icu_CFLAGS)" CXXFLAGS="$(icu_CXXFLAGS)" LDFLAGS="$(icu_LDFLAGS)" ./configure --enable-layout --enable-static --enable-shared=yes --enable-64bit-libs=no'
+CONFIGURE_ACTION=sh -c 'CFLAGS="$(icu_CFLAGS)" CXXFLAGS="$(icu_CXXFLAGS)" LDFLAGS="$(icu_LDFLAGS) $(LDFLAGSADD)" ./configure --enable-layout --enable-static --enable-shared=yes --enable-64bit-libs=no'
 
 #CONFIGURE_FLAGS=--enable-layout --enable-static --enable-shared=yes --enable-64bit-libs=no
 CONFIGURE_FLAGS=


Index: stlport/makefile.mk
===================================================================
RCS file: /cvs/external/stlport/makefile.mk,v
retrieving revision 1.32
diff -u -p -u -r1.32 makefile.mk
--- stlport/makefile.mk	8 Sep 2005 07:48:02 -0000	1.32
+++ stlport/makefile.mk	29 Nov 2005 15:03:43 -0000
@@ -131,6 +131,10 @@ BUILD_FLAGS=-f vc7.mak
 	BUILD_FLAGS+= -j$(MAXPROCESS)
 .ENDIF
 
+.IF "$(HAVE_LD_BDIRECT)"  == "TRUE"
+CXX+= -Wl,-Bdirect
+.ENDIF
+
 .IF "$(COM)"=="C52"
 BUILD_ACTION=make
 .IF "$(CCNUMVER)">="00050005"
