]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid unnecessary atexit reference
authorBernd Schmidt <bernds@redhat.com>
Tue, 3 Apr 2001 10:34:33 +0000 (10:34 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Tue, 3 Apr 2001 10:34:33 +0000 (10:34 +0000)
From-SVN: r41053

gcc/ChangeLog
gcc/config/i386/linux.h
gcc/crtstuff.c

index 95d5f35fb5ddb6e4f9f72fd927760b93a77a7398..78a2b8cb5f8caaad589b49585f89fd1e3701795c 100644 (file)
@@ -1,3 +1,10 @@
+2001-04-03  Bernd Schmidt  <bernds@redhat.com>
+
+       2001-03-16  Jakub Jelinek  <jakub@redhat.com>
+       * 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.
+
 2001-03-30  Bernd Schmidt  <bernds@redhat.com>
 
        * jump.c (delete_barrier_successors): Fix error in last change.
index 7b368f8e5fb84f24028a8cd2ec26a036161cb713..90b9aa26f0eed8b6bf0000fce54d78c3dffe3265 100644 (file)
@@ -234,3 +234,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
index ccebde1d2c981082fa22362218d4a93491a5e477..2d2f360bb756d7599a5da5ed818ae345be428ee4 100644 (file)
@@ -380,19 +380,8 @@ init_dummy (void)
 #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 ();
-  }
+#ifdef CRT_END_INIT_DUMMY
+  CRT_END_INIT_DUMMY;
 #endif
 }