I only found ./prebuilts/clang/linux-x86/host/3.5/lib/libc++.so in Android4.4 platform code and found libc++-shared.so in ndkr10 , do I need use clang to compile llvm-symbolizer code? Here is my Android.mk of llvm-symbolizer in the external/llvm directory, could u tell me how to change this file,plz? Really not familiar with this.
*external/llvm$ cat tools/llvm-symbolizer/Android.mkLOCAL_PATH:= $(call my-dir)* *llvm_symbolizer_SRC_FILES := \ LLVMSymbolize.cpp \ llvm-symbolizer.cpp* *llvm_symbolizer_STATIC_LIBRARIES := \ libLLVMObject \ libLLVMDebugInfo \ libLLVMSupport* *#===---------------------------------------------------------------===# llvm-symbolizer command line tool (target)#===---------------------------------------------------------------===* *include $(CLEAR_VARS)* *LOCAL_MODULE := llvm-symbolizerLOCAL_MODULE_TAGS := optionalLOCAL_MODULE_CLASS := EXECUTABLES* *LOCAL_SRC_FILES := $(llvm_symbolizer_SRC_FILES)LOCAL_CFLAGS += -D__android__ -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROSLOCAL_STATIC_LIBRARIES := $(llvm_symbolizer_STATIC_LIBRARIES)LOCAL_SHARED_LIBRARIES := \ libcutils \ libstlport* *include $(LLVM_ROOT_PATH)/llvm.mkinclude $(LLVM_DEVICE_BUILD_MK)include $(LLVM_GEN_INTRINSICS_MK)include $(BUILD_EXECUTABLE)* 在 2014年9月4日星期四UTC+8下午4时40分30秒,Evgeniy Stepanov写道: > You may need to switch from stlport to libc++ or some other option > (there is a choice of c++ std libraries in the NDK). > > > On Thu, Sep 4, 2014 at 5:25 AM, ji wang <[email protected] <javascript:>> > wrote: > > Hi,Evgeniy > > I am cross-compiling LLVM-symbolizer for Android4.4, Now I got a compile > > error like below,Any ideas to solve this? Any patches for this? > > external/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp:336: error: > undefined > > reference to '__cxa_demangle' > > collect2: error: ld returned 1 exit status > > > > 在 2014年9月2日星期二UTC+8下午5时09分15秒,Evgeniy Stepanov写道: > >> > >> We don't have any short-term plans for that, though it would be a nice > >> to have feature. > >> > >> There is a code dump here with some instructions that might be useful > >> if you want to try: > >> > >> > https://code.google.com/p/address-sanitizer/source/browse/#svn%2Ftrunk%2Finternal_symbolizer > > >> > >> On Tue, Sep 2, 2014 at 12:56 PM, ji wang <[email protected]> wrote: > >> > Thanks Evgeniy, I've noticed this today. And I am trying to write an > >> > Android.mk script to cross-compile llvm-symbolizer code now. > >> > And this solution is the ExternalSymbolizer, have any plan about the > >> > InternalSymbolizer support? > >> > > >> > > >> > > >> > 在 2014年9月2日星期二UTC+8下午4时31分49秒,Evgeniy Stepanov写道: > >> >> > >> >> If you build llvm-symbolizer binary (it's in the LLVM source tree, > >> >> cross-compile it to Android) and push it to /system/bin, then > >> >> symbolization will just work. > >> >> > >> >> > >> >> On Tue, Sep 2, 2014 at 7:05 AM, ji wang <[email protected]> > wrote: > >> >> > I think its very useful to add the function name to the asan > output > >> >> > recently, which needs in-process symbolization in Asan runtime. > >> >> > I've checked the asan runtime source code on android platform, > found > >> >> > out > >> >> > "__sanitizer_symbolize_data" and "__sanitizer_symbolize_code" > >> >> > unimplemented. > >> >> > What should I do to implement those function and make the > >> >> > symbolization > >> >> > works? Or is there any other way to symbolizing ASan output on > >> >> > Android? > >> >> > > >> >> > char *SendCommand(bool is_data, const char *module_name, uptr > >> >> > module_offset) { > >> >> > SanitizerSymbolizeFn symbolize_fn = is_data ? > >> >> > __sanitizer_symbolize_data > >> >> > : > >> >> > __sanitizer_symbolize_code; > >> >> > if (symbolize_fn(module_name, module_offset, buffer_, > >> >> > kBufferSize)) > >> >> > return buffer_; > >> >> > return 0; > >> >> > } > >> >> > > >> >> > -- > >> >> > 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/d/optout. > >> > > >> > -- > >> > 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/d/optout. > > > > -- > > 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] <javascript:>. > > For more options, visit https://groups.google.com/d/optout. > -- 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/d/optout.
