android-elf-cleaner icon indicating copy to clipboard operation
android-elf-cleaner copied to clipboard

Error on running android-elf-cleaner

Open ShwetaSood opened this issue 8 years ago • 3 comments

Hi We did remove the offending elf files. However, running the executable file on Android gave the following error: CANNOT LINK EXECUTABLE: cannot find verneed/verdef for version index=2 referenced by symbol "pthread_create" at "/data/user/0/com.neon.search/bin/srch2ngn.exe"page record for 0xb693002c was not found (block_size=16)

ShwetaSood avatar Nov 05 '16 09:11 ShwetaSood

I have the same issue, any solutions?

HappyZ avatar Mar 27 '18 05:03 HappyZ

before

adb shell LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/nodejs:/system/lib64 /data/local/tmp/nodejs/node /data/local/tmp/TestProj
WARNING: linker: Warning: "/data/local/tmp/nodejs/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
WARNING: linker: Warning: "/data/local/tmp/nodejs/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
test nodejs
hello

after

../android-elf-cleaner/android-elf-cleaner: Removing the DT_VERNEEDED dynamic section entry from 'out/aarch64/libc++_shared.so'
../android-elf-cleaner/android-elf-cleaner: Removing the DT_VERNEEDNUM dynamic section entry from 'out/aarch64/libc++_shared.so'
adb shell LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/nodejs:/system/lib64 /data/local/tmp/nodejs/node /data/local/tmp/TestProj
WARNING: linker: Warning: "/data/local/tmp/nodejs/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
WARNING: linker: Warning: "/data/local/tmp/nodejs/libc++_shared.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
CANNOT LINK EXECUTABLE "/data/local/tmp/nodejs/node": cannot find verneed/verdef for version index=2 referenced by symbol "__sF" at "/data/local/tmp/nodejs/libc++_shared.so"

is there any solution?


original aarch64-linux-android/libc++_shared.so from android-ndk-r25

readelf -d libc++_shared.so

Dynamic section at offset 0xf89e0 contains 28 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so]
 0x000000000000000e (SONAME)             Library soname: [libc++_shared.so]
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW
 0x0000000000000007 (RELA)               0x34938
 0x0000000000000008 (RELASZ)             78264 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffff9 (RELACOUNT)          1289
 0x0000000000000017 (JMPREL)             0x47af0
 0x0000000000000002 (PLTRELSZ)           11664 (bytes)
 0x0000000000000003 (PLTGOT)             0xfa100
 0x0000000000000014 (PLTREL)             RELA
 0x0000000070000001 (AARCH64_BTI_PLT)
 0x0000000000000006 (SYMTAB)             0x388
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0x1852c
 0x000000000000000a (STRSZ)              115723 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0xfc20
 0x0000000000000004 (HASH)               0x138bc
 0x0000000000000019 (INIT_ARRAY)         0xf99d0
 0x000000000000001b (INIT_ARRAYSZ)       16 (bytes)
 0x000000000000001a (FINI_ARRAY)         0xf99c0
 0x000000000000001c (FINI_ARRAYSZ)       16 (bytes)
 0x000000006ffffff0 (VERSYM)             0xe8c0
 0x000000006ffffffe (VERNEED)            0xfbdc
 0x000000006fffffff (VERNEEDNUM)         2
 0x0000000000000000 (NULL)               0x0

tqk2811 avatar Aug 18 '22 13:08 tqk2811

Update: found working here https://github.com/termux/termux-elf-cleaner

tqk2811 avatar Aug 20 '22 14:08 tqk2811