10Sstevel@tonic-gate /*
20Sstevel@tonic-gate * CDDL HEADER START
30Sstevel@tonic-gate *
40Sstevel@tonic-gate * The contents of this file are subject to the terms of the
56812Sraf * Common Development and Distribution License (the "License").
66812Sraf * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate *
80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate * See the License for the specific language governing permissions
110Sstevel@tonic-gate * and limitations under the License.
120Sstevel@tonic-gate *
130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate *
190Sstevel@tonic-gate * CDDL HEADER END
200Sstevel@tonic-gate */
216812Sraf
220Sstevel@tonic-gate /*
236812Sraf * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
246812Sraf * Use is subject to license terms.
250Sstevel@tonic-gate */
266812Sraf
270Sstevel@tonic-gate /*
28*8324SAli.Bahrami@Sun.COM * The sharable object /usr/lib/libldstab.so.1 is a link-editor
29*8324SAli.Bahrami@Sun.COM * support library that was used to compress the stab table by
30*8324SAli.Bahrami@Sun.COM * eliminating duplicate include file entries. The link-editor would
31*8324SAli.Bahrami@Sun.COM * load it by default, unless the user explicitly supplied a support
32*8324SAli.Bahrami@Sun.COM * library via the ld -S option. We publically documented this in the
33*8324SAli.Bahrami@Sun.COM * Solaris Linkers and Libraries Manual (LLM), stating that users
34*8324SAli.Bahrami@Sun.COM * who supply their own support libraries should also explicitly
35*8324SAli.Bahrami@Sun.COM * add '-S libldstab.so.1' to their link commands in order to retain
36*8324SAli.Bahrami@Sun.COM * the functionality it supplied.
370Sstevel@tonic-gate *
38*8324SAli.Bahrami@Sun.COM * The original libldstab.so worked by forking a child process running
39*8324SAli.Bahrami@Sun.COM * a program named sbfocus. sbfocus was delivered with the Sun
40*8324SAli.Bahrami@Sun.COM * compilers, and was expected to be found in the users PATH.
41*8324SAli.Bahrami@Sun.COM * As the compilers and the OSnet are delivered on disjoint schedules,
42*8324SAli.Bahrami@Sun.COM * this division never worked very well. Modern versions of the
43*8324SAli.Bahrami@Sun.COM * compilers supply their own support libraries directly as needed, and
44*8324SAli.Bahrami@Sun.COM * no longer deliver a program named sbfocus. The link-editor no longer
45*8324SAli.Bahrami@Sun.COM * loads libldstab.so.1 by default, and it is no longer documented in the LLM.
46*8324SAli.Bahrami@Sun.COM *
47*8324SAli.Bahrami@Sun.COM * The current version of /usr/lib/libldstab.so.1 is a stub that exists
48*8324SAli.Bahrami@Sun.COM * solely for backward compatibility. In the case where an existing
49*8324SAli.Bahrami@Sun.COM * Makefile still follows the old advice in the LLM and supplies
50*8324SAli.Bahrami@Sun.COM * '-S libldstab.so.1' to the link-editor command line, this object
51*8324SAli.Bahrami@Sun.COM * will be loaded. It specifies a support library version of
52*8324SAli.Bahrami@Sun.COM * LD_SUP_VNONE, which indicates to the link-editor that it is
53*8324SAli.Bahrami@Sun.COM * not needed and should be quietly unloaded. In this way, we
54*8324SAli.Bahrami@Sun.COM * preserve the old documented interface without undue overhead.
550Sstevel@tonic-gate */
560Sstevel@tonic-gate
570Sstevel@tonic-gate
58*8324SAli.Bahrami@Sun.COM #include <stdio.h>
59*8324SAli.Bahrami@Sun.COM #include <link.h>
60*8324SAli.Bahrami@Sun.COM #include "libld.h"
610Sstevel@tonic-gate
620Sstevel@tonic-gate
63*8324SAli.Bahrami@Sun.COM /* ARGSUSED */
64*8324SAli.Bahrami@Sun.COM uint_t
650Sstevel@tonic-gate #if defined(_ELF64)
ld_version64(uint_t version)66*8324SAli.Bahrami@Sun.COM ld_version64(uint_t version)
670Sstevel@tonic-gate #else
68*8324SAli.Bahrami@Sun.COM ld_version(uint_t version)
690Sstevel@tonic-gate #endif
700Sstevel@tonic-gate {
71*8324SAli.Bahrami@Sun.COM /* LD_SUP_VNONE tells libld.so to ignore this support library */
72*8324SAli.Bahrami@Sun.COM return (LD_SUP_VNONE);
730Sstevel@tonic-gate }
74