This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Removing empty sections from elf_bfd_discard_info
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 18 Dec 2001 22:53:39 +1030
- Subject: Re: Removing empty sections from elf_bfd_discard_info
- References: <20011218131604.O542@sunsite.ms.mff.cuni.cz>
On Tue, Dec 18, 2001 at 01:16:04PM +0100, Jakub Jelinek wrote:
> Hi!
>
> I found one more problem with the --eh-frame-hdr patch, which is common
> to the stabs optimization code as well (where I copied it from).
> if (sec->_cooked_size == 0)
> sec->flags |= SEC_EXCLUDE;
> really doesn't work at all, section sizing code in ld doesn't care about
> this. Neither works setting sec->output_section to bfd_abs_section_ptr.
>
> What do you think is best to tackle this?
I wonder if it's possible to simply use a single field for the section
size? Why do we really need both _raw_size and _cooked_size? Hmm, if
relaxation needs the original size, how about renaming the two fields to
"size" and "orig_size" and using "size" practically everywhere?
Alan