mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
fixes for PIC code on x86-64 patch by (Drew Hess <drew.hess gmail com>)
Originally committed as revision 3757 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
caacd4deea
commit
a2c3bf82a7
@ -224,11 +224,20 @@ static inline float floorf(float f) {
|
|||||||
|
|
||||||
# include "bswap.h"
|
# include "bswap.h"
|
||||||
|
|
||||||
|
// Use rip-relative addressing if compiling PIC code on x86-64.
|
||||||
# if defined(__MINGW32__) || defined(__CYGWIN__) || \
|
# if defined(__MINGW32__) || defined(__CYGWIN__) || \
|
||||||
defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))
|
defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__))
|
||||||
# define MANGLE(a) "_" #a
|
# if defined(ARCH_X86_64) && defined(PIC)
|
||||||
|
# define MANGLE(a) "_" #a"(%%rip)"
|
||||||
|
# else
|
||||||
|
# define MANGLE(a) "_" #a
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
# define MANGLE(a) #a
|
# if defined(ARCH_X86_64) && defined(PIC)
|
||||||
|
# define MANGLE(a) #a"(%%rip)"
|
||||||
|
# else
|
||||||
|
# define MANGLE(a) #a
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* debug stuff */
|
/* debug stuff */
|
||||||
|
@ -8,12 +8,21 @@
|
|||||||
#define __MANGLE_H
|
#define __MANGLE_H
|
||||||
|
|
||||||
/* Feel free to add more to the list, eg. a.out IMO */
|
/* 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__) || \
|
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \
|
||||||
(defined(__OpenBSD__) && !defined(__ELF__))
|
(defined(__OpenBSD__) && !defined(__ELF__))
|
||||||
|
#if defined(ARCH_X86_64) && defined(PIC)
|
||||||
|
#define MANGLE(a) "_" #a"(%%rip)"
|
||||||
|
#else
|
||||||
#define MANGLE(a) "_" #a
|
#define MANGLE(a) "_" #a
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if defined(ARCH_X86_64) && defined(PIC)
|
||||||
|
#define MANGLE(a) #a"(%%rip)"
|
||||||
#else
|
#else
|
||||||
#define MANGLE(a) #a
|
#define MANGLE(a) #a
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* !__MANGLE_H */
|
#endif /* !__MANGLE_H */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user