ld: compressed sections that depend on the symtab and strtab contents (linker people, am I crazy?)

Nick Alcock nick.alcock@oracle.com
Fri Jul 5 09:54:00 GMT 2019

On 5 Jul 2019, Nick Alcock said:

> So... would the right approach here be to add a new target... thing
> (callback? operation? what's the terminology here?) allowing targets to
> add their own constraints in place of the check on
> abfd->output_has_begun in bfd_set_section_size, so we could allow ELF
> targets to set the sizes of non-loadable sections even after
> output_has_begun, up until _bfd_elf_assign_file_positions_for_non_load
> is called? Or would the right approach be something different? As

Like... just setting section->size by hand, which is all
bfd_set_section_size() does other than check output_has_begun, and like
other people are doing all over the place. I could definitely try that.
Less invasive, too.

More information about the Binutils mailing list