Comment #2 on issue 260 by [email protected]: ASan breaks dead
stripping (-ffunction-sections/-Wl,-gc-section on Linux, -dead_strip on OSX)
http://code.google.com/p/address-sanitizer/issues/detail?id=260
For the proper test we also need to use -fdata-sections, otherwise
the following test will not link even w/o asan:
% cat sec.cc
int undefined();
int defined() { return 1; }
void *AAA = (void*)&defined;
void *BBB = (void*)&undefined;
int main() {
return AAA != 0;
}
% clang++ sec.cc -Wl,--gc-sections -ffunction-sections
/tmp/sec-e95f7f.o:(.data+0x8): undefined reference to `undefined()'
clang-3.5: error: linker command failed with exit code 1 (use -v to see
invocation)
% clang++ sec.cc -Wl,--gc-sections -ffunction-sections -fdata-sections
%
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.