Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lld/ELF/OutputSections.h
Show All 19 Lines | |||||
namespace lld { | namespace lld { | ||||
namespace elf { | namespace elf { | ||||
struct PhdrEntry; | struct PhdrEntry; | ||||
class InputSection; | class InputSection; | ||||
class InputSectionBase; | class InputSectionBase; | ||||
struct CompressedData { | |||||
std::unique_ptr<SmallVector<uint8_t, 0>[]> shards; | |||||
uint32_t numShards = 0; | |||||
uint32_t checksum = 0; | |||||
}; | |||||
// This represents a section in an output file. | // This represents a section in an output file. | ||||
// It is composed of multiple InputSections. | // It is composed of multiple InputSections. | ||||
// The writer creates multiple OutputSections and assign them unique, | // The writer creates multiple OutputSections and assign them unique, | ||||
// non-overlapping file offsets and VAs. | // non-overlapping file offsets and VAs. | ||||
class OutputSection final : public SectionCommand, public SectionBase { | class OutputSection final : public SectionCommand, public SectionBase { | ||||
public: | public: | ||||
OutputSection(StringRef name, uint32_t type, uint64_t flags); | OutputSection(StringRef name, uint32_t type, uint64_t flags); | ||||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | public: | ||||
void sort(llvm::function_ref<int(InputSectionBase *s)> order); | void sort(llvm::function_ref<int(InputSectionBase *s)> order); | ||||
void sortInitFini(); | void sortInitFini(); | ||||
void sortCtorsDtors(); | void sortCtorsDtors(); | ||||
private: | private: | ||||
// Used for implementation of --compress-debug-sections option. | // Used for implementation of --compress-debug-sections option. | ||||
SmallVector<uint8_t, 0> zDebugHeader; | SmallVector<uint8_t, 0> zDebugHeader; | ||||
SmallVector<char, 0> compressedData; | CompressedData compressed; | ||||
std::array<uint8_t, 4> getFiller(); | std::array<uint8_t, 4> getFiller(); | ||||
}; | }; | ||||
int getPriority(StringRef s); | int getPriority(StringRef s); | ||||
InputSection *getFirstInputSection(const OutputSection *os); | InputSection *getFirstInputSection(const OutputSection *os); | ||||
SmallVector<InputSection *, 0> getInputSections(const OutputSection &os); | SmallVector<InputSection *, 0> getInputSections(const OutputSection &os); | ||||
Show All 21 Lines |