[PATCH] D32289: [ELF] - Linkerscript: support combination of linkerscript and --compress-debug-sections.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 06:49:17 PDT 2017


George Rimar <grimar at accesssoftek.com> writes:
> I dont think I can simply set offsets in processCommands because for case when 
> .debug_* sections are orphans: "SECTIONS {  }"
> there is no commands for them at the point of call.

I guess the code adding orphan sections needs to update the offset too.

> Intention to call assignOffsets() is not only to assign offsets, but
> also to find the final output section size for doing compression.
> Then when I assign the compressed size to OutputSection::Size, the latter should 
> never be recalculated, because it is final value. I believe that requires
> a bit different handling in LinkerScript::process, because we should not
> work with input sections or any other commands anymore for compressed case.

The point is that you should not have an extra call to assignOffsets
only when compressing. From the sound of it LinkerScript::process should
mostly skip compressed sections (it can check the flag).

Cheers,
Rafael


More information about the llvm-commits mailing list