binutils/tests/Regression/Linker-garbage-collection-removes-weak-alias/environ.c
Václav Kadlčík 284ad2a04b Import RHEL's regression test for #1804696
A tweak was needed for Rawhide (or anything after [1]): readelf
requires "-W" to display the "_environ" symbol without truncating.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0942c7ab94e554657c3e11ab85ae7f15373ee80d
2021-05-26 07:34:05 +02:00

8 lines
146 B
C

#include <stdio.h>
extern char **environ;
int main(int argc, char **argv) {
printf("%p\n", environ);
return 0;
}