How to set Build ID of a elf file in Android.mk -
i need set specific build-id elf file in android.
firstly,i use shell command this:
arm-linux-androideabi-gcc -pie -wl,--build-id=0xffffffff --sysroot /home/chengyi/code/android_6.0.1_bullhead/prebuilts/ndk/9/platforms/android-18/arch-arm main.c
readelf -n a.out
.everthing ok.
above demo,i need set build-id in android.mk @ last.here android.mk:
local_path:= $(call my-dir) include $(clear_vars) local_src_files:= \ main.cpp local_shared_libraries := \ liblog \ libdl \ local_c_includes := \ $(local_path)/ \ bionic \ local_module:= a.out local_cxxflags := \ -pie -wl,--build-id=0xffffffffffffffffff --sysroot /home/chengyi/code/android_6.0.1_bullhead/prebuilts/ndk/9/platforms/android-18/arch-arm \ include $(build_executable)
the output elf file has constant build-id,no matter how strive. there method set specific build-id elf file in android.mk?
thanks lot help.
if want set build-id android.mk. don't use variable local_cxxflags
or local_cflags
.
build-id sent linker,so need use local_ldflags
this:
local_ldflags += -wl,--build-id=0xffffffffffffff
Comments
Post a Comment