summaryrefslogtreecommitdiffstats
path: root/lib/csu/i386/crt0.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csu/i386/crt0.c')
-rw-r--r--lib/csu/i386/crt0.c44
1 files changed, 43 insertions, 1 deletions
diff --git a/lib/csu/i386/crt0.c b/lib/csu/i386/crt0.c
index a14a408..6ff4f0b 100644
--- a/lib/csu/i386/crt0.c
+++ b/lib/csu/i386/crt0.c
@@ -27,11 +27,13 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: crt0.c,v 1.24 1996/10/01 00:54:48 peter Exp $
+ * $Id: crt0.c,v 1.25 1996/10/06 03:19:26 steve Exp $
*/
#include <sys/param.h>
+
#include <stdlib.h>
+#include <dlfcn.h>
#ifdef DYNAMIC
#include <sys/types.h>
@@ -382,8 +384,48 @@ _getenv(name)
asm(" movl $-1,%eax");
asm(" ret");
+#else /* DYNAMIC */
+
+/*
+ * DL stubs for static linking case (just return error)
+ */
+
+void *
+dlopen(name, mode)
+char *name;
+int mode;
+{
+ return NULL;
+}
+
+int
+dlclose(fd)
+void *fd;
+{
+ return -1;
+}
+
+void *
+dlsym(fd, name)
+void *fd;
+char *name;
+{
+ return NULL;
+}
+
+
+char *
+dlerror()
+{
+ return "Service unavailable";
+}
#endif /* DYNAMIC */
+
+/*
+ * Support routines
+ */
+
#ifdef MCRT0
asm (" .text");
asm ("_eprol:");
OpenPOWER on IntegriCloud