summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-28 08:12:48 +0000
committermidipix <writeonce@midipix.org>2024-02-28 08:14:33 +0000
commitdcf6a5f80a8bf402e0ba8bd61eaae7d06a9e46c6 (patch)
tree1e085e60b502ae12a9b7d3781d84a857f9c83374 /src
parent6f477a3ea989f0562514cbcdc282982018c55879 (diff)
downloadslibtool-dcf6a5f80a8bf402e0ba8bd61eaae7d06a9e46c6.tar.bz2
slibtool-dcf6a5f80a8bf402e0ba8bd61eaae7d06a9e46c6.tar.xz
ar mode: driver: added -Wdlsyms, -Wdlunit.
Diffstat (limited to 'src')
-rw-r--r--src/internal/slibtool_driver_impl.h2
-rw-r--r--src/logic/slbt_exec_ar.c15
-rw-r--r--src/skin/slbt_skin_ar.c13
3 files changed, 30 insertions, 0 deletions
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 656c113..b8aefb6 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -92,6 +92,8 @@ enum app_tags {
TAG_AR_CHECK,
TAG_AR_PRINT,
TAG_AR_MAPFILE,
+ TAG_AR_DLUNIT,
+ TAG_AR_DLSYMS,
TAG_AR_NOSORT,
TAG_AR_REGEX,
TAG_AR_PRETTY,
diff --git a/src/logic/slbt_exec_ar.c b/src/logic/slbt_exec_ar.c
index d36fdc8..2abf7f2 100644
--- a/src/logic/slbt_exec_ar.c
+++ b/src/logic/slbt_exec_ar.c
@@ -107,6 +107,10 @@ static int slbt_exec_ar_perform_archive_actions(
if (dctx->cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_MAPFILE)
if (slbt_au_output_mapfile((*arctxp)->meta) < 0)
return SLBT_NESTED_ERROR(dctx);
+
+ if (dctx->cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_DLSYMS)
+ if (slbt_au_output_dlsyms(arctxv,dctx->cctx->dlunit) < 0)
+ return SLBT_NESTED_ERROR(dctx);
}
if (dctx->cctx->drvflags & SLBT_DRIVER_MODE_AR_MERGE) {
@@ -237,6 +241,14 @@ int slbt_exec_ar(const struct slbt_driver_ctx * dctx)
ictx->cctx.fmtflags |= SLBT_OUTPUT_ARCHIVE_MAPFILE;
break;
+ case TAG_AR_DLSYMS:
+ ictx->cctx.fmtflags |= SLBT_OUTPUT_ARCHIVE_DLSYMS;
+ break;
+
+ case TAG_AR_DLUNIT:
+ ictx->cctx.dlunit = entry->arg;
+ break;
+
case TAG_AR_NOSORT:
ictx->cctx.fmtflags |= SLBT_OUTPUT_ARCHIVE_NOSORT;
break;
@@ -294,6 +306,9 @@ int slbt_exec_ar(const struct slbt_driver_ctx * dctx)
} else if (cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_MAPFILE) {
(void)0;
+ } else if (cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_DLSYMS) {
+ (void)0;
+
} else if (!(cctx->drvflags & SLBT_DRIVER_MODE_AR_ACTIONS)) {
if (cctx->drvflags & SLBT_DRIVER_VERBOSITY_ERRORS)
slbt_dprintf(fderr,
diff --git a/src/skin/slbt_skin_ar.c b/src/skin/slbt_skin_ar.c
index eecc5b9..948dcf3 100644
--- a/src/skin/slbt_skin_ar.c
+++ b/src/skin/slbt_skin_ar.c
@@ -51,6 +51,19 @@ const slbt_hidden struct argv_option slbt_ar_options[] = {
0,"<regexp>",
"filter armap symbols using the specified %s."},
+ {"Wdlunit", 0,TAG_AR_DLUNIT,ARGV_OPTARG_REQUIRED,
+ ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_SPACE,
+ 0,"<dlunit>",
+ "consider %s to be the name of "
+ "the dynamic library (libfoo), the program (foo), "
+ "or the loaded module (foo) for which "
+ "a compatible dlsym vtable should be created."},
+
+ {"Wdlsyms", 0,TAG_AR_DLSYMS,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,
+ 0,0,
+ "print out a compatible dlsyms vtable."},
+
{"Wnosort", 0,TAG_AR_NOSORT,ARGV_OPTARG_NONE,
ARGV_OPTION_HYBRID_ONLY,
0,0,