84be924362
Create libdl.so.1 as a filter for libc.so.7 which exports public dl* functions. The functions are resolved from the rtld instead, the goal of creating library is to avoid errors from the static linker due to missed libdl. For static binaries, an empty .o is compiled into libdl.a so that static binaries still get dl stubs from libc.a. Right now lld cannot create filter objects, disable libdl on arm64 when binutils are not used. Reviewed by: bdrewery, dim (previos version); emaste Exp run: PR 220525, done by antoine Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D11504
16 lines
264 B
Makefile
16 lines
264 B
Makefile
# $FreeBSD$
|
|
|
|
LIB=dl
|
|
SHLIB_MAJOR=1
|
|
|
|
.PATH: ${SRCTOP}/lib/libc/gen
|
|
CFLAGS+=-I${SRCTOP}/lib/libc/include
|
|
CFLAGS+=-DIN_LIBDL
|
|
LDFLAGS+=-Wl,-F,libc.so.7
|
|
VERSION_DEF=${SRCTOP}/lib/libc/Versions.def
|
|
SYMBOL_MAPS=${.CURDIR}/Symbol.map
|
|
|
|
SRCS = dlfcn.c
|
|
|
|
.include <bsd.lib.mk>
|