Subject: Re: ld.elf_so heads up.
To: None <>
From: Simon Burge <>
List: current-users
Date: 04/16/2000 13:21:18 wrote:

> 	I made some changes to the elf dynamic loader to set __progname
> and environ before library init sections get called.  I am also changing
> crt0 on elf platforms to set these only if linked statically.  Because of
> this, make sure that, if you install the new crt0, you BUILD AND INSTALL A
> NEW LD.ELF_SO before trying to build dynamically linked binaries.
> "make build" does the right thing.
> 	Also, the changes to crt0 were nearly identical across all elf ports,
> but I only have i386 and alpha to test on.  If you have any of:
> 	m68k, mips, powerpc, sh3, sparc, sparc64, vax
> please check if it works correctly.  I have a couple test programs at

This with the updated ld.elf_so on mips, but I don't see any recent
changes to lib/csu??

	g++ -c a.c
	g++ -shared lib.c -o
	g++ -o a.out a.o -L. -Wl,-rpath,. -ltest
	gcc -o static_test -DXTYPE=\"static\" static_test.c
	gcc -o dynamic_test -DXTYPE=\"dynamic\" static_test.c
	 lib: __progname:0x10000000
	 lib: environ:0x100000d8
	 lib: a.out
	 lib: simonb
	main: __progname:0x10000000
	main: environ:0x100000d8
	main: a.out
	main: simonb
	====> lib: and main: lines should match
	static: progname:static_test
	static: environ:0x7fffe714
	static: USER:simonb
	dynamic: progname:dynamic_test
	dynamic: environ:0x7fffe714
	dynamic: USER:simonb
	====> static: and dynamic: lines should match