summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/pe_amain.c4
-rw-r--r--src/driver/pe_driver_ctx.c11
2 files changed, 15 insertions, 0 deletions
diff --git a/src/driver/pe_amain.c b/src/driver/pe_amain.c
index 5b85bef..76c986f 100644
--- a/src/driver/pe_amain.c
+++ b/src/driver/pe_amain.c
@@ -105,6 +105,10 @@ int pe_main(char ** argv, char ** envp, const struct pe_fd_ctx * fdctx)
pe_cmd_common(dctx,pe_cmd_size);
break;
+ case PERK_CMD_RANLIB:
+ pe_cmd_common(dctx,pe_cmd_ranlib);
+ break;
+
case PERK_CMD_AR:
arflags = dctx->cctx->drvflags;
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c
index 43dc0b3..8e652af 100644
--- a/src/driver/pe_driver_ctx.c
+++ b/src/driver/pe_driver_ctx.c
@@ -32,6 +32,7 @@ static const char * const perk_cmd_name[PERK_CMD_CAP] = {
[PERK_CMD_NM] = "nm",
[PERK_CMD_SIZE] = "size",
[PERK_CMD_STRIP] = "strip",
+ [PERK_CMD_RANLIB] = "ranlib",
};
/* perk command options */
@@ -42,6 +43,7 @@ static const struct argv_option * perk_cmd_options[PERK_CMD_CAP] = {
[PERK_CMD_NM] = pe_nm_options,
[PERK_CMD_SIZE] = pe_size_options,
[PERK_CMD_STRIP] = pe_strip_options,
+ [PERK_CMD_RANLIB] = pe_ranlib_options,
};
/* default fd context */
@@ -123,6 +125,12 @@ static int pe_driver_usage(
cmdname,cmdname,cmdname);
break;
+ case PERK_CMD_RANLIB:
+ snprintf(header,sizeof(header),
+ PERK_RANLIB_CMD_SYNOPSIS,
+ cmdname,cmdname);
+ break;
+
case PERK_CMD_PERK:
snprintf(header,sizeof(header),
PERK_PERK_CMD_SYNOPSIS,
@@ -519,6 +527,9 @@ int pe_lib_get_driver_ctx(
} else if (cctx.cmd == PERK_CMD_STRIP) {
argv_optv_init(pe_strip_options,optv);
+
+ } else if (cctx.cmd == PERK_CMD_RANLIB) {
+ argv_optv_init(pe_ranlib_options,optv);
}
/* process the selected tool's command-line arguments */