This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Remove use of INTDEF/INTUSE in csu
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: libc-alpha at sourceware dot org
- Date: Fri, 01 Jun 2012 15:32:12 +0200
- Subject: [PATCH] Remove use of INTDEF/INTUSE in csu
The .hidden directives in libgcc-compat.S were inactive since the
removal of have-protected in 2006, and don't appear to serve a purpose,
since it is shared-only.
Perhaps the __GI_ prefix should be produced by a macro.
Andreas.
[BZ #14132]
* sysdeps/powerpc/powerpc32/Makefile (CPPFLAGS-libgcc-compat.S):
Remove.
* sysdeps/powerpc/powerpc32/libgcc-compat.S: Remove use of INTUSE.
Use compat_symbol instead of .symver. Remove unneeded .hidden.
* sysdeps/wordsize-32/divdi3.c (__divdi3, __moddi3, __udivdi3)
(__umoddi3): Declare hidden proto.
(__divdi3_internal, __moddi3_internal, __udivdi3_internal)
(__umoddi3_internal) Remove aliases.
(___divdi3, ___moddi3, ___udivdi3, ___umoddi3): Renamed from
__divdi3, __moddi3, __udivdi3, __umoddi3, resp, add
libc_hidden_ver, and use as second argument of compat_symbol.
* sysdeps/wordsize-32/symbol-hacks.h: Use __GI_ prefix instead of
_internal suffix.
---
sysdeps/powerpc/powerpc32/Makefile | 3 --
sysdeps/powerpc/powerpc32/libgcc-compat.S | 50 +++++++----------------------
sysdeps/wordsize-32/divdi3.c | 31 ++++++++++--------
sysdeps/wordsize-32/symbol-hacks.h | 10 +++---
4 files changed, 34 insertions(+), 60 deletions(-)
diff --git a/sysdeps/powerpc/powerpc32/Makefile b/sysdeps/powerpc/powerpc32/Makefile
index 64f7900..e36dfb3 100644
--- a/sysdeps/powerpc/powerpc32/Makefile
+++ b/sysdeps/powerpc/powerpc32/Makefile
@@ -31,9 +31,6 @@ CFLAGS-gmon-start.o = -G0
ifeq (yes,$(build-shared))
# Compatibility
-ifeq (yes,$(have-protected))
-CPPFLAGS-libgcc-compat.S = -DHAVE_DOT_HIDDEN
-endif
sysdep_routines += libgcc-compat
shared-only-routines += libgcc-compat
endif
diff --git a/sysdeps/powerpc/powerpc32/libgcc-compat.S b/sysdeps/powerpc/powerpc32/libgcc-compat.S
index b39f23e..56e26ef 100644
--- a/sysdeps/powerpc/powerpc32/libgcc-compat.S
+++ b/sysdeps/powerpc/powerpc32/libgcc-compat.S
@@ -1,5 +1,5 @@
/* pre-.hidden libgcc compatibility
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,43 +22,17 @@
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_6)
-#define __ashldi3_v_glibc20 INTUSE (__ashldi3)
-#define __ashrdi3_v_glibc20 INTUSE (__ashrdi3)
-#define __lshrdi3_v_glibc20 INTUSE (__lshrdi3)
-#define __cmpdi2_v_glibc20 INTUSE (__cmpdi2)
-#define __ucmpdi2_v_glibc20 INTUSE (__ucmpdi2)
-#define __fixdfdi_v_glibc20 INTUSE (__fixdfdi)
-#define __fixsfdi_v_glibc20 INTUSE (__fixsfdi)
-#define __fixunsdfdi_v_glibc20 INTUSE (__fixunsdfdi)
-#define __fixunssfdi_v_glibc20 INTUSE (__fixunssfdi)
-#define __floatdidf_v_glibc20 INTUSE (__floatdidf)
-#define __floatdisf_v_glibc20 INTUSE (__floatdisf)
-
- .symver __ashldi3_v_glibc20,__ashldi3@GLIBC_2.0
- .symver __ashrdi3_v_glibc20,__ashrdi3@GLIBC_2.0
- .symver __lshrdi3_v_glibc20,__lshrdi3@GLIBC_2.0
- .symver __cmpdi2_v_glibc20,__cmpdi2@GLIBC_2.0
- .symver __ucmpdi2_v_glibc20,__ucmpdi2@GLIBC_2.0
- .symver __fixdfdi_v_glibc20,__fixdfdi@GLIBC_2.0
- .symver __fixunsdfdi_v_glibc20,__fixunsdfdi@GLIBC_2.0
- .symver __fixsfdi_v_glibc20,__fixsfdi@GLIBC_2.0
- .symver __fixunssfdi_v_glibc20,__fixunssfdi@GLIBC_2.0
- .symver __floatdidf_v_glibc20,__floatdidf@GLIBC_2.0
- .symver __floatdisf_v_glibc20,__floatdisf@GLIBC_2.0
-
-#ifdef HAVE_DOT_HIDDEN
- .hidden __ashldi3
- .hidden __ashrdi3
- .hidden __lshrdi3
- .hidden __cmpdi2
- .hidden __ucmpdi2
- .hidden __fixdfdi
- .hidden __fixsfdi
- .hidden __fixunsdfdi
- .hidden __fixunssfdi
- .hidden __floatdidf
- .hidden __floatdisf
-#endif
+compat_symbol (libc, __ashldi3_v_glibc20, __ashldi3, GLIBC_2_0)
+compat_symbol (libc, __ashrdi3_v_glibc20, __ashrdi3, GLIBC_2_0)
+compat_symbol (libc, __lshrdi3_v_glibc20, __lshrdi3, GLIBC_2_0)
+compat_symbol (libc, __cmpdi2_v_glibc20, __cmpdi2, GLIBC_2_0)
+compat_symbol (libc, __ucmpdi2_v_glibc20, __ucmpdi2, GLIBC_2_0)
+compat_symbol (libc, __fixdfdi_v_glibc20, __fixdfdi, GLIBC_2_0)
+compat_symbol (libc, __fixunsdfdi_v_glibc20, __fixunsdfdi, GLIBC_2_0)
+compat_symbol (libc, __fixsfdi_v_glibc20, __fixsfdi, GLIBC_2_0)
+compat_symbol (libc, __fixunssfdi_v_glibc20, __fixunssfdi, GLIBC_2_0)
+compat_symbol (libc, __floatdidf_v_glibc20, __floatdidf, GLIBC_2_0)
+compat_symbol (libc, __floatdisf_v_glibc20, __floatdisf, GLIBC_2_0)
.section ".text"
diff --git a/sysdeps/wordsize-32/divdi3.c b/sysdeps/wordsize-32/divdi3.c
index 1645b7c..6e0c77a 100644
--- a/sysdeps/wordsize-32/divdi3.c
+++ b/sysdeps/wordsize-32/divdi3.c
@@ -1,6 +1,5 @@
/* 64-bit multiplication and division
- Copyright (C) 1989, 1992-1999,2000,2001,2002,2003,2004,2005,2012
- Free Software Foundation, Inc.
+ Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -54,6 +53,10 @@ extern DWtype __divdi3 (DWtype u, DWtype v);
extern DWtype __moddi3 (DWtype u, DWtype v);
extern UDWtype __udivdi3 (UDWtype u, UDWtype v);
extern UDWtype __umoddi3 (UDWtype u, UDWtype v);
+libc_hidden_proto (__divdi3)
+libc_hidden_proto (__moddi3)
+libc_hidden_proto (__udivdi3)
+libc_hidden_proto (__umoddi3)
static UDWtype
__udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp)
@@ -273,7 +276,7 @@ __udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp)
}
DWtype
-__divdi3 (DWtype u, DWtype v)
+___divdi3 (DWtype u, DWtype v)
{
Wtype c = 0;
DWtype w;
@@ -293,10 +296,10 @@ __divdi3 (DWtype u, DWtype v)
w = -w;
return w;
}
-strong_alias (__divdi3, __divdi3_internal)
+libc_hidden_ver (___divdi3, __divdi3)
DWtype
-__moddi3 (DWtype u, DWtype v)
+___moddi3 (DWtype u, DWtype v)
{
Wtype c = 0;
DWtype w;
@@ -313,31 +316,31 @@ __moddi3 (DWtype u, DWtype v)
w = -w;
return w;
}
-strong_alias (__moddi3, __moddi3_internal)
+libc_hidden_ver (___moddi3, __moddi3)
UDWtype
-__udivdi3 (UDWtype u, UDWtype v)
+___udivdi3 (UDWtype u, UDWtype v)
{
return __udivmoddi4 (u, v, NULL);
}
-strong_alias (__udivdi3, __udivdi3_internal)
+libc_hidden_ver (___udivdi3, __udivdi3)
UDWtype
-__umoddi3 (UDWtype u, UDWtype v)
+___umoddi3 (UDWtype u, UDWtype v)
{
UDWtype w;
__udivmoddi4 (u, v, &w);
return w;
}
-strong_alias (__umoddi3, __umoddi3_internal)
+libc_hidden_ver (___umoddi3, __umoddi3)
/* We declare these with compat_symbol so that they are not visible at
link time. Programs must use the functions from libgcc. */
#if defined SHARED && defined DO_VERSIONING
# include <shlib-compat.h>
-compat_symbol (libc, __divdi3, __divdi3, GLIBC_2_0);
-compat_symbol (libc, __moddi3, __moddi3, GLIBC_2_0);
-compat_symbol (libc, __udivdi3, __udivdi3, GLIBC_2_0);
-compat_symbol (libc, __umoddi3, __umoddi3, GLIBC_2_0);
+compat_symbol (libc, ___divdi3, __divdi3, GLIBC_2_0);
+compat_symbol (libc, ___moddi3, __moddi3, GLIBC_2_0);
+compat_symbol (libc, ___udivdi3, __udivdi3, GLIBC_2_0);
+compat_symbol (libc, ___umoddi3, __umoddi3, GLIBC_2_0);
#endif
diff --git a/sysdeps/wordsize-32/symbol-hacks.h b/sysdeps/wordsize-32/symbol-hacks.h
index 52a14fc..94dec0b 100644
--- a/sysdeps/wordsize-32/symbol-hacks.h
+++ b/sysdeps/wordsize-32/symbol-hacks.h
@@ -1,5 +1,5 @@
/* Hacks needed for symbol manipulation.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,8 +22,8 @@
task which might not be worth it so we play tricks with the
assembler. */
#if !defined __ASSEMBLER__ && !defined in_divdi3_c && !defined NOT_IN_libc && defined SHARED
-asm ("__divdi3 = __divdi3_internal");
-asm ("__udivdi3 = __udivdi3_internal");
-asm ("__moddi3 = __moddi3_internal");
-asm ("__umoddi3 = __umoddi3_internal");
+asm ("__divdi3 = __GI___divdi3");
+asm ("__udivdi3 = __GI___udivdi3");
+asm ("__moddi3 = __GI___moddi3");
+asm ("__umoddi3 = __GI___umoddi3");
#endif
--
1.7.10.3
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."