Removing empty sections from elf_bfd_discard_info
Alan Modra
amodra@bigpond.net.au
Tue Dec 18 04:29:00 GMT 2001
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
More information about the Binutils
mailing list