summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-17 06:32:48 +0000
committermidipix <writeonce@midipix.org>2024-02-17 06:33:33 +0000
commit2dc23e0157138d12423ae15f8b18e1e5e56aeb14 (patch)
treef9674c0feb3914a11fad0f695915bbfe55b0f838 /src
parenta740e6c4518d810d98b58549cf1270ed410f2f14 (diff)
downloadslibtool-2dc23e0157138d12423ae15f8b18e1e5e56aeb14.tar.bz2
slibtool-2dc23e0157138d12423ae15f8b18e1e5e56aeb14.tar.xz
ar mode: utility: version script printing: added the -Wmapfile switch.
Diffstat (limited to 'src')
-rw-r--r--src/internal/slibtool_driver_impl.h1
-rw-r--r--src/logic/slbt_exec_ar.c11
-rw-r--r--src/skin/slbt_skin_ar.c8
3 files changed, 20 insertions, 0 deletions
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 848aa94..a2e079d 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -89,6 +89,7 @@ enum app_tags {
TAG_AR_VERSION,
TAG_AR_CHECK,
TAG_AR_PRINT,
+ TAG_AR_MAPFILE,
TAG_AR_REGEX,
TAG_AR_PRETTY,
TAG_AR_POSIX,
diff --git a/src/logic/slbt_exec_ar.c b/src/logic/slbt_exec_ar.c
index 8f6016f..35c8380 100644
--- a/src/logic/slbt_exec_ar.c
+++ b/src/logic/slbt_exec_ar.c
@@ -103,6 +103,10 @@ static int slbt_exec_ar_perform_archive_actions(
if (dctx->cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_SYMBOLS)
if (slbt_ar_output_symbols((*arctxp)->meta) < 0)
return SLBT_NESTED_ERROR(dctx);
+
+ if (dctx->cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_MAPFILE)
+ if (slbt_ar_output_mapfile((*arctxp)->meta) < 0)
+ return SLBT_NESTED_ERROR(dctx);
}
if (dctx->cctx->drvflags & SLBT_DRIVER_MODE_AR_MERGE) {
@@ -235,6 +239,10 @@ int slbt_exec_ar(
break;
+ case TAG_AR_MAPFILE:
+ ictx->cctx.fmtflags |= SLBT_OUTPUT_ARCHIVE_MAPFILE;
+ break;
+
case TAG_AR_REGEX:
ictx->cctx.regex = entry->arg;
break;
@@ -285,6 +293,9 @@ int slbt_exec_ar(
if (cctx->fmtflags & SLBT_DRIVER_MODE_AR_OUTPUTS) {
(void)0;
+ } else if (cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_MAPFILE) {
+ (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 58059aa..edd4247 100644
--- a/src/skin/slbt_skin_ar.c
+++ b/src/skin/slbt_skin_ar.c
@@ -36,6 +36,14 @@ const struct argv_option slbt_ar_options[] = {
"print out information pertaining to each archive file "
"and its various internal elements"},
+ {"Wmapfile", 0,TAG_AR_MAPFILE,ARGV_OPTARG_NONE,
+ ARGV_OPTION_HYBRID_ONLY,
+ 0,0,
+ "print out a map file (aka symbol file, aka version script); "
+ "including either all armap symbols (if no regex filter was "
+ "specified), or otherwise only the symbols that match the "
+ "specified regex filter."},
+
{"Wregex", 0,TAG_AR_REGEX,ARGV_OPTARG_REQUIRED,
ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_SPACE,
0,"<regexp>",