1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-28 02:44:48 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-11-02 13:43:34 +09:00
parent 1da3da9727
commit 4eef66bf8d
4 changed files with 5 additions and 8 deletions

View File

@ -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;

View File

@ -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:

View File

@ -185,11 +185,6 @@ static void bin_sections(std::vector<ObjectFile *> &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);
}

View File

@ -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;