1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-14 07:18:42 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-10-22 19:36:57 +09:00
parent ba24d0f872
commit 5877dd12ad

32
mold.h
View File

@ -193,20 +193,6 @@ public:
const ELF64LE::Shdr *hdr;
};
class StringTableSection : public InputChunk {
public:
StringTableSection(StringRef name) {
this->name = name;
}
uint64_t addString(StringRef s);
void copy_to(uint8_t *buf) override;
uint64_t get_size() const override { return contents.size(); }
private:
std::string contents;
};
std::string toString(InputSection *isec);
inline uint64_t align_to(uint64_t val, uint64_t align) {
@ -314,8 +300,8 @@ class InterpSection : public OutputChunk {
public:
InterpSection() {
name = ".interp";
hdr.sh_flags = llvm::ELF::PF_R;
hdr.sh_type = llvm::ELF::PT_INTERP;
hdr.sh_flags = llvm::ELF::SHF_ALLOC;
hdr.sh_type = llvm::ELF::SHT_PROGBITS;
}
void copy_to(uint8_t *buf) override {
@ -329,6 +315,20 @@ private:
};
class StringTableSection : public InputChunk {
public:
StringTableSection(StringRef name) {
this->name = name;
}
uint64_t addString(StringRef s);
void copy_to(uint8_t *buf) override;
uint64_t get_size() const override { return contents.size(); }
private:
std::string contents;
};
namespace out {
extern OutputEhdr *ehdr;
extern OutputShdr *shdr;