public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Avoid ld.so segfaults on R_PPC64_DTPREL64 relocations
@ 2003-06-17 11:56 Jakub Jelinek
  2003-06-18  4:29 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2003-06-17 11:56 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

Hi!

Found during prelink testing on ppc64.

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

	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela)
	<case R_PPC64_DTPREL64>: Don't segfault on undefined symbols.

--- libc/sysdeps/powerpc/powerpc64/dl-machine.h.jj	2003-06-16 14:26:29.000000000 -0400
+++ libc/sysdeps/powerpc/powerpc64/dl-machine.h	2003-06-17 05:42:16.000000000 -0400
@@ -653,7 +653,8 @@ elf_machine_rela (struct link_map *map,
       /* During relocation all TLS symbols are defined and used.
          Therefore the offset is already correct.  */
 # ifndef RTLD_BOOTSTRAP
-      *reloc_addr = TLS_DTPREL_VALUE (sym, reloc);
+      if (sym_map != NULL)
+	*reloc_addr = TLS_DTPREL_VALUE (sym, reloc);
 # endif
       return;
 

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-18  4:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-17 11:56 [PATCH] Avoid ld.so segfaults on R_PPC64_DTPREL64 relocations Jakub Jelinek
2003-06-18  4:29 ` Ulrich Drepper

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).