Module Name:    src
Committed By:   rin
Date:           Sat Apr 13 00:23:32 UTC 2019

Modified Files:
        src/libexec/ld.elf_so: tls.c

Log Message:
Do not compile __tls_get_addr() into ldd(1), which fixes ldd(1) crashing
on arm after switching to new jemalloc.

jemalloc invokes __tls_get_addr() under some condition. If anything other
than ld.elf_so nor libc exports it, inconsistency arises as a result.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/libexec/ld.elf_so/tls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/tls.c
diff -u src/libexec/ld.elf_so/tls.c:1.11 src/libexec/ld.elf_so/tls.c:1.12
--- src/libexec/ld.elf_so/tls.c:1.11	Thu Jul 13 14:10:38 2017
+++ src/libexec/ld.elf_so/tls.c	Sat Apr 13 00:23:32 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.11 2017/07/13 14:10:38 joerg Exp $	*/
+/*	$NetBSD: tls.c,v 1.12 2019/04/13 00:23:32 rin Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tls.c,v 1.11 2017/07/13 14:10:38 joerg Exp $");
+__RCSID("$NetBSD: tls.c,v 1.12 2019/04/13 00:23:32 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/ucontext.h>
@@ -276,7 +276,7 @@ _rtld_tls_offset_free(Obj_Entry *obj)
 	return;
 }
 
-#ifdef __HAVE_COMMON___TLS_GET_ADDR
+#if defined(__HAVE_COMMON___TLS_GET_ADDR) && defined(RTLD_LOADER)
 /*
  * The fast path is access to an already allocated DTV entry.
  * This checks the current limit and the entry without needing any

Reply via email to