summaryrefslogtreecommitdiffstats
path: root/sys/lib/libsa/loadfile_elf.c
diff options
context:
space:
mode:
authorjasper <jasper@openbsd.org>2016-09-13 18:09:14 +0000
committerjasper <jasper@openbsd.org>2016-09-13 18:09:14 +0000
commit330b57871728a2ce24497ff11a127e699bfc1bb7 (patch)
tree95f40f2525e5e8f815a787a9b05fb5167d713af3 /sys/lib/libsa/loadfile_elf.c
parentA small amount more KNF to make this easier on our eyes. Not going further (diff)
downloadwireguard-openbsd-330b57871728a2ce24497ff11a127e699bfc1bb7.tar.xz
wireguard-openbsd-330b57871728a2ce24497ff11a127e699bfc1bb7.zip
when loading the kernel binary, also load the .SUNW_ctf section when present,
which holds the CTF data. ok mpi@
Diffstat (limited to 'sys/lib/libsa/loadfile_elf.c')
-rw-r--r--sys/lib/libsa/loadfile_elf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/lib/libsa/loadfile_elf.c b/sys/lib/libsa/loadfile_elf.c
index 432f977e712..413cd7a17b4 100644
--- a/sys/lib/libsa/loadfile_elf.c
+++ b/sys/lib/libsa/loadfile_elf.c
@@ -1,5 +1,5 @@
/* $NetBSD: loadfile.c,v 1.10 2000/12/03 02:53:04 tsutsui Exp $ */
-/* $OpenBSD: loadfile_elf.c,v 1.11 2015/05/19 20:39:12 miod Exp $ */
+/* $OpenBSD: loadfile_elf.c,v 1.12 2016/09/13 18:09:14 jasper Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -233,7 +233,8 @@ ELFNAME(exec)(int fd, Elf_Ehdr *elf, u_long *marks, int flags)
for (first = 1, i = 0; i < elf->e_shnum; i++) {
if (shp[i].sh_type == SHT_SYMTAB ||
shp[i].sh_type == SHT_STRTAB ||
- !strcmp(shstr + shp[i].sh_name, ".debug_line")) {
+ !strcmp(shstr + shp[i].sh_name, ".debug_line") ||
+ !strcmp(shstr + shp[i].sh_name, ".SUNW_ctf")) {
if (havesyms && (flags & LOAD_SYM)) {
PROGRESS(("%s%ld", first ? " [" : "+",
(u_long)shp[i].sh_size));