====== GCC ======
===== Compile =====
g++ mylib1.cpp
g++ mylib2.cpp
# shared
g++ -shared -fPIC -o libmylib.so mylib1.o mylib2.o
g++ -o main main.cpp libmylib.so
LD_LIBRARY_PATH=. ./main
# static
ar rcs libmylib.a mylib1.o mylib2.o
g++ -o main main.cpp -L. lmylib
./main
# prevents linking with the shared libraries
g++ -static -o main main.cpp -L. lmylib
===== Distinguish An ELF Binary is Hard-float or Soft-float =====
readelf -a [elf-bin] | grep 'VFP registers' # Hard-float
readelf -a [elf-bin] | grep 'Tag_ABI_HardFP_use' # Soft-float
https://www.cnx-software.com/2013/04/22/how-to-detect-if-an-arm-elf-binary-is-hard-float-armhf-or-soft-float-armel/
===== ARM GCC Toolchain =====
**New Release**
[[https://releases.linaro.org/components/toolchain/binaries/]]
**Archive**
[[https://releases.linaro.org/archive/14.08/components/toolchain/gcc-linaro/4.8/]]
[[https://www.linaro.org/downloads/]]
**Ref**
* http://codingstandards.iteye.com/blog/1142358
* https://www.ptt.cc/bbs/LinuxDev/M.1162669989.A.2E6.html