summaryrefslogtreecommitdiff
path: root/test/elftest64.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-17 22:10:33 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-17 22:10:33 -0700
commit15ed76867307abca4f732a0eb536f2fad2914767 (patch)
tree06e33d101487a68368a8fab465c8f1caebb259c7 /test/elftest64.c
parent70e6c2a6cb954edcbc2d403519a0eb662987af61 (diff)
downloadnasm-15ed76867307abca4f732a0eb536f2fad2914767.tar.gz
nasm-15ed76867307abca4f732a0eb536f2fad2914767.tar.bz2
nasm-15ed76867307abca4f732a0eb536f2fad2914767.zip
elftest64: both Small PIC and Medium PIC model tests
Try both Small PIC and Medium PIC model references. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'test/elftest64.c')
-rw-r--r--test/elftest64.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/elftest64.c b/test/elftest64.c
index 5f009a7..1f3dec1 100644
--- a/test/elftest64.c
+++ b/test/elftest64.c
@@ -11,7 +11,8 @@
#include <inttypes.h>
extern long lrotate(long, int);
-extern void greet(void);
+extern void greet_s(void);
+extern void greet_m(void);
extern int8_t asmstr[];
extern void *selfptr;
extern void *textptr;
@@ -31,10 +32,10 @@ int main(void)
printf("The integers here should be 1234, 1235 and 4321:\n");
integer = 1234;
commvar = 4321;
+ greet_s();
+ greet_m();
- greet();
-
- printf("These pointers should be equal: %p and %p\n", &greet, textptr);
+ printf("These pointers should be equal: %p and %p\n", &greet_s, textptr);
printf("So should these: %p and %p\n", selfptr, &selfptr);