mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-06 00:31:14 +01:00
build: Generate the map file from the configured ABI
Some linkers require the map file definitions to contain only symbols that are present on the linked object, either in the map file or in the sym file we generate from the map file. This is preparatory work to be able to conditionally include symbols in the man and sym files depending on the ABI definitions.
This commit is contained in:
parent
10920c3084
commit
19e06407eb
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,6 +11,7 @@ ChangeLog
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.sym
|
||||
*.map
|
||||
.dirstamp
|
||||
.deps/
|
||||
.libs/
|
||||
|
@ -28,7 +28,7 @@ libbsd_la_included_sources = \
|
||||
|
||||
CLEANFILES =
|
||||
EXTRA_DIST = \
|
||||
libbsd.map \
|
||||
libbsd.map.in \
|
||||
libbsd.pc.in \
|
||||
libbsd-ctor.pc.in \
|
||||
libbsd-overlay.pc.in \
|
||||
@ -53,6 +53,7 @@ endif
|
||||
EXTRA_libbsd_la_DEPENDENCIES = \
|
||||
$(libbsd_la_included_sources) \
|
||||
libbsd.map \
|
||||
libbsd.map.in \
|
||||
# EOL
|
||||
libbsd_la_LIBADD = \
|
||||
$(MD5_LIBS) \
|
||||
@ -64,7 +65,7 @@ libbsd_la_LDFLAGS = \
|
||||
# EOL
|
||||
if HAVE_LINKER_VERSION_SCRIPT
|
||||
libbsd_la_LDFLAGS += \
|
||||
-Wl,--version-script=$(srcdir)/libbsd.map \
|
||||
-Wl,--version-script=libbsd.map \
|
||||
# EOL
|
||||
else
|
||||
libbsd_la_LDFLAGS += \
|
||||
@ -194,12 +195,18 @@ endif
|
||||
|
||||
DISTCLEANFILES = \
|
||||
libbsd.sym \
|
||||
libbsd.map \
|
||||
# EOL
|
||||
|
||||
libbsd_ctor_a_SOURCES = \
|
||||
setproctitle_ctor.c \
|
||||
# EOL
|
||||
|
||||
# Generate the library map file with the pre-processor to selectively include
|
||||
# symbols depending on the host system, otherwise some linkers might fail.
|
||||
libbsd.map: libbsd.map.in
|
||||
$(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -P - <$(srcdir)/libbsd.map.in >$@
|
||||
|
||||
# Generate a simple libtool symbol export list to be used as a fallback if
|
||||
# there is no version script support.
|
||||
libbsd.sym: libbsd.map
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "config.h"
|
||||
|
||||
LIBBSD_0.0 {
|
||||
global:
|
||||
arc4random;
|
Loading…
Reference in New Issue
Block a user