發表文章

目前顯示的是 5月, 2013的文章

登入putty沒有載入.bashrc

因為putty預設是load .bash_profile 或是 .profile。兩個檔案都不存在的時候,才會去找.bashrc 所以在.bash_profile中加入 source .bashrc 就可以啦!!

Android下類似linux ldd 的工具

Android ndk開發的時候,有時需要看看shared library的dependency,可以在ubuntu下輸入 locate readelf 會看到類似這樣的輸出: $ANDROID_SOURCE/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-readelf $ANDROID_SOURCE/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/share/man/man1/arm-eabi-readelf.1 $ANDROID_SOURCE/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-readelf $ANDROID_SOURCE/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-readelf 把 arm-eabi-readelf 的路徑加到PATH之後,就可以輸入 arm-eabi-readelf -d path_to_so 就可以看到so的相關資訊了 Ex: Dynamic section at offset 0xe8b80 contains 26 entries:   Tag        Type                         Name/Value  0x00000003 (PLTGOT)                     0xe9e7c  0x00000002 (PLTRELSZ)                   752 (bytes)  0x00000017 (JMPREL)        ...