This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Move elf32.em and elf-generic.em functions
On 11 Sep 2019, Nick Alcock outgrape:
> On 11 Sep 2019, Alan Modra stated:
>
>> Many ELF linker targets support multiple "emulations" and thus have
>> multiple copies of elf32.em being compiled and linked into ld. This
>> patch moves much of elf32.em and elf-generic.em into files which will
>> be compiled just once, resulting in a 20% decrease in ld size for
>> --enable-targets=all.
>
> As someone who just had to grok this for the first time, it was an
> incredibly confusing tangle. This looks much better, no worse for ELF
> than for anything else.
Now adjusted to it: it's very nice. I'm using ldelfgen.c for the CTF
stuff, because it should apply to anything that uses bfd_elf_final_link
(that has a symbol table and strtab). (It *appears* the distinction
between ldelfgen and ldelf is that ldelf is for 'Linux-like' systems
with an ld.so search path, etc, while ldelfgen is for anything that uses
ELF, even more embedded platforms. But I could be wrong. Anyway it seems
that CTF strtab sharing and symtab shuffling should apply to both, so
ldelfgen.c it is.)