[PATCH] D33327: Use linker script commands in writeMapFile

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 16:08:47 PDT 2017


Peter Smith <peter.smith at linaro.org> writes:

> Thanks very much for the patch, looks good to me too.
>
> I've recently submitted https://reviews.llvm.org/D33239 and updated
> https://reviews.llvm.org/D32799 . Together these move
> fabricateDefaultCommands() earlier and have SHF_LINK_ORDER and Thunks
> operate on InputSectionDescriptions. If there is anything I can do to
> progress these, please let me know?

These changes are hard to review since they try to do a lot in one go.

We know that the core issue is that we have two representations for the
linker state. Lets try to fix that first.

I will be trying to avoid using the non-linker script representation
once fabricateDefaultCommands is done by moving the
OutputSections.clear() earlier bit by bit.

The other part is moving what efectivelly is

  if (!Config->Relocatable) {
     if (!Script->Opt.HasSections) {
      fixSectionAlignments();
      Script->fabricateDefaultCommands();
    }
    Script->synchronize();
 }

Earlier a bit at a time until it is early enough that we can drop Script->synchronize().

Cheers,
Rafael


More information about the llvm-commits mailing list