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