Mercurial > libavcodec.hg
comparison libpostproc/mangle.h @ 2391:336a239ad9a4 libavcodec
fixes for PIC code on x86-64 patch by (Drew Hess <drew.hess gmail com>)
author | michael |
---|---|
date | Sat, 18 Dec 2004 03:07:15 +0000 |
parents | 556b5d0b5228 |
children | 038e1b4f9afd |
comparison
equal
deleted
inserted
replaced
2390:ce45e1dd4b09 | 2391:336a239ad9a4 |
---|---|
6 | 6 |
7 #ifndef __MANGLE_H | 7 #ifndef __MANGLE_H |
8 #define __MANGLE_H | 8 #define __MANGLE_H |
9 | 9 |
10 /* Feel free to add more to the list, eg. a.out IMO */ | 10 /* Feel free to add more to the list, eg. a.out IMO */ |
11 /* Use rip-relative addressing if compiling PIC code on x86-64. */ | |
11 #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \ | 12 #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \ |
12 (defined(__OpenBSD__) && !defined(__ELF__)) | 13 (defined(__OpenBSD__) && !defined(__ELF__)) |
14 #if defined(ARCH_X86_64) && defined(PIC) | |
15 #define MANGLE(a) "_" #a"(%%rip)" | |
16 #else | |
13 #define MANGLE(a) "_" #a | 17 #define MANGLE(a) "_" #a |
18 #endif | |
19 #else | |
20 #if defined(ARCH_X86_64) && defined(PIC) | |
21 #define MANGLE(a) #a"(%%rip)" | |
14 #else | 22 #else |
15 #define MANGLE(a) #a | 23 #define MANGLE(a) #a |
24 #endif | |
16 #endif | 25 #endif |
17 | 26 |
18 #endif /* !__MANGLE_H */ | 27 #endif /* !__MANGLE_H */ |
19 | 28 |