diff options
| author | christos <christos@NetBSD.org> | 2011-10-06 20:31:41 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2011-10-06 20:31:41 +0000 |
| commit | fbcdf7832e3f214ca0d1c6ace69e592a24c7d2ef (patch) | |
| tree | 10827a754f6c6d50aae213aeee7b67eb929d298f /lib/libc/stdlib | |
| parent | 7c1904c25b9eb40004e6fbeb467a8e547c33ff75 (diff) | |
Provide symbol definitions for environ and __progname. These are duplicate
definitions to the ones provided by csu, but harmless since the linker resolves
them. There are 3 non weak data symbols provided in crt0.o:
D __progname [initialized data, assigned to ""]
B __ps_strings [BSS since assigned to 0]
C environ [common, uninitialized]
__ps_strings had already a second definition in libc (in BSS), now we added
__progname and __ps_strings (in BSS).
To get rid of the duplicate definition, we can remove them from csu, and
move the assignments to libc.
This is done so that libc has no undefined symbols so that linker maps
that want to do:
...
local:
*;
...
don't end up producing link failures for libc.
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/_env.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/stdlib/_env.c b/lib/libc/stdlib/_env.c index 93a6ab6e836..9883bf2ad26 100644 --- a/lib/libc/stdlib/_env.c +++ b/lib/libc/stdlib/_env.c @@ -1,4 +1,4 @@ -/* $NetBSD: _env.c,v 1.5 2010/11/17 13:25:53 tron Exp $ */ +/* $NetBSD: _env.c,v 1.6 2011/10/06 20:31:41 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _env.c,v 1.5 2010/11/17 13:25:53 tron Exp $"); +__RCSID("$NetBSD: _env.c,v 1.6 2011/10/06 20:31:41 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -95,6 +95,8 @@ __warn_references(__findenv, /* Our initialization function. */ void __libc_env_init(void); +char **environ; + /*ARGSUSED*/ static signed int env_tree_compare_nodes(void *ctx, const void *node_a, const void *node_b) |
