diff options
Diffstat (limited to 'lld/MachO/OutputSection.cpp')
-rw-r--r-- | lld/MachO/OutputSection.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lld/MachO/OutputSection.cpp b/lld/MachO/OutputSection.cpp index c006828267cf..8d7a29c2916c 100644 --- a/lld/MachO/OutputSection.cpp +++ b/lld/MachO/OutputSection.cpp @@ -14,5 +14,12 @@ using namespace lld; using namespace lld::macho; uint64_t OutputSection::getSegmentOffset() const { - return addr - parent->firstSection()->addr; + return addr - parent->addr; +} + +void OutputSection::assignAddressesToStartEndSymbols() { + for (Defined *d : sectionStartSymbols) + d->value = addr; + for (Defined *d : sectionEndSymbols) + d->value = addr + getSize(); } |