"strip -R" with lots of arguments?
Nick Clifton
nickc@cambridge.redhat.com
Thu Jan 31 10:30:00 GMT 2002
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
More information about the Binutils
mailing list