From: Bela Lubkin <b...@sco.com> Subject: Re: 5.0.7 problems with libsocket.so.2 Date: 2 Feb 2005 06:29:38 -0500 Message-ID: <20050202112933.GT13175@sco.com> References: <1107277781.183887.211030@c13g2000cwb.googlegroups.com> Sagara wrote: > Recently I installed Maintenance Pack 3 on OpenServer 5.0.7. > > Now some of my programs have stopped working and return the following > when I try to run them: > > "dynamic linker: tethereal : UDK executable cannot load OpenServer > shared object: /usr/lib/libsocket.so.2" > > It's not just a single program, multiple ones are having this issue. I > tried uninstalling the Maintenance Pack to restore older copies of > libsocket.so.2 but it didn't help. > > Anyone run into this before or have any idea how I should start > tracking down/fixing this problem? Where did the affected binaries come from? Are they in fact UDK binaries (built with the UnixWare development system or with a GCC built for UnixWare)? I would guess they are OSR5 binaries which aren't properly marked as such. MP3 made some subtle changes to how OSR5 and UDK binaries are distinguished. As far as we know, the only binaries that would be affected are ELF binaries built with a few very old builds of GCC for OSR5 (I believe the affected GCC builds predate EGCS). There is a tool which may help: `elfmark`, /udk/usr/ccs/bin/elfmark. You can use this to change the dynamic linker's idea of what sort of binary it's looking at. For instance: # cp tethereal tethereal.test # /udk/usr/ccs/bin/elfmark -t osr5 tethereal.test # ./tethereal.test Test it on a copy, in case it doesn't help or even makes things worse. If it _does_ fix the problem, go ahead and `elfmark -t osr5` the real binaries you're having trouble with. Technical details: Starting with OpenServer 5.0.0, OSR5 ELF binaries are marked with a .note section with certain specific contents. Older versions of the dynamic linker assume that any ELF binary with a .note section of the proper _size_ is an OSR5 binary. But this could cause mis-recognition of other binaries (.note is a valid section that could be used for any number of purposes, and might legitimately have any size). The newer dynamic linker in OSR507MP3 checks the actual _contents_ of the .note section. All known compilers which generate OSR5 ELF binaries generate the correct .note section -- except a few ancient GCC builds. Those ancient GCCs generate a .note section of the expected size, but incorrect contents. So those are now mis-recognized as UDK binaries. The `elfmark` utility writes a different stamp into the binary's ELF headers. This is not a .note section but an actual "type of this binary" field in the header. Marking a binary with `elfmark` makes the decision unambiguous. You might ask: so why don't OSR5 compilers write that stamp in the first place? Well, I'm pretty sure I used to know why, but I don't remember at the moment. I remember that there is some reason; it wasn't just forgotten. But this is irrelevant anyway, since the problem is for newer dynamic linkers (with their more sophisticated OSR5 vs. UDK binary detection) to handle _old_ binaries correctly -- binaries produced by compilers which manifestly don't do this stuff right. Binaries produced by the OSR5 devsys don't need the ELF header mark since they have correctly formed OSR5 .note sections. >Bela<If this page was useful to you, please click to help others find it:
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar