* debug/chk_fail.c (__chk_fail): Add a while (1) loop around
authorUlrich Drepper <drepper@redhat.com>
Sat, 12 Feb 2005 23:17:03 +0000 (23:17 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 12 Feb 2005 23:17:03 +0000 (23:17 +0000)
__libc_message to kill GCC warning about noreturn function returning.

* elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag
before relocating ld.so again.

* elf/rtld.c (_dl_start): Set bootstrap_map.l_relocated even
for already prelinked ld.so.

ChangeLog
debug/chk_fail.c
elf/rtld.c

index 2be28bacb5e8c950101452b74a4a6e227f7626eb..78927b47aeed485c52570352e4bb35d30009c056 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-02-11  Jakub Jelinek  <jakub@redhat.com>
+
+       * debug/chk_fail.c (__chk_fail): Add a while (1) loop around
+       __libc_message to kill GCC warning about noreturn function returning.
+
+       * elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag
+       before relocating ld.so again.
+
+       * elf/rtld.c (_dl_start): Set bootstrap_map.l_relocated even
+       for already prelinked ld.so.
+
 2005-02-11  Roland McGrath  <roland@redhat.com>
 
        [BZ #715]
index 29df08b9cae9c24674f49dd557624bdfb7a4708a..6921ca4686bd112bc4cce282afea6800c9e4e84c 100644 (file)
@@ -26,7 +26,9 @@ void
 __attribute__ ((noreturn))
 __chk_fail (void)
 {
-  __libc_message (1, "*** buffer overflow detected ***: %s terminated\n",
-                 __libc_argv[0] ?: "<unknown>");
+  /* The loop is added only to keep gcc happy.  */
+  while (1)
+    __libc_message (1, "*** buffer overflow detected ***: %s terminated\n",
+                   __libc_argv[0] ?: "<unknown>");
 }
 libc_hidden_def (__chk_fail)
index 6a1216d12db8d9d4bd16539c0627afad788e43bf..fbb4e4c3f2f90d225e016193585d60f61981dcb0 100644 (file)
@@ -1919,10 +1919,13 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
 
              if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
                  && GL(dl_rtld_map).l_opencount > 1)
-               _dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope,
-                                    0, 0);
-           }
-
+               {
+                 /* Mark the link map as not yet relocated again.  */
+                 GL(dl_rtld_map).l_relocated = 0;
+                 _dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope,
+                                      0, 0);
+               }
+            }
 #define VERNEEDTAG (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (DT_VERNEED))
          if (version_info)
            {