diff options
author | Fangrui Song <maskray@google.com> | 2022-01-11 08:59:40 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2022-01-11 08:59:40 -0800 |
commit | d1b69c506f7855e5b90039abdadaf1d05b085c4c (patch) | |
tree | 6b5758b36eb4440cbe4d4ec50fed93ee9175f18a /binutils/ar.c | |
parent | c4a8df19ba0a82aa8dea88d9f72ed9e63cb1fa84 (diff) | |
download | gdb-d1b69c506f7855e5b90039abdadaf1d05b085c4c.zip gdb-d1b69c506f7855e5b90039abdadaf1d05b085c4c.tar.gz gdb-d1b69c506f7855e5b90039abdadaf1d05b085c4c.tar.bz2 |
ar: Add --thin for creating thin archives
In many ar implementations (FreeBSD, elfutils, etc), -T has the X/Open
System Interface specified semantics. Therefore -T for thin archives is
not recommended for portability. -T is deprecated without diagnostics.
PR binutils/28759
* ar.c (long_options): Add --thin.
(usage) Add --thin. Deprecate -T without diagnostics.
* doc/binutils.texi: Add doc.
* NEWS: Mention --thin.
* binutils/testsuite/binutils-all/ar.exp: Add tests.
Diffstat (limited to 'binutils/ar.c')
-rw-r--r-- | binutils/ar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/binutils/ar.c b/binutils/ar.c index d7d2fc2..0d4c7cf 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -172,6 +172,7 @@ static struct option long_options[] = {"version", no_argument, &show_version, 1}, {"output", required_argument, NULL, OPTION_OUTPUT}, {"record-libdeps", required_argument, NULL, 'l'}, + {"thin", no_argument, NULL, 'T'}, {NULL, no_argument, NULL, 0} }; @@ -337,13 +338,14 @@ usage (int help) fprintf (s, _(" [s] - create an archive index (cf. ranlib)\n")); fprintf (s, _(" [l <text> ] - specify the dependencies of this library\n")); fprintf (s, _(" [S] - do not build a symbol table\n")); - fprintf (s, _(" [T] - make a thin archive\n")); + fprintf (s, _(" [T] - deprecated, use --thin instead\n")); fprintf (s, _(" [v] - be verbose\n")); fprintf (s, _(" [V] - display the version number\n")); fprintf (s, _(" @<file> - read options from <file>\n")); fprintf (s, _(" --target=BFDNAME - specify the target object format as BFDNAME\n")); fprintf (s, _(" --output=DIRNAME - specify the output directory for extraction operations\n")); fprintf (s, _(" --record-libdeps=<text> - specify the dependencies of this library\n")); + fprintf (s, _(" --thin - make a thin archive\n")); #if BFD_SUPPORTS_PLUGINS fprintf (s, _(" optional:\n")); fprintf (s, _(" --plugin <p> - load the specified plugin\n")); |