1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-25 09:25:15 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-11-24 21:15:14 +09:00
parent 078c694006
commit 671aa31211
2 changed files with 5 additions and 7 deletions

10
mold.h
View File

@ -676,12 +676,12 @@ struct ComdatGroup {
class InputFile {
public:
InputFile(MemoryBufferRef mb)
: mb(mb), name(mb.getBufferIdentifier()),
InputFile(MemoryBufferRef mb, bool is_dso)
: mb(mb), name(mb.getBufferIdentifier()), is_dso(is_dso),
obj(check(ELFFile<ELF64LE>::create(mb.getBuffer()))) {}
std::string name;
bool is_dso = false;
bool is_dso;
u32 priority;
MemoryBufferRef mb;
ELFFile<ELF64LE> obj;
@ -743,9 +743,7 @@ private:
class SharedFile : public InputFile {
public:
SharedFile(MemoryBufferRef mb) : InputFile(mb) {
is_dso = true;
}
SharedFile(MemoryBufferRef mb) : InputFile(mb, true) {}
void parse();
void resolve_symbols();

View File

@ -12,7 +12,7 @@ using namespace llvm;
using namespace llvm::ELF;
ObjectFile::ObjectFile(MemoryBufferRef mb, StringRef archive_name)
: InputFile(mb), archive_name(archive_name),
: InputFile(mb, false), archive_name(archive_name),
is_in_archive(archive_name != "") {
is_alive = (archive_name == "");
}