[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

2503.0. "cxx -shared doesn't work in DEC C++/Alpha/OSF T5.0-3" by CAIMAN::JOHNSTON () Thu Mar 30 1995 08:13

T.RTitleUserPersonal
Name
DateLines
2503.1Thanks for your report.16.31.32.59::KAOThu Mar 30 1995 16:495
2503.2cc problemDECCXL::MITCHELLThu Mar 30 1995 17:415
2503.3Creating shared librariesAUSSIE::DAYANDany Dayan, CSS Eng. Sydney, DTN 730 6419, SNA-2Mon May 01 1995 03:3740
2503.4need to call ld directlyDECC::SEIGELMon May 01 1995 12:308
2503.5Problem with build sharable image on OSFCADSYS::VICTORWed May 03 1995 18:5244
2503.6DECCXX::KIMMELWed May 03 1995 19:3110
2503.7Problems creating Shareand C++ALFAXP::KENDRIXJohn Kendrix - DTN: 343-1739Fri Oct 06 1995 20:4715
2503.8DECCXX::KIMMELMon Oct 09 1995 10:4711
2503.9But should it work?ALFAXP::KENDRIXJohn Kendrix - DTN: 343-1739Wed Oct 11 1995 15:038
2503.10No known template restriction; an exampleDECCXX::AMARTINAlan H. MartinWed Oct 11 1995 16:3898
2503.11Thanks AlanALFAXP::KENDRIXJohn Kendrix - DTN: 343-1739Wed Oct 11 1995 17:100
2503.12C++ Shared Objects Cause dlopen() seg faultLORENZ::ROSEThu May 09 1996 22:18103
2503.13Please read the release notesDECCXX::AMARTINAlan H. MartinFri May 10 1996 01:5514
2503.14DECCXX::AMARTINAlan H. MartinThu Nov 14 1996 20:08147
2503.15cxx doesn't pass -hidden and -non-hidden flagsRDGENG::READINGS_RRichard ReadingsThu Jan 23 1997 10:597
2503.16use -WlDECC::SEIGELThu Jan 23 1997 11:244
2503.17Parameters jumbledRDGENG::READINGS_RRichard ReadingsFri Jan 24 1997 11:4516
> try using the cxx -Wl switch to pass stuff to ld.  For example: -Wl,-hidden
> will pass -hidden to ld.

I'm trying to hide symbols in dso.o, but -hidden and -non_hidden are separated from
dso.o...

# cxx -shared -o dso.so -Wl,-hidden dso.o -Wl,-non_hidden -v

generates...

# /usr/lib/cmplrs/cc/ld -o dso.so -hidden -non_hidden -g0 -O1 -shared
/usr/lib/cmplrs/cxx/_main.o dso.o -lcxxstd -lcxx -lexc -lc

Is there any way to keep them together?

Richard
2503.18DECC::SEIGELFri Jan 24 1997 12:506
Try this: -Wl,-hidden,dso.o

Please see the C++ man page for more information about how to pass switches
using -W.

Harold
2503.19cxx fooledRDGENG::READINGS_RRichard ReadingsTue Jan 28 1997 06:248
Re .18

>Try this: -Wl,-hidden,dso.o

Unfortunately cxx then thinks it has no objects to process so returns 
immediately. I've checked -Wl on the man page but that doesn't help.

Richard
2503.20Hack time: generate a .o file from an empty .cxx file and give that to cxxWIDTH::MDAVISMark Davis - compiler maniacTue Jan 28 1997 14:0419
tagged 422% touch null.cxx
tagged 423% ll null.cxx
-rw-rw-r--   1 mdavis   system         0 Jan 28 11:03 null.cxx
tagged 424% cxx -c null.cxx
tagged 425% ll null.o
-rw-rw-r--   1 mdavis   system       400 Jan 28 11:03 null.o

tagged 427% cxx -v -o hello.so -shared -Wl,-hidden,hello.o,-non_hidden null.o
...
/usr/lib/cmplrs/cc/ld -o hello.so -hidden hello.o -non_hidden -g0 -O1 -shared \
     /usr/lib/cmplrs/cxx/_main.o null.o -lcxxstd -lcxx -lexc -lc 


NB: I first tried feeding /dev/null to cxx, but the linker was unhappy - it 
wanted a COFF format file.  That's why I compiled the empty file to generate
a COFF file with nothing interesting in it.

Mark Davis
c/c++ team