On Tue, Dec 11, 2001 at 10:04:06AM +0100, Zdenek Kabelac wrote:
>
> This seems to be really constructive and you seemed to find something
> really important (Mike - what do you think now ? - are you still
> 100% sure that RH is innocent here ? )
oops it looks like mutt somehow forget (or it was me :))
to forward attachment so here we go with text version:
This is the mail archive of the [EMAIL PROTECTED] mailing list for the
GCC project.
[PATCH] Remove dead cruft from crtstuff.c (take 2)
* To: "H . J . Lu" <hjl at lucon dot org>
* Subject: [PATCH] Remove dead cruft from crtstuff.c (take 2)
* From: Jakub Jelinek <jakub at redhat dot com>
* Date: Fri, 16 Mar 2001 18:08:16 +0100
* Cc: rth at redhat dot com, gcc-patches at gcc dot gnu dot org
* References: <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
* Reply-To: Jakub Jelinek <jakub at redhat dot com>
------------------------------------------------------------------------
On Fri, Mar 16, 2001 at 07:51:07AM -0800, H . J . Lu wrote:
> On Fri, Mar 16, 2001 at 12:01:31PM +0100, Jakub Jelinek wrote:
> > Hi!
> >
> > As result of recent atexit changes in glibc using atexit in i386-linux
> > crtendS.o is bad (since if the shared library does not use atexit, it won't
> > be taken from libc_nonshared and shared library will thus end up with
> > non-versioned atexit reference).
> > According to H.J., this kludge was needed only for very very old Linux C
> > libraries and can be safely killed.
> > Ok to commit?
> >
>
> How about this patch? The old libc still needs it.
In that case, isn't it better to move it out of crtstuff.c into target
headers?
2001-03-16 Jakub Jelinek <[EMAIL PROTECTED]>
* crtstuff.c (init_dummy): Use CRT_END_INIT_DUMMY if defined.
Remove ia32 linux PIC kludge and move it...
* config/i386/linux.h (CRT_END_INIT_DUMMY): ...here.
--- gcc/config/i386/linux.h.jj Mon Mar 12 11:45:15 2001
+++ gcc/config/i386/linux.h Fri Mar 16 18:52:31 2001
@@ -170,3 +170,21 @@ Boston, MA 02111-1307, USA. */
} \
} while (0)
#endif
+
+#if defined(__PIC__) && defined (USE_GNULIBC_1)
+/* This is a kludge. The i386 GNU/Linux dynamic linker needs ___brk_addr,
+ __environ and atexit (). We have to make sure they are in the .dynsym
+ section. We accomplish it by making a dummy call here. This
+ code is never reached. */
+
+#define CRT_END_INIT_DUMMY \
+ do \
+ { \
+ extern void *___brk_addr; \
+ extern char **__environ; \
+ \
+ ___brk_addr = __environ; \
+ atexit (0); \
+ } \
+ while (0)
+#endif
--- gcc/crtstuff.c.jj Thu Mar 15 10:55:50 2001
+++ gcc/crtstuff.c Thu Mar 15 11:04:03 2001
@@ -414,20 +414,8 @@ init_dummy (void)
FORCE_INIT_SECTION_ALIGN;
#endif
asm (TEXT_SECTION_ASM_OP);
-
-/* This is a kludge. The i386 GNU/Linux dynamic linker needs ___brk_addr,
- __environ and atexit (). We have to make sure they are in the .dynsym
- section. We accomplish it by making a dummy call here. This
- code is never reached. */
-
-#if defined(__linux__) && defined(__PIC__) && defined(__i386__)
- {
- extern void *___brk_addr;
- extern char **__environ;
-
- ___brk_addr = __environ;
- atexit (0);
- }
+#ifdef CRT_END_INIT_DUMMY
+ CRT_END_INIT_DUMMY;
#endif
}
Jakub
------------------------------------------------------------------------
* Follow-Ups:
o Re: [PATCH] Remove dead cruft from crtstuff.c (take 2)
+ From: H . J . Lu
o Re: [PATCH] Remove dead cruft from crtstuff.c (take 2)
+ From: Richard Henderson
* References:
o [PATCH] Remove dead cruft from crtstuff.c
+ From: Jakub Jelinek
o Re: [PATCH] Remove dead cruft from crtstuff.c
+ From: H . J . Lu
--
.''`. Which fundamental human right do you want to give up today?
: :' : Debian GNU/Linux maintainer - www.debian.{org,cz}
`. `' Zdenek Kabelac kabi@{debian.org, users.sf.net, fi.muni.cz}
`- Resistance is futile. You all will be packaged
_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile