summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2015-02-18 03:54:54 +0000
committermarkj <markj@FreeBSD.org>2015-02-18 03:54:54 +0000
commit766a186dd8a6ed0ec8d2ba9f2ac7e4f7d8b7e85c (patch)
tree5ef309e19daa5a505406b7f2926c31f722790437 /share
parentda9de450af5aa5a374c543d89f57cc4ba3edc7bb (diff)
downloadFreeBSD-src-766a186dd8a6ed0ec8d2ba9f2ac7e4f7d8b7e85c.zip
FreeBSD-src-766a186dd8a6ed0ec8d2ba9f2ac7e4f7d8b7e85c.tar.gz
Remove drti.o's dependency on libelf. This makes it possible to add DTrace
probes to userland programs and libraries without also needing to link libelf. dtrace -G places the __SUNW_dof symbol at the beginning of the DOF (DTrace probe and provider metdata) section in the generated object file; drti.o now just uses this symbol to locate the section. A complication occurs when multiple dtrace-generated object files are linked together, since the __SUNW_dof symbol defined in each file is global. This is handled by using objcopy(1) to convert __SUNW_dof to a local symbol once drti.o has been linked with the generated object file. Upstream, this is done using a linker feature not present in GNU ld. Differential Revision: https://reviews.freebsd.org/D1757 Reviewed by: rpaulo MFC after: 1 month Relnotes: yes
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.dep.mk3
1 files changed, 0 insertions, 3 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index a43df82..407158c 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -121,10 +121,7 @@ ${_YC:R}.o: ${_YC}
.endfor
# DTrace probe definitions
-# libelf is currently needed for drti.o
.if ${SRCS:M*.d}
-LDADD+= -lelf
-DPADD+= ${LIBELF}
CFLAGS+= -I${.OBJDIR}
.endif
.for _DSRC in ${SRCS:M*.d:N*/*}
OpenPOWER on IntegriCloud