1 | /* $Id: symvers.h 70936 2018-02-09 15:55:18Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * IPRT - Linux symver and compatibility definitions.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2008-2017 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * The contents of this file may alternatively be used under the terms
|
---|
18 | * of the Common Development and Distribution License Version 1.0
|
---|
19 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | * CDDL are applicable instead of those of the GPL.
|
---|
22 | *
|
---|
23 | * You may elect to license modified versions of this file under the
|
---|
24 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | */
|
---|
26 |
|
---|
27 | /* Various tricks to produce binaries which can be run on old Linux
|
---|
28 | * distributions. This will almost certainly need updating as time
|
---|
29 | * goes by. */
|
---|
30 |
|
---|
31 | #ifndef ___iprt_linux_symvers_h
|
---|
32 | #define ___iprt_linux_symvers_h
|
---|
33 |
|
---|
34 | /* Please use -fno-stack-protector on the command line to avoid stack check
|
---|
35 | * functions which are not available in EL3 for 32-bit builds. */
|
---|
36 |
|
---|
37 | /* Use versions of glibc symbols which are available in 32-bit EL3 or
|
---|
38 | * 64-bit EL4. Currently only those symbols needed by the Additions,
|
---|
39 | * though this could probably be extended to work for host builds too. */
|
---|
40 | #if defined(RT_ARCH_AMD64)
|
---|
41 | __asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
|
---|
42 | __asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2.5");
|
---|
43 | #else /* RT_ARCH_X86 */
|
---|
44 | __asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2");
|
---|
45 | #endif
|
---|
46 |
|
---|
47 | /* Do not use *_chk functions */
|
---|
48 | #undef _FORTIFY_SOURCE
|
---|
49 |
|
---|
50 | /* Do not use __isoc99_* functions */
|
---|
51 | #undef __USE_GNU
|
---|
52 | #define __USE_GNU 1
|
---|
53 |
|
---|
54 | /* Tell IPRT not to use newer functions */
|
---|
55 | #include <features.h>
|
---|
56 | #undef __GLIBC_MINOR__
|
---|
57 | #define __GLIBC_MINOR__ 3
|
---|
58 | #endif /* ___iprt_linux_symvers_h */
|
---|