mirror of
https://github.com/rui314/mold.git
synced 2024-12-28 19:04:27 +03:00
temporary
This commit is contained in:
parent
0c8dbbda0a
commit
9188934590
4
mold.h
4
mold.h
@ -417,12 +417,14 @@ public:
|
||||
contents = '\0';
|
||||
shdr.sh_flags = 0;
|
||||
shdr.sh_type = llvm::ELF::SHT_STRTAB;
|
||||
shdr.sh_size = 1;
|
||||
}
|
||||
|
||||
u64 add_string(StringRef s) {
|
||||
u64 ret = contents.size();
|
||||
contents += s.str();
|
||||
contents += '\0';
|
||||
shdr.sh_size = contents.size();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -430,7 +432,7 @@ public:
|
||||
memcpy(buf + shdr.sh_offset, &contents[0], contents.size());
|
||||
}
|
||||
|
||||
u64 get_size() const override { return contents.size(); }
|
||||
u64 get_size() const override { return shdr.sh_size; }
|
||||
|
||||
private:
|
||||
std::string contents;
|
||||
|
Loading…
Reference in New Issue
Block a user