This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Linkerscript: make section with no content to be SHT_PROGBITS by default.
ClosedPublic

Authored by grimar on Apr 13 2017, 8:04 AM.

Details

Summary

Imagine next script:

SECTIONS { BYTE(0x11); }

Section content written to disk will be 0x11. Previous LLD behavior was to make this
section SHT_NOBITS. What is not correct because section has content.
ld.bfd makes such sections SHT_PROGBITS, this patch do the same.

This fixes PR32537

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Apr 13 2017, 8:04 AM
ruiu accepted this revision.Apr 13 2017, 10:16 AM

LGTM

This revision is now accepted and ready to land.Apr 13 2017, 10:16 AM
This revision was automatically updated to reflect the committed changes.