[PATCH 1/6] ELF: Strip section header in ELF objects
Alan Modra
amodra@gmail.com
Wed May 31 23:43:37 GMT 2023
On Wed, May 31, 2023 at 10:15:58AM -0700, H.J. Lu wrote:
> On Tue, May 30, 2023 at 6:38 PM Alan Modra <amodra@gmail.com> wrote:
> >
> > On Tue, May 30, 2023 at 10:12:47AM -0700, H.J. Lu via Binutils wrote:
> > > +@item --strip-sections
> > > +Strip section header This option is specific to ELF files.
> > > +Implies @option{--strip-all} and @option{--merge-notes}.
> >
> > Debug info is inaccessible without section headers, and also
> > non-dynamic relocs (ld --emit-relocs). Should the section data be
> > removed too? Perhaps all non-alloc sections?
>
> According to objcopy manual:
>
> ‘-S’
> ‘--strip-all’
> Do not copy relocation and symbol information from the source file.
> Also deletes debug sections.
Oh yes, so it does.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list