thakis added inline comments. Herald added subscribers: llvm-commits, kristina. Herald added a project: LLVM.
================ Comment at: llvm/trunk/lib/Support/PrettyStackTrace.cpp:93 +extern "C" const char *__crashreporter_info__ + __attribute__((visibility("hidden"))) = 0; asm(".desc ___crashreporter_info__, 0x10"); ---------------- As far as I can tell, making this a hidden symbol makes the `.desc ___crashreporter_info__, 0x10` (ie REFERENCED_DYNAMICALLY) not have any effect: ``` % cat crashref.cc extern "C" const char *__crashreporter_info__ __attribute__((visibility("hidden"))) = 0; asm(".desc ___crashreporter_info__, 0x10"); int main() {} % clang crashref.cc % nm -m a.out 0000000100004000 (__DATA,__common) non-external (was a private external) ___crashreporter_info__ 0000000100000000 (__TEXT,__text) [referenced dynamically] external __mh_execute_header 0000000100003fb0 (__TEXT,__text) external _main (undefined) external dyld_stub_binder (from libSystem) % strip -r a.out % nm -m a.out 0000000100000000 (__TEXT,__text) [referenced dynamically] external __mh_execute_header ``` It does have an effect without it: ``` % cat crashref.cc extern "C" const char *__crashreporter_info__ = 0; asm(".desc ___crashreporter_info__, 0x10"); int main() {} % clang crashref.cc % nm -m a.out 0000000100004000 (__DATA,__common) [referenced dynamically] external ___crashreporter_info__ 0000000100000000 (__TEXT,__text) [referenced dynamically] external __mh_execute_header 0000000100003fb0 (__TEXT,__text) external _main (undefined) external dyld_stub_binder (from libSystem) % strip -r a.out % nm -m a.out 0000000100004000 (__DATA,__common) [referenced dynamically] external ___crashreporter_info__ 0000000100000000 (__TEXT,__text) [referenced dynamically] external __mh_execute_header ``` Is that intentional? Should we just remove the `.desc` line? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D27683/new/ https://reviews.llvm.org/D27683 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits