Add ar --output

Nick Clifton nickc@redhat.com
Tue Nov 5 13:49:00 GMT 2019


Hi Fangrui,

> I think the is_valid_archive_path check should be placed before `if (output_dir)`.

OK, I can do that.  One more question though...

> printf '!<arch>\n%-48s%-10d`\n../file\n%-48s%-10s`\n' '//' 8 '/0' 0 > test.a
> ar --output=/tmp/c x test.a => extracted ../file to /tmp/c, i.e.  /tmp/file

With this example, if you add the "v" (verbose) option to the ar command line you 
get:

  x - ../file

As the output.  Do you think that if --output is used then the final output file 
name should be displayed.  IE:

  x - /tmp/c/file

Or in fact to be strict the output would actually be:

  ar: illegal output pathname for archive member: ../file, using 'file' instead
  x - /tmp/c/file

Cheers
  Nick



More information about the Binutils mailing list