This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Ensure .tbss sections are also considered as ZeroFilled
ClosedPublic

Authored by int3 on Aug 1 2020, 3:21 PM.

Details

Summary

This diff makes the behavior in D80859: [lld-macho] Ensure __bss sections we output have file offset of zero and D81888: [lld-macho] Make sure ZeroFill sections are at the end of their segments apply to
thread-local ZeroFill sections too. I realized this was necessary whie
trying to implement thread-local variables.

Diff Detail

Event Timeline

int3 created this revision.Aug 1 2020, 3:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2020, 3:21 PM
int3 requested review of this revision.Aug 1 2020, 3:21 PM
compnerd accepted this revision.Aug 3 2020, 9:24 AM
This revision is now accepted and ready to land.Aug 3 2020, 9:24 AM
MaskRay accepted this revision.Aug 3 2020, 9:30 AM
MaskRay added a subscriber: MaskRay.

Looks great!

lld/MachO/InputSection.h
39–40

If you using namespace llvm then you can omit llvm::

int3 added inline comments.Aug 3 2020, 10:12 AM
lld/MachO/InputSection.h
39–40

I think we should avoid using namespace inside header files...

MaskRay added inline comments.Aug 3 2020, 10:19 AM
lld/MachO/InputSection.h
39–40

You're right. Did not notice this is a .h......... my bad

This revision was landed with ongoing or failed builds.Aug 7 2020, 11:05 AM
This revision was automatically updated to reflect the committed changes.