92f1ee6990752f26aebdbbfb5a87c474d3edd1e0 |
|
31-Dec-2013 |
Albert J. Wong <ajwong@google.com> |
Fix new.delete tests by correcting link methodology. Replace GABIXX_LIBCXX with LIBCXXABI. Removed -Bsymbolic. Specified -O0 in testit_android because the optimizations make some of the tests fail. Also replaced GABIXX_LIBCXX with LIBCXXABI and gabi++ to reflect libc++abi, not libc++rt. The linking of libc++_shared.so incorreclty specified -Bsymbolic which, aside from causing issues with rtti and exception handlers, also makes the default implementations of the array operator new, and the single-object no-throw variant (both of which wrap the normal single-object new) link directly to the single-object new rather than jump through the PLT. This means that even if you override single-object new, the default implementations of these other new operators will NOT find the override. Bad bad bad. Ideally, this should use -Bsymbolic-functions with --dynamic-list-cpp-new and --dynamic-list-cpp-typeinfo so that the linker can avoid a plt jump for most lookups, but somehow even with the dynamic-list settings, the operator new/delete functions were skipping the plt jump. Removed all of these options for now. willchan, danakj, and thakis contributed to this patch. BUG=36496 Change-Id: Iaaa25de365b6444e49ceaadaf9d0b1f442b9c85d
|