Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!EU.net!main.Germany.EU.net!Germany.EU.net!Dortmund.Germany.EU.net!interface-business.de!usenet From: j@ida.interface-business.de (J Wunsch) Newsgroups: comp.unix.solaris,comp.unix.bsd.misc Subject: Re: Solaris 2.6 Date: 27 Nov 1996 13:57:45 GMT Organization: interface business GmbH, Dresden Lines: 99 Distribution: inet Message-ID: <57hhcp$kp9@innocence.interface-business.de> References: <32986299.AC7@mail.esrin.esa.it> <57djlg$bks@agate.berkeley.edu> <57dkbq$bsr@panix2.panix.com> <casper.329abb76@mail.fwi.uva.nl> <57ej3a$7ij@panix2.panix.com> <casper.329ae8f2@mail.fwi.uva.nl> Reply-To: joerg_wunsch@interface-business.de (Joerg Wunsch) NNTP-Posting-Host: ida.interface-business.de X-Newsreader: knews 0.9.6 X-Phone: +49-351-31809-14 X-Fax: +49-351-3361187 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Xref: euryale.cc.adfa.oz.au comp.unix.solaris:90607 comp.unix.bsd.misc:1607 casper@fwi.uva.nl (Casper H.S. Dik) wrote: > I know that free-unixes don't really care that much about binary > compatibility (you should only run applications you ahve source for, > right?) I'm afraid i still run a bunch of pre-4.4BSD programs myself, simple since i never came around to recompile them, and since the system you're going to tell us that it can't work at all apparently works well enough to not force me recompiling them. :-] (How else would it come that all the lib*.so.1.1 libs are still around here? I must have had a need for them, and they are the FreeBSD 1.1.5.1 versions.) > The dynamic libraries will need to retain the old "open" entry point for > use by old applications. Isn't open a syscall? No need for the libs to bother with. The syscall vector of the kernel will handle this for you. > - vendors shipping archive/dynamic libraries for users > to link against (All major DB vendors, for one) > - libraries created/maintained locally > > You can't solve that without keeping the old symbols and sizes > available. > > You can say, well just bump the libc.so. revision number? Yes. It's funny that you're arguing a hypothetical case, while people who've been gone through all this already tell you _that it simply works for us_, ain't it? Anyway: j@ida 608% cat foo.c #include <unistd.h> #include <fcntl.h> char s[] = "Hello\nworld!\n"; int main(void) { int fd; off_t o; ssize_t x; char b[200]; if ((fd = open("foobar", O_RDWR|O_CREAT, 0666)) == -1) return 1; write(fd, s, sizeof s - 1); lseek(fd, 6, SEEK_SET); x = read(fd, b, 200); write(1, b, x); return 0; } j@ida 609% cc -c foo.c j@ida 610% ld -e start -dc -dp -o foo /usr/lib/crt0.o foo.o -lc /usr/lib/libgcc.a j@ida 611% ldd foo foo: -lc.3 => /usr/lib/libc.so.3.0 (0x801c000) j@ida 612% rm foobar j@ida 613% ./foo world! j@ida 614% ld -e start -dc -dp -o foo /usr/lib/crt0.o foo.o /usr/lib/libc.so.1.1 /usr/lib/libgcc.a j@ida 615% ldd foo foo: /usr/lib/libc.so.1.1 (0x801b000) j@ida 616% rm foobar j@ida 617% ./foo world! With either the new or the old shared lib, it works. Libraries must match their header files, of course. If a library is supposed to be self-contained (as it is apparently the case you're worrying most about here), its header file must, of course, also be self-contained. > Well, it wouldn't work; you'd get your users into a complex mess > requiring them to link either 32bit file only objects or > 64bit file only objects. Since "open/lseek/stat" etc are already > taken the "open64" etc calls are used (invisibly) as entry points > for 64bit compiled objects. It's indeed a mess, sigh. > Tell me, can you take 4.3 BSD .o files and link them to a 4.4 BSD program> Does linking a 4.4BSD .o file against a 4.3BSD library also count? Then see above. -- J"org Wunsch Unix support engineer joerg_wunsch@interface-business.de http://www.interface-business.de/~j