|
Message-ID: <20130217193157.GI20323@brightrain.aerifal.cx> Date: Sun, 17 Feb 2013 14:31:57 -0500 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: [PATCH v3 3/3] internally use the symbol __environ instead of environ On Mon, Feb 11, 2013 at 11:51:52PM +0100, Jens Gustedt wrote: > When switching optimization to higher levels (-O3) and enable link time > optimization (-flto) my linker explodes because "__environ" is accessed > through an alias named "environ", and that text segment has already been > removed: > > `environ' referenced in section `.text.execvp' of /tmp/cckGfCaK.ltrans1.ltrans.o: defined in discarded section `.text' of src/env/__environ.lo (symbol from plugin) > /usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.22 assertion fail ../../bfd/elf64-x86-64.c:4365 > > Use the "real" name of __environ directly and make this code consistent > with other functions (such as execv) that already use __environ, > too. > > Some places where "environ" is used may already have been silently > renamed through a macro in internal/libc.h, but it is probably better to > have that in the open. Committed. I believe the fix is complete, since the following no longer turns up any references: $ grep -r [^_]environ src src/process/execve.c: /* do we need to use environ if envp is null? */ src/ldso/dynlink.c: /* Find aux vector just past environ[] */ src/thread/powerpc/syscall_cp.s:#r31: local or environment pointer src/env/__environ.c:weak_alias(__environ, environ); Thanks. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.