aboutsummaryrefslogtreecommitdiffstats
path: root/bfd
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-12-31 19:25:40 +0000
committerbloodstalker <thabogre@gmail.com>2017-12-31 19:25:40 +0000
commitd2bff8aa39c98c4ebc904b836dcffbea3f7045bb (patch)
treeeee4c48bc69314cb90518a05f553e8eea9c17e8c /bfd
parentbruiser gets the function code and name from bfd now. besides that minor chan... (diff)
downloadmutator-d2bff8aa39c98c4ebc904b836dcffbea3f7045bb.tar.gz
mutator-d2bff8aa39c98c4ebc904b836dcffbea3f7045bb.zip
wip
Diffstat (limited to 'bfd')
-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);
}