aboutsummaryrefslogtreecommitdiffstats
path: root/bfd/test
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/test')
-rw-r--r--bfd/test/makefile9
-rw-r--r--bfd/test/test.c3
2 files changed, 9 insertions, 3 deletions
diff --git a/bfd/test/makefile b/bfd/test/makefile
index ca1eab1..8282536 100644
--- a/bfd/test/makefile
+++ b/bfd/test/makefile
@@ -7,9 +7,9 @@ TARGET=test
##################################RULES################################
.DEFAULT:all
-.PHONY:all clean help $(TARGET)
+.PHONY:all clean help $(TARGET) ASM
-all:$(TARGET) $(TARGET).so
+all:$(TARGET) $(TARGET).so ASM
.c.o:
$(CC) $(CC_FLAGS) -c $< -o $@
@@ -17,11 +17,14 @@ all:$(TARGET) $(TARGET).so
$(TARGET): $(TARGET).o
$(CC) $^ $(LD_FLAGS) -o $@
+ASM: $(TARGET).o
+ objdump -d -M intel -S $(TARGET).o > $(TARGET).asm
+
$(TARGET).so: $(TARGET).o
$(CC) $^ $(LD_FLAGS) -shared -o $@
clean:
- rm -f *.o *~ $(TARGET) $(TARGET).so
+ rm -f *.o *~ $(TARGET) $(TARGET).so $(TARGET).asm
help:
@echo 'all builds so and exe. all is the default.'
diff --git a/bfd/test/test.c b/bfd/test/test.c
index db577cb..7b1e01c 100644
--- a/bfd/test/test.c
+++ b/bfd/test/test.c
@@ -14,5 +14,8 @@ int myvar3 = 3;
int myvar4 = 4;
int main(int argc, char** argv) {
+ int sum;
+ sum = myfunc7(10, 20);
printf("i live!\n");
+ return myfunc7(10, 20);
}