This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: "strip -R" with lots of arguments?
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: Adam Megacz <adam at megacz dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 31 Jan 2002 18:08:51 +0000
- Subject: Re: "strip -R" with lots of arguments?
- References: <86ofjdt4uj.fsf@megacz.com>
Hi Adam,
> I need to remove a few thousand sections out of an ar-archive. I can't
> fit them all on the command line, since most OSes have a hard limit of
> something around 2kb on argv[].
>
> Is there any way to pass in a file with a list of sections to remove,
> similar to "objcopy --strip-symbols=<file>"?
Short answer: no.
Long answer: It should not be too hard this support though. Have a
look at the function find_section_list() in binutils/objcopy.c. All
you need to do it detect if 'name' starts with a special character
(maybe '@' ?) and if it does, interpret the rest of the name as a
filename to be loaded and repeatedly passed to find_section_list().
Cheers
Nick