mirror of
https://github.com/rui314/mold.git
synced 2024-12-27 10:23:41 +03:00
temporary
This commit is contained in:
parent
399a109d65
commit
73c987829e
3
mold.h
3
mold.h
@ -151,7 +151,8 @@ private:
|
||||
//
|
||||
|
||||
struct StringPiece {
|
||||
StringPiece(StringRef data) : data(data) {}
|
||||
StringPiece(StringRef data, MergeableSection *osec)
|
||||
: data(data), output_section(osec) {}
|
||||
|
||||
StringPiece(const StringPiece &other)
|
||||
: data(other.data), file(other.file.load()),
|
||||
|
@ -264,7 +264,7 @@ void ObjectFile::read_string_pieces(InputSection *isec) {
|
||||
StringRef substr = data.substr(0, end);
|
||||
data = data.substr(end + 1);
|
||||
|
||||
StringPiece *piece = osec->map.insert(substr, StringPiece(substr));
|
||||
StringPiece *piece = osec->map.insert(substr, StringPiece(substr, osec));
|
||||
isec->pieces.push_back({piece, offset});
|
||||
offset += substr.size() + 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user