Commit Graph

4 Commits

Author SHA1 Message Date
christos
adc9c9a3d6 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.
2011-10-06 20:31:41 +00:00
salo
99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
simonb
9bcd87074c Don't need to include <string.h>. 2001-07-09 00:57:58 +00:00
cgd
21202a2cb3 add getprogname() and setprogname(). These allow uses of __progname to
be wrapped in some sane fashion, for portability.
2001-02-19 22:13:23 +00:00