This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: PATCH : let `size' accept `-f'
- To: Philippe De Muyter <phdm at macqel dot be>
- Subject: Re: PATCH : let `size' accept `-f'
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Sun, 14 May 2000 20:41:03 +1000 (EST)
- cc: binutils mailing list <binutils at sourceware dot cygnus dot com>
On Tue, 9 May 2000, Philippe De Muyter wrote:
> I recently had a compilation fail because I used gnu size instead of sysV68
> size, and gnu size exited with an error value because of the `-f' flag.
I committed the following, as I didn't think it wise to make `-f' an alias
for `-A'.
Index: size.c
===================================================================
RCS file: /cvs/src/src/binutils/size.c,v
retrieving revision 1.5
diff -u -p -r1.5 size.c
--- size.c 2000/04/07 04:34:50 1.5
+++ size.c 2000/05/14 10:28:42
@@ -120,7 +122,7 @@ main (argc, argv)
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "ABVdox", long_options,
+ while ((c = getopt_long (argc, argv, "ABVdfox", long_options,
(int *) 0)) != EOF)
switch (c)
{
@@ -185,6 +187,16 @@ main (argc, argv)
break;
case 'o':
radix = octal;
+ break;
+ case 'f': /* FIXME : For sysv68, `-f' means `full format', i.e.
+ `[fname:] M(.text) + N(.data) + O(.bss) + P(.comment) = Q'
+ where `fname: ' appears only if there are >= 2 input files,
+ and M, N, O, P, Q are expressed in decimal by default,
+ hexa or octal if requested by `-x' or `-o'.
+ Just to make things interesting, Solaris also accepts -f,
+ which prints out the size of each allocatable section, the
+ name of the section, and the total of the section sizes. */
+ /* For the moment, accept `-f' silently, and ignore it. */
break;
case 0:
break;
--
Linuxcare. Support for the Revolution.