mirror of
https://github.com/rui314/mold.git
synced 2024-10-06 09:37:31 +03:00
temporary
This commit is contained in:
parent
6550494926
commit
ac01c06170
23
mold.h
23
mold.h
@ -173,6 +173,8 @@ public:
|
||||
StringRef name;
|
||||
OutputSection *output_section;
|
||||
int64_t offset = -1;
|
||||
uint64_t flags;
|
||||
uint32_t type;
|
||||
uint32_t alignment = 1;
|
||||
};
|
||||
|
||||
@ -201,6 +203,27 @@ public:
|
||||
uint64_t get_size() const override { return 0; }
|
||||
};
|
||||
|
||||
class GenericSection : public InputChunk {
|
||||
public:
|
||||
GenericSection(StringRef name, ArrayRef<uint8_t> data,
|
||||
uint64_t flags, uint32_t type, uint32_t alignment)
|
||||
: data(data) {
|
||||
this->name = name;
|
||||
this->flags = flags;
|
||||
this->type = type;
|
||||
this->alignment = alignment;
|
||||
}
|
||||
|
||||
void copy_to(uint8_t *buf) override {
|
||||
memcpy(buf + offset, &data[0], data.size());
|
||||
}
|
||||
|
||||
uint64_t get_size() const override { return data.size(); }
|
||||
|
||||
private:
|
||||
ArrayRef<uint8_t> data;
|
||||
};
|
||||
|
||||
std::string toString(InputSection *isec);
|
||||
|
||||
inline uint64_t align_to(uint64_t val, uint64_t align) {
|
||||
|
Loading…
Reference in New Issue
Block a user