public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix prelink support on IA-32 and ARM
@ 2003-04-06 18:50 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2003-04-06 18:50 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath, aoliva; +Cc: Glibc hackers

Hi!

IA-32 and ARM define ELF_MACHINE_NO_RELA if RTLD_BOOTSTRAP (because ld.so
on those arches really never needs to handle RELA relocations), so the
2003-03-14 change means that although prelinking could be used, ld.so would
do the relocation processing on IA-32 and ARM anyway.

2003-04-06  Jakub Jelinek  <jakub@redhat.com>

	* elf/rtld.c: Revert 2003-03-14 change.
	* elf/dl-conflict.c (_dl_resolve_conflicts): Move
	#if ! ELF_MACHINE_NO_RELA conditional into the routine.

--- libc/elf/rtld.c.jj	2003-03-20 05:58:48.000000000 -0500
+++ libc/elf/rtld.c	2003-04-06 14:45:41.000000000 -0400
@@ -1444,7 +1444,6 @@ cannot allocate TLS data structures for 
 	_dl_printf ("\nprelink checking: %s\n", prelinked ? "ok" : "failed");
     }
 
-#if ! ELF_MACHINE_NO_RELA /* We don't REL-only prelink.  */
   if (prelinked)
     {
       struct link_map *l;
@@ -1477,7 +1476,6 @@ cannot allocate TLS data structures for 
       _dl_sysdep_start_cleanup ();
     }
   else
-#endif
     {
       /* Now we have all the objects loaded.  Relocate them all except for
 	 the dynamic linker itself.  We do this in reverse order so that copy
--- libc/elf/dl-conflict.c.jj	2003-03-20 05:58:48.000000000 -0500
+++ libc/elf/dl-conflict.c	2003-04-06 14:46:12.000000000 -0400
@@ -28,11 +28,11 @@
 #include <sys/types.h>
 #include "dynamic-link.h"
 
-#if ! ELF_MACHINE_NO_RELA
 void
 _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
 		       ElfW(Rela) *conflictend)
 {
+#if ! ELF_MACHINE_NO_RELA
   if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0))
     _dl_printf ("\nconflict processing: %s\n",
 		l->l_name[0] ? l->l_name : rtld_progname);
@@ -64,5 +64,5 @@ _dl_resolve_conflicts (struct link_map *
     for (; conflict < conflictend; ++conflict)
       elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset);
   }
-}
 #endif
+}

	Jakub

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-04-06 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-06 18:50 [PATCH] Fix prelink support on IA-32 and ARM Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).