This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Fix strip.


On Sun, Jun 24, 2001 at 08:31:40AM -0700, H . J . Lu wrote:
> On Sun, Jun 24, 2001 at 01:28:15PM +0200, Ulrich Kunitz wrote:
> > Dear H.J.,
> > 
> > The strip command from binutils 2.11.90.0.19 doesn't support option -s
> > in the same way as older versions like binutils 2.9.5 from my SuSE 6.4
> > distribution.
> > 
> > It seems that option string for getopt_long() in strip_main() from
> > objcopy.c is wrong. Here is my patch:
> > 
> 
> Somehow the patch to strip_main in
> 
> http://sources.redhat.com/ml/binutils/2001-05/msg00314.html
> 
> got applied as
> 
> -  while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXVv",
> +  while ((c = getopt_long (argc, argv, "b:i:I:j:K:N:s:O:d:F:L:G:R:SpgxXVvW:",
> 
> It is simply wrong. Here is a patch. I also added `-G' and `-W' to
> strip_usage. I will check it in under the obvious fix rule.
> 

It turned out the change made to strip_main on 2001-05-30 was intended
for copy_main. I checked in the following patch to fix it under the
obvious fix rule.

H.J.
--
2001-06-24  H.J. Lu  <hjl@gnu.org>

	* objcopy.c (strip_main): Revert the change made on 2001-05-30
	by accident.
	(copy_main): Apply the the change made to strip_main on
	2001-05-30 by accident.

Index: objcopy.c
===================================================================
RCS file: /work/cvs/gnu/binutils/binutils/objcopy.c,v
retrieving revision 1.21
diff -u -p -r1.21 objcopy.c
--- objcopy.c	2001/06/23 06:45:37	1.21
+++ objcopy.c	2001/06/24 16:22:04
@@ -1845,7 +1845,7 @@ strip_main (argc, argv)
   struct section_list *p;
   char *output_file = NULL;
 
-  while ((c = getopt_long (argc, argv, "b:i:o:I:j:K:N:s:O:d:F:L:G:R:SpgxXVvW:",
+  while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXVv",
 			   strip_options, (int *) 0)) != EOF)
     {
       switch (c)
@@ -1978,7 +1978,7 @@ copy_main (argc, argv)
   struct section_list *p;
   struct stat statbuf;
 
-  while ((c = getopt_long (argc, argv, "b:B:i:I:j:K:N:s:O:d:F:L:R:SpgxXVvW:",
+  while ((c = getopt_long (argc, argv, "b:B:i:I:j:K:N:s:O:d:F:L:G:R:SpgxXVvW:",
 			   copy_options, (int *) 0)) != EOF)
     {
       switch (c)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]