From 4eef66bf8d96f666a60aabe771cd949500624d47 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 2 Nov 2020 13:43:34 +0900 Subject: [PATCH] temporary --- input_files.cc | 2 -- input_sections.cc | 2 ++ main.cc | 5 ----- output_chunks.cc | 4 +++- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/input_files.cc b/input_files.cc index 9e7c4df4..588a6dfe 100644 --- a/input_files.cc +++ b/input_files.cc @@ -266,8 +266,6 @@ void ObjectFile::hanlde_undefined_weak_symbols() { !is_new && sym.is_undef_weak && this->priority < sym.file->priority; if (is_new || tie_but_higher_priority) { - llvm::outs() << "file=" << this->name << " sym=" << sym.name << "\n"; - sym.file = this; sym.input_section = nullptr; sym.addr = 0; diff --git a/input_sections.cc b/input_sections.cc index 18cd90ce..497086ee 100644 --- a/input_sections.cc +++ b/input_sections.cc @@ -131,12 +131,14 @@ void InputSection::relocate(u8 *buf) { case R_X86_64_DTPOFF32: break; case R_X86_64_GOTTPOFF: +#if 0 llvm::outs() << "rel sym=" << (sym ? sym->name : "") << " gottp=" << Twine::utohexstr(sym ? sym->gottp_offset : 0) << " GOT=" << Twine::utohexstr(GOT) << " A=" << Twine::utohexstr(A) << " P=" << Twine::utohexstr(P) << "\n"; +#endif *(u32 *)loc = (sym ? sym->gottp_offset : 0) + GOT + A - P; break; case R_X86_64_TPOFF32: diff --git a/main.cc b/main.cc index c19f396d..e04814be 100644 --- a/main.cc +++ b/main.cc @@ -185,11 +185,6 @@ static void bin_sections(std::vector &files) { for (InputSection *isec : file->sections) { if (!isec) continue; - - if (toString(file) == "/usr/lib/x86_64-linux-gnu/libc.a:cxa_atexit.o") - llvm::outs() << "isec=" << toString(isec) - << " " << toString(isec) - << " " << (void *)isec->output_section << "\n"; OutputSection *osec = isec->output_section; osec->sections.push_back(isec); } diff --git a/output_chunks.cc b/output_chunks.cc index 7fb021e0..ca4451e5 100644 --- a/output_chunks.cc +++ b/output_chunks.cc @@ -195,11 +195,13 @@ void GotSection::relocate(u8 *buf) { break; case TPOFF: *(u64 *)buf = sym->addr - out::tls_end; +#if 0 llvm::outs() << "tls_end=" << Twine::utohexstr(out::tls_end) << " sym=" << sym->name - << " sym->gottp_offset=" << Twine::utohexstr(out::got->shdr.sh_addr + sym->gottp_offset) + << " sym->gottp_offset=" << Twine::utohexstr(sym->gottp_offset) << " sym->addr=" << Twine::utohexstr(sym->addr) << "\n"; +#endif break; case IREL: break;