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

* Re: [PATCH] Avoid ld.so segfaults on R_PPC64_DTPREL64 relocations
  2003-06-17 11:56 [PATCH] Avoid ld.so segfaults on R_PPC64_DTPREL64 relocations Jakub Jelinek
@ 2003-06-18  4:29 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-06-18  4:29 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jakub Jelinek wrote:

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

Applied.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+7+o52ijCOnn/RHQRAj/dAKCErgHmpOEQqyk9ojEwMw3TkGTMJwCdE+im
pzWT/j8co70e+JCSn3u5EyE=
=YTlY
-----END PGP SIGNATURE-----

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