[PATCH] D24762: Alternative fix for empty sections

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 06:44:52 PDT 2016


On 20 September 2016 at 10:24, Eugene Leviant <evgeny.leviant at gmail.com> wrote:
> evgeny777 added a comment.
>
> On some occasions this may create empty special sections like .tbss, .eh_frame_hdr and others. Are you sure this is really harmless?

Sorry for the crazy delay in replying. This patch was actually very
good in finding other bugs when doing a bootstrap with frankenstein
ld.

One issue was in the patch itself: We were not tracking the type, only
the flags.

The other issues were the unstable sort and TLS handling bugs.

In any case, this now survives a bootstrap and at most can cause a
PT_LOAD to be extended to include padding. I will include that as a
testcase and commit.

A variation that came to mind that might be useful if we find another
problem: move the contents out of the section. That is, turn

foo : { abc = .; }

into just

abc = .;

Cheers,
Rafael


More information about the llvm-commits mailing list