Page MenuHomePhabricator

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

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

Details

Reviewers
compnerd
MaskRay
Group Reviewers
Restricted Project
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.Sat, Aug 1, 3:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptSat, Aug 1, 3:21 PM
int3 requested review of this revision.Sat, Aug 1, 3:21 PM
compnerd accepted this revision.Mon, Aug 3, 9:24 AM
This revision is now accepted and ready to land.Mon, Aug 3, 9:24 AM
MaskRay accepted this revision.Mon, Aug 3, 9:30 AM
MaskRay added a subscriber: MaskRay.

Looks great!

lld/MachO/InputSection.h
39

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

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

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

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

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