From df7165b88e16a86e2f11567a27c3ed0e8ffc0e1e Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 19 Mar 2018 19:32:05 +0000 Subject: [PATCH] Given hidden visibility to symbols referenced by the DOF section. MFC after: 1 week --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c index cbd457f0c0b7..8dad7428722e 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c @@ -22,6 +22,7 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2017-2018 Mark Johnston */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -265,7 +266,7 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, dof_elf32_t *dep) sym->st_value = 0; sym->st_size = 0; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; @@ -449,7 +450,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, dof_elf64_t *dep) sym->st_value = 0; sym->st_size = 0; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++;