libc: Complete conversion to _getprogname from __progname
The initial work to eliminate direct use of __progname was done years ago,
but two items were missed: an extern keyword and libc_r conversion. As a
result, the symbol was classified as an object. Before commit (R4.2):
> readelf -a /lib/libc.so.8 | grep __progname
00000032ac80 077600000006 R_X86_64_GLOB_DAT
00000000003506d0 __progname+0
1910:
00000000003506d0 8 OBJECT GLOBAL DEFAULT 24 __progname
537:
00000000003506d0 8 OBJECT GLOBAL DEFAULT 24 __progname
After commit:
> readelf -a /lib/libc.so.8 | grep __progname
0000003309c0 000400000006 R_X86_64_GLOB_DAT
0000000000000000 __progname+0
4:
0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __progname
545:
0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __progname
The issue was reveal with libc symbol version testing, which also revealed
the "environ" symbol has a similar issue. The change matches how the
FreeBSD analog works.