aboutsummaryrefslogtreecommitdiffstats
path: root/bfd/test
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/test')
-rw-r--r--bfd/test/makefile4
-rw-r--r--bfd/test/test.c2
2 files changed, 4 insertions, 2 deletions
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);