Commit 053f3390 authored by michael's avatar michael

fixes for PIC code on x86-64 patch by (Drew Hess <drew.hess gmail com>)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3757 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 48e7d6ef
......@@ -224,12 +224,21 @@ static inline float floorf(float f) {
# include "bswap.h"
// Use rip-relative addressing if compiling PIC code on x86-64.
# if defined(__MINGW32__) || defined(__CYGWIN__) || \
defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))
# if defined(ARCH_X86_64) && defined(PIC)
# define MANGLE(a) "_" #a"(%%rip)"
# else
# define MANGLE(a) "_" #a
# endif
# else
# if defined(ARCH_X86_64) && defined(PIC)
# define MANGLE(a) #a"(%%rip)"
# else
# define MANGLE(a) #a
# endif
# endif
/* debug stuff */
......
......@@ -8,12 +8,21 @@
#define __MANGLE_H
/* Feel free to add more to the list, eg. a.out IMO */
/* Use rip-relative addressing if compiling PIC code on x86-64. */
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \
(defined(__OpenBSD__) && !defined(__ELF__))
#if defined(ARCH_X86_64) && defined(PIC)
#define MANGLE(a) "_" #a"(%%rip)"
#else
#define MANGLE(a) "_" #a
#endif
#else
#if defined(ARCH_X86_64) && defined(PIC)
#define MANGLE(a) #a"(%%rip)"
#else
#define MANGLE(a) #a
#endif
#endif
#endif /* !__MANGLE_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment