https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64349
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> --- Created attachment 34299 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34299&action=edit proper fix. So, the rules on Darwin say that it's OK to access _environ directly from the main executable, but it is NOT OK to access it from a shared libaray. Instead, one should use the _NSGetEnviron() API). === My initial patch works because it allows the symbol to be satisfied at load time by dynamic lookup (it will be found from the exe, I assume). === The patch attached above uses the correct API - and works AFAICT on powerpc-darwin9 and x86_64-darwin12.