diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-22 00:08:27 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-22 00:08:27 +0000 |
commit | 5d89fbaa2e00a8a26e530306d76b78bf91d12ec8 (patch) | |
tree | 44d54f6dfbd0f6270fb0b1aba0195bc53db8bef4 /libbb/ptr_to_globals.c | |
parent | 9137341851f3ab89f5c6a54a6baff68f0f4a5e17 (diff) | |
download | busybox-w32-5d89fbaa2e00a8a26e530306d76b78bf91d12ec8.tar.gz busybox-w32-5d89fbaa2e00a8a26e530306d76b78bf91d12ec8.tar.bz2 busybox-w32-5d89fbaa2e00a8a26e530306d76b78bf91d12ec8.zip |
*: remove remaining instances of ".data" hack
Diffstat (limited to 'libbb/ptr_to_globals.c')
-rw-r--r-- | libbb/ptr_to_globals.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libbb/ptr_to_globals.c b/libbb/ptr_to_globals.c index 48cf8d86c..5f30e2a64 100644 --- a/libbb/ptr_to_globals.c +++ b/libbb/ptr_to_globals.c | |||
@@ -5,6 +5,8 @@ | |||
5 | * Licensed under GPLv2, see file LICENSE in this tarball for details. | 5 | * Licensed under GPLv2, see file LICENSE in this tarball for details. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <errno.h> | ||
9 | |||
8 | struct globals; | 10 | struct globals; |
9 | 11 | ||
10 | #ifndef GCC_COMBINE | 12 | #ifndef GCC_COMBINE |
@@ -13,12 +15,21 @@ struct globals; | |||
13 | * but here we make it live in R/W memory */ | 15 | * but here we make it live in R/W memory */ |
14 | struct globals *ptr_to_globals; | 16 | struct globals *ptr_to_globals; |
15 | 17 | ||
18 | #ifdef __GLIBC__ | ||
19 | int *bb_errno; | ||
20 | #endif | ||
21 | |||
22 | |||
16 | #else | 23 | #else |
17 | 24 | ||
25 | |||
18 | /* gcc -combine will see through and complain */ | 26 | /* gcc -combine will see through and complain */ |
19 | /* Using alternative method which is more likely to break | 27 | /* Using alternative method which is more likely to break |
20 | * on weird architectures, compilers, linkers and so on */ | 28 | * on weird architectures, compilers, linkers and so on */ |
21 | struct globals *const ptr_to_globals __attribute__ ((section (".data"))); | 29 | struct globals *const ptr_to_globals __attribute__ ((section (".data"))); |
22 | 30 | ||
31 | #ifdef __GLIBC__ | ||
32 | int *const bb_errno __attribute__ ((section (".data"))); | ||
23 | #endif | 33 | #endif |
24 | 34 | ||
35 | #endif | ||