summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-28 21:33:56 +0000
committermidipix <writeonce@midipix.org>2024-02-28 21:33:56 +0000
commita2500c761ba3740dd416eaebac808f7c8d93aef7 (patch)
tree6339aa15914c2fc92846aac67e47383864a586c3
parent8192235a926ca89160e11658a42d6a994c3a86da (diff)
downloadslibtool-a2500c761ba3740dd416eaebac808f7c8d93aef7.tar.bz2
slibtool-a2500c761ba3740dd416eaebac808f7c8d93aef7.tar.xz
ar mode: -Wdlsyms: require an accompanying -Wdlunit argument.
-rw-r--r--include/slibtool/slibtool.h1
-rw-r--r--src/logic/slbt_exec_ar.c14
2 files changed, 14 insertions, 1 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index ffa41c2..bd5b31d 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -128,6 +128,7 @@ enum slbt_custom_error {
SLBT_ERR_AR_INVALID_ARMAP_STRING_TABLE,
SLBT_ERR_AR_INVALID_ARMAP_MEMBER_OFFSET,
SLBT_ERR_AR_INVALID_ARMAP_NAME_OFFSET,
+ SLBT_ERR_AR_DLUNIT_NOT_SPECIFIED,
SLBT_ERR_AR_OUTPUT_NOT_SPECIFIED,
SLBT_ERR_AR_OUTPUT_NOT_APPLICABLE,
};
diff --git a/src/logic/slbt_exec_ar.c b/src/logic/slbt_exec_ar.c
index 2abf7f2..ad8896c 100644
--- a/src/logic/slbt_exec_ar.c
+++ b/src/logic/slbt_exec_ar.c
@@ -307,7 +307,19 @@ int slbt_exec_ar(const struct slbt_driver_ctx * dctx)
(void)0;
} else if (cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_DLSYMS) {
- (void)0;
+ if (!cctx->dlunit)
+ slbt_dprintf(fderr,
+ "%s: missing -Wdlunit: generation of a dlsyms vtable "
+ "requires the name of the dynamic library, executable "
+ "program, or dynamic module for which the vtable would "
+ "be generated.\n",
+ dctx->program);
+
+ return slbt_exec_ar_fail(
+ ectx,meta,
+ SLBT_CUSTOM_ERROR(
+ dctx,
+ SLBT_ERR_AR_DLUNIT_NOT_SPECIFIED));
} else if (!(cctx->drvflags & SLBT_DRIVER_MODE_AR_ACTIONS)) {
if (cctx->drvflags & SLBT_DRIVER_VERBOSITY_ERRORS)