This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Remove use of INTDEF/INTUSE in csu
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 1 Jun 2012 10:47:43 -0700 (PDT)
- Subject: Re: [PATCH] Remove use of INTDEF/INTUSE in csu
- References: <m21ulzp38j.fsf@igel.home>
> Perhaps the __GI_ prefix should be produced by a macro.
That does seem better. But there are still some places where it might be
difficult to do that, like syscalls.list entries.
> @@ -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)
What calls these from C so that we actually need these declarations?
> DWtype
> -__divdi3 (DWtype u, DWtype v)
> +___divdi3 (DWtype u, DWtype v)
Yet more underscores are just too hard to read.
Better to name it __divdi3_compat or something like that.
> @@ -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
Why don't these just use the definition names (__divdi3_compat or whatever)?
Thanks,
Roland