Re: help needed for defining hppa __clz_tab gcc-compat symbol
On Thu, Feb 27, 2003 at 01:31:30PM -0800, Randolph Chung wrote:
> > +libc {
> > + GLIBC_2.2 {
> > + # libgcc-compat.
> > + __clz_tab;
> > + }
> > +}
> >
> > Does this help?
>
> nope :(
The attached patch seems to give the correct symbol visibility for me.
-- Guido
Index: sysdeps/hppa/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/hppa/Makefile,v
retrieving revision 1.5
diff -u -u -r1.5 Makefile
--- sysdeps/hppa/Makefile 19 Nov 2002 06:41:05 -0000 1.5
+++ sysdeps/hppa/Makefile 28 Feb 2003 00:34:54 -0000
@@ -31,3 +31,11 @@
dl-routines += dl-symaddr dl-fptr
rtld-routines += dl-symaddr dl-fptr
endif
+
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif
Index: sysdeps/hppa/Versions
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/hppa/Versions,v
retrieving revision 1.3
diff -u -u -r1.3 Versions
--- sysdeps/hppa/Versions 1 Feb 2002 23:14:50 -0000 1.3
+++ sysdeps/hppa/Versions 28 Feb 2003 00:34:54 -0000
@@ -5,3 +5,9 @@
_dl_function_address;
}
}
+libc {
+ GLIBC_2.2 {
+ # libgcc-compat
+ __clz_tab;
+ }
+}
--- /dev/null 2003-02-09 23:01:56.000000000 -0700
+++ sysdeps/hppa/libgcc-compat.c 2003-02-28 15:37:09.000000000 -0700
@@ -0,0 +1,20 @@
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
+
+typedef unsigned int UQItype __attribute__ ((mode (QI)));
+const UQItype __clz_tab_internal[] =
+{
+ 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+};
+symbol_version (__clz_tab_internal, __clz_tab, GLIBC_2.2);
+
+#endif
Reply to: