* ar.c (main): Likewise.
* binutils.texi (nm): Document new option.
(ar): Likewise.
+2000-07-26 Geoff Keating <geoffk@cygnus.com>
+
+ * nm.c (main): Ignore '-X32_64' as an option.
+ * ar.c (main): Likewise.
+ * binutils.texi (nm): Document new option.
+ (ar): Likewise.
+
2000-07-23 Michael Sokolov <msokolov@ivan.Harhan.ORG>
* rdcoff.c (external_coff_symbol_p): K&R-ise.
if (! is_ranlib)
{
/* xgettext:c-format */
- fprintf (s, _("Usage: %s [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"),
+ fprintf (s, _("Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"),
program_name);
/* xgettext:c-format */
fprintf (s, _(" %s -M [<mri-script]\n"), program_name);
fprintf (s, _(" [S] - do not build a symbol table\n"));
fprintf (s, _(" [v] - be verbose\n"));
fprintf (s, _(" [V] - display the version number\n"));
+ fprintf (s, _(" [-X32_64] - (ignored)\n"));
}
else
/* xgettext:c-format */
xatexit (remove_output);
+ /* Ignored for (partial) AIX compatibility. On AIX,
+ the -X option can be used to ignore certain kinds
+ of object files in the archive (the 64-bit objects
+ or the 32-bit objects). GNU ar always looks at all
+ kinds of objects in an archive. */
+ while (strcmp (argv[1], "-X32_64") == 0)
+ {
+ argv++;
+ argc--;
+ }
+
if (is_ranlib)
{
boolean touch = false;
@section Controlling @code{ar} on the command line
@smallexample
-ar [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
+ar [-X32_64] [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
@end smallexample
@cindex Unix compatibility, @code{ar}
This modifier shows the version number of @code{ar}.
@end table
+@code{ar} ignores an initial option spelt @code{-X32_64}, for
+compatibility with AIX. The behaviour produced by this option is the
+default for GNU @code{ar}. @code{ar} does not support any of the other
+@code{-X} options; in particular, it does not support @code{-X32}
+which is the default for AIX @code{ar}.
+
@node ar scripts
@section Controlling @code{ar} with a script
[ -r | --reverse-sort ] [ --size-sort ] [ -u | --undefined-only ]
[ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ]
[ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ]
- [ --defined-only ] [-l | --line-numbers ]
- [ --no-demangle ] [ -V | --version ] [ --help ] [ @var{objfile}@dots{} ]
+ [ --defined-only ] [-l | --line-numbers ] [ --no-demangle ]
+ [ -V | --version ] [ -X 32_64 ] [ --help ] [ @var{objfile}@dots{} ]
@end smallexample
@sc{gnu} @code{nm} lists the symbols from object files @var{objfile}@dots{}.
@itemx --version
Show the version number of @code{nm} and exit.
+@item -X
+This option is ignored for compatibility with the AIX version of
+@code{nm}. It takes one parameter which must be the string
+@code{32_64}. The default mode of AIX @code{nm} corresponds
+to @code{-X 32}, which is not supported by @sc{gnu} @code{nm}.
+
@item --help
Show a summary of the options to @code{nm} and exit.
@end table
--target=BFDNAME Specify the target object format as BFDNAME\n\
-u, --undefined-only Display only undefined symbols\n\
-V, --version Display this program's version number\n\
+ -X 32_64 (ignored)\n\
\n"));
list_supported_targets (program_name, stream);
if (status == 0)
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "aABCDef:glnopPrst:uvV",
+ while ((c = getopt_long (argc, argv, "aABCDef:glnopPrst:uvVX:",
long_options, (int *) 0)) != EOF)
{
switch (c)
case 'V':
show_version = 1;
break;
+ case 'X':
+ /* Ignored for (partial) AIX compatibility. On AIX, the
+ argument has values 32, 64, or 32_64, and specfies that
+ only 32-bit, only 64-bit, or both kinds of objects should
+ be examined. The default is 32. So plain AIX nm on a
+ library archive with both kinds of objects will ignore
+ the 64-bit ones. For GNU nm, the default is and always
+ has been -X 32_64, and other options are not supported. */
+ if (strcmp (optarg, "32_64") != 0)
+ fatal (_("Only -X 32_64 is supported"));
+ break;
case OPTION_TARGET: /* --target */
target = optarg;