aboutsummaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2024-04-16 17:00:54 +0000
committerBrooks Davis <brooks@FreeBSD.org>2024-04-16 21:14:20 +0000
commit0dd2f4a0cca9332784d6a233dee8d211517fe7ba (patch)
treec1571af2bd19831f05b2652d627b14f033e8ba58 /lib/libc
parent1719886f6d08408b834d270c59ffcfd821c8f63a (diff)
downloadsrc-0dd2f4a0cca9332784d6a233dee8d211517fe7ba.tar.gz
src-0dd2f4a0cca9332784d6a233dee8d211517fe7ba.zip
libc: only export hesiod symbols when enabled
Create a seperate symbol file for hesiod and conditionally include it. This allows linkage with --no-undefined-version. Differential Revision: https://reviews.freebsd.org/D44184
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/Makefile.inc1
-rw-r--r--lib/libc/net/Symbol.hesiod.map12
-rw-r--r--lib/libc/net/Symbol.map10
3 files changed, 13 insertions, 10 deletions
diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc
index 1305500176a3..cd4ccaefac92 100644
--- a/lib/libc/net/Makefile.inc
+++ b/lib/libc/net/Makefile.inc
@@ -168,6 +168,7 @@ MLINKS+=sourcefilter.3 setipv4sourcefilter.3 \
.if ${MK_HESIOD} != "no"
SRCS+= hesiod.c
+SYM_MAPS+=${LIBC_SRCTOP}/net/Symbol.hesiod.map
MAN+= hesiod.3
MLINKS+=hesiod.3 hesiod_init.3 \
hesiod.3 hesiod_resolve.3 \
diff --git a/lib/libc/net/Symbol.hesiod.map b/lib/libc/net/Symbol.hesiod.map
new file mode 100644
index 000000000000..bb020c969ee9
--- /dev/null
+++ b/lib/libc/net/Symbol.hesiod.map
@@ -0,0 +1,12 @@
+FBSD_1.0 {
+ hesiod_init;
+ hesiod_end;
+ hesiod_to_bind;
+ hesiod_resolve;
+ hesiod_free_list;
+ hes_init;
+ hes_to_bind;
+ hes_resolve;
+ hes_error;
+ hes_free;
+};
diff --git a/lib/libc/net/Symbol.map b/lib/libc/net/Symbol.map
index 4831868c0e55..454ce8486986 100644
--- a/lib/libc/net/Symbol.map
+++ b/lib/libc/net/Symbol.map
@@ -54,16 +54,6 @@ FBSD_1.0 {
endservent;
getservent;
getservent_r;
- hesiod_init;
- hesiod_end;
- hesiod_to_bind;
- hesiod_resolve;
- hesiod_free_list;
- hes_init;
- hes_to_bind;
- hes_resolve;
- hes_error;
- hes_free;
htonl;
htons;
ntohl;