Your problem is almost certainly that ld -o int $(LIBRARY) does not include the run-time startoff nor the -X flag. Why not let "cc" do this for you: cc -o int $(LDFLAGS) ${LIBRARY}