https://sourceware.org/bugzilla/show_bug.cgi?id=25458
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 12229
--> https://sourceware.org/bugzilla/attachment.cgi?id=12229&action=edit
A testcase
[hjl@gnu-cfl-1 pr25458]$ make
cc -c -o start.o start.c
cc -c -o foo.o foo.S
ld -shared -o libfoo.so foo.o --version-script foo.t
ld -o x start.o libfoo.so
ld --gc-sections -o y start.o libfoo.so
readelf -sW x | grep environ
1: 0000000000403ef0 0 OBJECT WEAK DEFAULT 11 environ@FOO (2)
2: 0000000000403ef0 0 OBJECT WEAK DEFAULT 11 _environ@FOO (2)
3: 0000000000403ef0 0 OBJECT GLOBAL DEFAULT 11 __environ@FOO (2)
16: 0000000000403ef0 0 OBJECT GLOBAL DEFAULT 11 __environ@@FOO
17: 0000000000403ef0 0 OBJECT WEAK DEFAULT 11 environ@@FOO
readelf -sW y | grep environ
1: 0000000000403ef0 0 OBJECT GLOBAL DEFAULT 11 __environ@FOO (2)
2: 0000000000403ef0 0 OBJECT WEAK DEFAULT 11 environ@FOO (2)
16: 0000000000403ef0 0 OBJECT GLOBAL DEFAULT 11 __environ@@FOO
17: 0000000000403ef0 0 OBJECT WEAK DEFAULT 11 environ@@FOO
[hjl@gnu-cfl-1 pr25458]$
--
You are receiving this mail because:
You are on the CC list for the bug.