This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 2/5] Move _obstack_compat out of common
- From: Peter Collingbourne <pcc at google dot com>
- To: libc-alpha at sourceware dot org
- Cc: Peter Collingbourne <pcc at google dot com>
- Date: Mon, 13 May 2013 08:36:09 -0700
- Subject: [PATCH 2/5] Move _obstack_compat out of common
- References: <1368459372-2415-1-git-send-email-pcc at google dot com>
It is impossible to create an alias of a common symbol (as
compat_symbol does), because common symbols do not have a section or
an offset until linked. GNU as tolerates aliases of common symbols by
simply creating another common symbol, but other assemblers (notably
LLVM's integrated assembler) are less tolerant.
2013-05-13 Peter Collingbourne <pcc@google.com>
* malloc/obstack.c (_obstack_compat): Add initializer.
---
malloc/obstack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/malloc/obstack.c b/malloc/obstack.c
index 25a9051..c3c7db4 100644
--- a/malloc/obstack.c
+++ b/malloc/obstack.c
@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE;
/* A looong time ago (before 1994, anyway; we're not sure) this global variable
was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
library still exports it because somebody might use it. */
-struct obstack *_obstack_compat;
+struct obstack *_obstack_compat = 0;
compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
# endif
# endif
--
1.8.2.1