From 8bff748dd325ff45375e6f5948368e1ee024d411 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sat, 17 Feb 2018 11:43:27 +0330 Subject: trying to implement the nested call and global object rewriters --- bfd/test/makefile | 4 ++-- bfd/test/test.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'bfd/test') diff --git a/bfd/test/makefile b/bfd/test/makefile index 7115100..3512579 100644 --- a/bfd/test/makefile +++ b/bfd/test/makefile @@ -1,7 +1,7 @@ ##################################VARS################################# CC=clang -CC_FLAGS=-fpic +CC_FLAGS=-fpic -O0 LD_FLAGS= -l bfd TARGET=test ##################################RULES################################ @@ -18,7 +18,7 @@ $(TARGET): $(TARGET).o $(CC) $^ $(LD_FLAGS) -o $@ $(TARGET).asm: $(TARGET).o - objdump -d -M intel -S $(TARGET).o > $(TARGET).asm + objdump -r -d -M intel -S $(TARGET).o > $(TARGET).asm $(TARGET).so: $(TARGET).o $(CC) $^ $(LD_FLAGS) -shared -o $@ diff --git a/bfd/test/test.c b/bfd/test/test.c index a62769a..cac61b6 100644 --- a/bfd/test/test.c +++ b/bfd/test/test.c @@ -19,6 +19,8 @@ int myvar2 = 2; int myvar3 = 3; int myvar4 = 4; +int glob(void) {return myvar1+myvar2+myvar3+myvar4;} + int main(int argc, char** argv) { int sum; sum = add2(10, 20); -- cgit v1.2.3