NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/52859: ld.elf_so relocation failure



The following reply was made to PR toolchain/52859; it has been noted by GNATS.

From: Martin Husemann <martin%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: toolchain/52859: ld.elf_so relocation failure
Date: Mon, 25 Dec 2017 12:24:41 +0000

 This looks like a bogus PLT entry for atexit:
 
 (gdb) x/16i 0x202b40
    0x202b40 <atexit@plt>:       sethi  %hi(0xd0000), %g1
    0x202b44 <atexit@plt+4>:     b,a   %xcc, 0x202820
    0x202b48 <atexit@plt+8>:     nop 
    0x202b4c <atexit@plt+12>:    nop 
    0x202b50 <atexit@plt+16>:    nop 
    0x202b54 <atexit@plt+20>:    nop 
    0x202b58 <atexit@plt+24>:    nop 
    0x202b5c <atexit@plt+28>:    nop 
 
 but resolving this jumps into atf_tc_set_md_var.
 
 So the call in ___start:
 
         if (&rtld_DYNAMIC != NULL) {
                 if (obj == NULL)
                         _FATAL("NULL Obj_Entry pointer in GOT\n");
                 if (obj->magic != RTLD_MAGIC)
                         _FATAL("Corrupt Obj_Entry pointer in GOT\n");
                 if (obj->version != RTLD_VERSION)
                         _FATAL("Dynamic linker version mismatch\n");
                 atexit(cleanup);
         }
 
 calls the atf function instead, but of course with bogus arguments.
 
 Martin
 


Home | Main Index | Thread Index | Old Index