This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Add ar --output
- From: Nick Clifton <nickc at redhat dot com>
- To: Fangrui Song <i at maskray dot me>, binutils at sourceware dot org
- Date: Tue, 29 Oct 2019 15:42:40 +0000
- Subject: Re: Add ar --output
- References: <20191025061359.26fmpvlx3l6xww2k@gmail.com>
Hi Fangrui,
> There is a proposal https://reviews.llvm.org/D69418 that adds --output
> to llvm-ar. --output specifies the output directory for the x (extract)
> operation.
I have started working on an implementation of this feature for the binutils
version of ar. I have run across one issue however, which I would like to
run by you:
https://sourceware.org/bugzilla/show_bug.cgi?id=17533#c7
Currently the binutils version of ar checks that files are extracted into
the current directory, or into sub-directories of the current directory,
but not elsewhere in the file system. Do you think that the code handling
the --output option should just waive these checks, on the assumption that
the if the user wants to extract the files into another place then they
should know what they are doing, or issue a warning if the resolved path
would be outside of the current directory, or refuse to create such files ?
Cheers
Nick