|
|
Flag day: PSARC 2008/309 expunge synonyms.h
Date: Fri, 6 Jun 2008 14:05:17 -0700 (PDT)
From: "Roger A. Faulkner" <Roger.Faulkner at sun dot com>
To: onnv-gate at onnv dot eng dot sun dot com, on-all at eng dot sun dot com
Subject: Flag day: PSARC 2008/309 expunge synonyms.h
The following putback constitutes a flag day for practically everyone
with a child of /ws/onnv-{gate|clone}, but especially for user-level
library developers:
PSARC 2008/309 expunge synonyms.h
6700179 expunge synonyms.h
If all you have in your workspace is usr/src/{uts|psm|stand},
you can probably ignore this message. But read on; you may
be affected later if you use crufty old binaries that call
any of the now-defunct leading-underscore synonym functions.
The change is large:
Contents Summary:
16 create
1000 update
19 no action (unchanged)
Names Summary:
21 renamed
The putback deletes all of the synonyms.h files:
usr/src/cmd/sgs/libelf/common/syn.h
usr/src/cmd/sgs/rtld/common/_synonyms.h
usr/src/lib/common/inc/c_synonyms.h
usr/src/lib/libc/inc/synonyms.h
usr/src/lib/libcrypt/inc/des_synonyms.h
usr/src/lib/libgen/inc/gen_synonyms.h
usr/src/lib/libtsnet/common/synonyms.h
You should never again create synonym symbols with a leading
underscore, as was common practice for libraries in the past:
#pragma weak foobar = _foobar
int
_foobar()
{
}
The need for leading-underscore synonym symbols has been
eliminated by the better direct binding method. See:
4947191 OSNet should use direct bindings
That change was putback to /ws/onnv-gate in build snv_83.
The current putback not only eliminates the synonyms.h files,
but it also eliminates most of the leading-underscore synonym
symbols themselves. The ones eliminated are the ones that were
versioned SUNWprivate in the various library mapfiles.
The ones retained are the ones that are versioned something
else or that were found to be commonly used by components
of the compilation system, including dbx components.
This change should be a giant no-op for almost everyone.
However...
You may be using some crufty old application that I was unable
to find in the installed system or in /usr/dist. If your crufty
old application calls any of the now-eliminated synonym symbols,
it will not run anymore. You will get something like:
$ crufty
ld.so.1: crufty: fatal: relocation error: file crufty:
symbol _eliminated: referenced symbol not found
Killed
If you are using one of these unfortunate applications,
you can work around the problem using a preloadable module
provided with this putback:
$ LD_PRELOAD=c_synonyms.so.1 crufty
This module provides entry points for all of the leading-underscore
synonym functions and simply jumps to the corresponding non-underscore
function in libc.
If the unfortunate application was linked with -Bdirect, this
will not work (since it expects to find the eliminated symbol
directly in libc, regardless of the preloaded module).
To further workaround this problem, use LD_NODIRECT as well:
$ LD_NODIRECT=1 LD_PRELOAD=c_synonyms.so.1 crufty
This should be a temporary workaround, not a permanent solution.
You should regenerate the unfortunate application using proper
functions, not the old leading-underscore synonym functions.
If you have trouble doing this, contact me directly.
Roger Faulkner
roger.faulkner at sun dot com
|