From d2bff8aa39c98c4ebc904b836dcffbea3f7045bb Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 31 Dec 2017 22:55:40 +0330 Subject: wip --- bfd/test/makefile | 9 ++++++--- bfd/test/test.c | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'bfd/test') 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); } -- cgit v1.2.3