2020-07-26 15:36:28 -04:00
|
|
|
//===- OutputSection.cpp --------------------------------------------------===//
|
2017-12-18 15:12:21 -05:00
|
|
|
//
|
2019-08-20 16:51:32 -04:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2017-12-18 15:12:21 -05:00
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
2020-07-26 15:36:28 -04:00
|
|
|
#include "OutputSection.h"
|
|
|
|
|
#include "OutputSegment.h"
|
2017-12-18 15:12:21 -05:00
|
|
|
|
2020-07-26 15:36:28 -04:00
|
|
|
using namespace llvm;
|
|
|
|
|
using namespace lld;
|
|
|
|
|
using namespace lld::macho;
|
|
|
|
|
|
|
|
|
|
uint64_t OutputSection::getSegmentOffset() const {
|
|
|
|
|
return addr - parent->firstSection()->addr;
|
|
|
|
|
}
|