summary refs log tree commit diff
path: root/include/libc-symbols.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-03 23:04:10 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-03 23:04:10 +0000
commit5af3245a41d958c326c02e23473d44bb474602fb (patch)
treee6a145da16298ba18b815da27fb5da9c7adacf94 /include/libc-symbols.h
parentdb2d05f93ce7a790a1f50ed5b082539b566801e2 (diff)
downloadglibc-5af3245a41d958c326c02e23473d44bb474602fb.tar.gz
glibc-5af3245a41d958c326c02e23473d44bb474602fb.tar.xz
glibc-5af3245a41d958c326c02e23473d44bb474602fb.zip
Update.
2001-08-03  Tom Rix  <trix@redhat.com>

	* config.h.in: Add HAVE_XCOFF for AIX.
	* configure.in: Add --with-xcoff option.
	* include/libc-symbols.h: Disable the .stabs macros.
Diffstat (limited to 'include/libc-symbols.h')
-rw-r--r--include/libc-symbols.h36
1 files changed, 27 insertions, 9 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index fc510763f1..97b6726438 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -220,10 +220,18 @@
   static const char __evoke_link_warning_##symbol[]	\
     __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
 #  endif
-# else
-#  define link_warning(symbol, msg)		\
-  asm (".stabs \"" msg "\",30,0,0,0\n\t"	\
-       ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
+# else /* Not ELF: a.out */
+#  ifdef HAVE_XCOFF
+/* XCOFF does not support .stabs.
+   The native aix linker will remove the .stab and .stabstr sections
+   The gnu linker will have a fatal error if there is a relocation for
+   symbol in the .stab section.  Silently disable this macro.  */
+#   define link_warning(symbol, msg) 
+#  else
+#   define link_warning(symbol, msg)		\
+     asm (".stabs \"" msg "\",30,0,0,0\n\t"	\
+          ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
+#  endif /* XCOFF */
 # endif
 #else
 /* We will never be heard; they will all die horribly.  */
@@ -285,11 +293,21 @@
 
 # else	/* Not ELF: a.out.  */
 
-#  define text_set_element(set, symbol)	\
-  asm (".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
-#  define data_set_element(set, symbol)	\
-  asm (".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
-#  define bss_set_element(set, symbol)	?error Must use initialized data.
+#  ifdef HAVE_XCOFF
+/* XCOFF does not support .stabs.
+   The native aix linker will remove the .stab and .stabstr sections
+   The gnu linker will have a fatal error if there is a relocation for
+   symbol in the .stab section.  Silently disable these macros.  */
+#   define text_set_element(set, symbol) 
+#   define data_set_element(set, symbol) 
+#   define bss_set_element(set, symbol)	 
+#  else
+#   define text_set_element(set, symbol)	\
+    asm (".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
+#   define data_set_element(set, symbol)	\
+    asm (".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
+#   define bss_set_element(set, symbol)	?error Must use initialized data.
+#  endif /* XCOFF */
 #  define symbol_set_define(set)	void *const (set)[1];
 #  define symbol_set_declare(set)	extern void *const (set)[1];