mirror of
https://github.com/rui314/mold.git
synced 2024-09-22 10:27:48 +03:00
temporary
This commit is contained in:
parent
3383fe1b39
commit
3c757b8b4c
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ LLVM_LIBS=$(wildcard llvm-project/build/lib/libLLVM*.a)
|
||||
CURRENT_DIR=$(shell pwd)
|
||||
TBB_LIBDIR=$(wildcard $(CURRENT_DIR)/oneTBB/build/linux_intel64_*_release/)
|
||||
|
||||
CPPFLAGS=-g $(shell $(LLVM_CONFIG) --cxxflags) -IoneTBB/include -pthread -std=c++17 -O2
|
||||
CPPFLAGS=-g $(shell $(LLVM_CONFIG) --cxxflags) -IoneTBB/include -pthread -std=c++17
|
||||
LDFLAGS=$(shell $(LLVM_CONFIG) --ldflags) -L$(TBB_LIBDIR) -Wl,-rpath=$(TBB_LIBDIR) -fuse-ld=lld
|
||||
LIBS=-pthread -ltbb -lcurses -Wl,--start-group $(LLVM_LIBS) -Wl,--end-group
|
||||
OBJS=main.o object_file.o input_sections.o output_chunks.o mapfile.o perf.o
|
||||
|
3
main.cc
3
main.cc
@ -654,6 +654,9 @@ int main(int argc, char **argv) {
|
||||
config.print_map = args.hasArg(OPT_print_map);
|
||||
config.is_static = args.hasArg(OPT_static);
|
||||
|
||||
for (auto *arg : args.filtered(OPT_trace_symbol))
|
||||
Symbol::intern(arg->getValue())->traced = true;
|
||||
|
||||
std::vector<ObjectFile *> files;
|
||||
|
||||
llvm::TimerGroup before_copy("before_copy", "before_copy");
|
||||
|
4
mold.h
4
mold.h
@ -148,7 +148,8 @@ class Symbol {
|
||||
public:
|
||||
Symbol(StringRef name, ObjectFile *file = nullptr)
|
||||
: name(name), file(file), needs_got(false), needs_gottp(false),
|
||||
needs_plt(false), is_dso(false), is_weak(false), is_undef_weak(false) {}
|
||||
needs_plt(false), is_dso(false), is_weak(false), is_undef_weak(false),
|
||||
traced(false) {}
|
||||
|
||||
Symbol(const Symbol &other) : Symbol(other.name, other.file) {}
|
||||
|
||||
@ -177,6 +178,7 @@ public:
|
||||
u8 is_dso : 1;
|
||||
u8 is_weak : 1;
|
||||
u8 is_undef_weak : 1;
|
||||
u8 traced : 1;
|
||||
|
||||
u8 visibility = 0;
|
||||
u8 type = llvm::ELF::STT_NOTYPE;
|
||||
|
@ -19,3 +19,5 @@ defm thread_count: Eq<"thread-count", "Number of threads to use">;
|
||||
def stat: F<"stat">;
|
||||
|
||||
def static: F<"static">, HelpText<"Do not link against shared libraries">;
|
||||
|
||||
defm trace_symbol: Eq<"trace-symbol", "Trace references to symbol">;
|
||||
|
Loading…
Reference in New Issue
Block a user