Skip to content

Instantly share code, notes, and snippets.

View visitbethel's full-sized avatar

Bananaman visitbethel

  • FreeIT
  • The Springs CO
View GitHub Profile
#!/bin/bash
# BUILD library which contains all modules of the package
echo "Build package.o from module1.c and module2.c"
gcc -c -o module1.o module1.c
gcc -c -o module2.o module2.c
ld -o package.o -r module1.o module2.o
symbols=(`nm package.o`)
for((i=0;i<${#symbols[*]};i=i+1)) do
if [ "${symbols[$i]}" != "T" ]; then continue; fi