Sat May 16 16:43:15 2020 UTC ()
Fix debug build


(skrll)
diff -r1.68 -r1.69 src/libexec/ld.elf_so/headers.c

cvs diff -r1.68 -r1.69 src/libexec/ld.elf_so/headers.c (expand / switch to unified diff)

--- src/libexec/ld.elf_so/headers.c 2020/03/04 01:21:17 1.68
+++ src/libexec/ld.elf_so/headers.c 2020/05/16 16:43:15 1.69
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: headers.c,v 1.68 2020/03/04 01:21:17 thorpej Exp $ */ 1/* $NetBSD: headers.c,v 1.69 2020/05/16 16:43:15 skrll Exp $ */
2 2
3/* 3/*
4 * Copyright 1996 John D. Polstra. 4 * Copyright 1996 John D. Polstra.
5 * Copyright 1996 Matt Thomas <matt@3am-software.com> 5 * Copyright 1996 Matt Thomas <matt@3am-software.com>
6 * Copyright 2002 Charles M. Hannum <root@ihack.net> 6 * Copyright 2002 Charles M. Hannum <root@ihack.net>
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -30,27 +30,27 @@ @@ -30,27 +30,27 @@
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/* 35/*
36 * Dynamic linker for ELF. 36 * Dynamic linker for ELF.
37 * 37 *
38 * John Polstra <jdp@polstra.com>. 38 * John Polstra <jdp@polstra.com>.
39 */ 39 */
40 40
41#include <sys/cdefs.h> 41#include <sys/cdefs.h>
42#ifndef lint 42#ifndef lint
43__RCSID("$NetBSD: headers.c,v 1.68 2020/03/04 01:21:17 thorpej Exp $"); 43__RCSID("$NetBSD: headers.c,v 1.69 2020/05/16 16:43:15 skrll Exp $");
44#endif /* not lint */ 44#endif /* not lint */
45 45
46#include <err.h> 46#include <err.h>
47#include <errno.h> 47#include <errno.h>
48#include <fcntl.h> 48#include <fcntl.h>
49#include <stdarg.h> 49#include <stdarg.h>
50#include <stdio.h> 50#include <stdio.h>
51#include <stdlib.h> 51#include <stdlib.h>
52#include <string.h> 52#include <string.h>
53#include <unistd.h> 53#include <unistd.h>
54#include <sys/types.h> 54#include <sys/types.h>
55#include <sys/mman.h> 55#include <sys/mman.h>
56#include <sys/bitops.h> 56#include <sys/bitops.h>
@@ -230,27 +230,27 @@ _rtld_digest_dynamic(const char *execnam @@ -230,27 +230,27 @@ _rtld_digest_dynamic(const char *execnam
230 obj->bloom_gnu = (const Elf_Addr *)(hashtab + 4); 230 obj->bloom_gnu = (const Elf_Addr *)(hashtab + 4);
231 obj->chains_gnu = obj->buckets_gnu + nbuckets - symndx; 231 obj->chains_gnu = obj->buckets_gnu + nbuckets - symndx;
232 232
233 /* 233 /*
234 * Should really be in _rtld_relocate_objects, 234 * Should really be in _rtld_relocate_objects,
235 * but _rtld_symlook_obj might be used before. 235 * but _rtld_symlook_obj might be used before.
236 */ 236 */
237 fast_divide32_prepare(nbuckets, 237 fast_divide32_prepare(nbuckets,
238 &obj->nbuckets_m_gnu, 238 &obj->nbuckets_m_gnu,
239 &obj->nbuckets_s1_gnu, 239 &obj->nbuckets_s1_gnu,
240 &obj->nbuckets_s2_gnu); 240 &obj->nbuckets_s2_gnu);
241 241
242 dbg(("found GNU Hash: buckets=%p " 242 dbg(("found GNU Hash: buckets=%p "
243 "nbuckets=%lu chains=%p nchains=%u " 243 "nbuckets=%u chains=%p nchains=%lu "
244 "bloom=%p mask_bm=%u shift2=%u " 244 "bloom=%p mask_bm=%u shift2=%u "
245 "symndx=%u", 245 "symndx=%u",
246 obj->buckets_gnu, obj->nbuckets_gnu, 246 obj->buckets_gnu, obj->nbuckets_gnu,
247 obj->chains_gnu, obj->nchains_gnu, 247 obj->chains_gnu, obj->nchains_gnu,
248 obj->bloom_gnu, obj->mask_bm_gnu, 248 obj->bloom_gnu, obj->mask_bm_gnu,
249 obj->shift2_gnu, obj->symndx_gnu)); 249 obj->shift2_gnu, obj->symndx_gnu));
250 } 250 }
251 break; 251 break;
252 252
253 case DT_NEEDED: 253 case DT_NEEDED:
254 { 254 {
255 Needed_Entry *nep = NEW(Needed_Entry); 255 Needed_Entry *nep = NEW(Needed_Entry);
256 256