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]
Other format: [Raw text]

Re: "strip -R" with lots of arguments?


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


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