smbwrapper on SVR4

David Collier-Brown David.Collier-Brown at canada.sun.com
Fri Aug 4 18:11:33 GMT 2000


Seth Mos wrote:
> I've been poking around the code and following the steps in
> smbwrapper/PORTING file and I am stuck at Step2.
> btw. The shared library flag for SVR4 is "cc -G" and the PIC flag is "cc
> -KPIC".

	That's correct on Sun Solaris, which is System V.
	Specifically, for foo.so.1, I say

	cc -KPIC -c *.c
	cc -G -o libfoo.so.1 -ldl *.o

	Linux is different (and glibc2 is broken!):
	gcc -fPIC *.c
	gcc -shared -WI,-soname,libnfoo.so.1 -o libfoo.so.1 *.o


	Once it's compiled, you go
	LD_PRELOAD=libfoo.so.1 program_under_test

--dave
-- 
David Collier-Brown,  | Always do right. This will gratify some people
185 Ellerslie Ave.,   | and astonish the rest.        -- Mark Twain
Willowdale, Ontario   | //www.oreilly.com/catalog/samba/author.html
Work: (905) 415-2849 Home: (416) 223-8968 Email: davecb at canada.sun.com




More information about the samba-technical mailing list