Path: blob/main/contrib/llvm-project/lld/MachO/OutputSection.cpp
34878 views
//===- OutputSection.cpp --------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "OutputSection.h"9#include "OutputSegment.h"1011using namespace llvm;12using namespace lld;13using namespace lld::macho;1415uint64_t OutputSection::getSegmentOffset() const { return addr - parent->addr; }1617void OutputSection::assignAddressesToStartEndSymbols() {18for (Defined *d : sectionStartSymbols)19d->value = addr;20for (Defined *d : sectionEndSymbols)21d->value = addr + getSize();22}232425