From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14943 invoked by alias); 6 Apr 2003 18:50:27 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 14927 invoked from network); 6 Apr 2003 18:50:27 -0000 Received: from unknown (HELO localhost.localdomain) (195.113.19.66) by sources.redhat.com with SMTP; 6 Apr 2003 18:50:27 -0000 Received: from sunsite.mff.cuni.cz (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h36IoOqO000710; Sun, 6 Apr 2003 20:50:24 +0200 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.12.8/8.12.8/Submit) id h36IoOT9000708; Sun, 6 Apr 2003 20:50:24 +0200 Date: Sun, 06 Apr 2003 18:50:00 -0000 From: Jakub Jelinek To: Ulrich Drepper , Roland McGrath , aoliva@redhat.com Cc: Glibc hackers Subject: [PATCH] Fix prelink support on IA-32 and ARM Message-ID: <20030406185024.GV16629@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-04/txt/msg00024.txt.bz2 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 * 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 #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