r205261 - DebugInfo compression: Enable compression before any sections are created.

Eric Christopher echristo at gmail.com
Mon Mar 31 16:35:06 PDT 2014


On Mon, Mar 31, 2014 at 4:13 PM, David Blaikie <dblaikie at gmail.com> wrote:
> Author: dblaikie
> Date: Mon Mar 31 18:13:30 2014
> New Revision: 205261
>
> URL: http://llvm.org/viewvc/llvm-project?rev=205261&view=rev
> Log:
> DebugInfo compression: Enable compression before any sections are created.
>
> For those playing at home this produced some fairly subtle behavior. The
> sections created in InitMCObjectFileInfo were created without compressed
> debug info (a mistake, but not necessarily /broken). Since these
> sections were almost always referenced by the existing MCSection object,
> this almost worked.
>
> This got weird when we got to handling the relocations for a section.
> See ELFObjectWriter::WriteSection where we compute the true section for
> a relocation section by simply stripping the ".rela" prefix and then
> looking up that section - doing so hit the compression codepath, looked
> up .zdebug_blah and found a newly constructed empty section... thus,
> things got weird.
>
> This is untestable without a cross-project test (let me know if people
> would prefer that to no testing).

*blink* Wow.

I think the only way to do this is via projects/test-suite and ... I
think I'm ok not, but ick.

> +  if (Opts.CompressDebugSections)
> +    MAI->setCompressDebugSections(true);
>

Please comment why on earth this has to be here, otherwise someone
might try to move it.

-eric



More information about the cfe-commits mailing list