This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

aarch64 crash with static PIE


I'm trying to enable static PIE for Fedora and encountered a problem on aarch64 (current master, commit 4612268a0ad8e3409d8ce2314dd2dd8ee0af5269).

sln crashes here:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000ffff9bcebb68 in __libc_start_main (main=0x0, argc=2, argv=0xfffff8023e58, init=0xffff9bcec218 <__libc_csu_init>, fini=0xffff9bcec2d0 <__libc_csu_fini>, rtld_fini=0x0,
    stack_end=0xfffff8023e50) at ../csu/libc-start.c:141
141       __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up;

The disassembly goes like this:

Dump of assembler code for function __libc_start_main:
   0x0000ffff9bcebb28 <+0>:     stp     x29, x30, [sp, #-352]!
   0x0000ffff9bcebb2c <+4>:     mov     x29, sp
   0x0000ffff9bcebb30 <+8>:     stp     x19, x20, [sp, #16]
0x0000ffff9bcebb34 <+12>: adrp x19, 0xffff9bd71000 <__libio_codecvt+168>
   0x0000ffff9bcebb38 <+16>:    stp     x21, x22, [sp, #32]
   0x0000ffff9bcebb3c <+20>:    mov     x20, x3
   0x0000ffff9bcebb40 <+24>:    ldr     x19, [x19, #3736]
   0x0000ffff9bcebb44 <+28>:    mov     x21, x4
   0x0000ffff9bcebb48 <+32>:    stp     x23, x24, [sp, #48]
   0x0000ffff9bcebb4c <+36>:    mov     x22, x5
   0x0000ffff9bcebb50 <+40>:    stp     x0, x2, [x29, #88]
   0x0000ffff9bcebb54 <+44>:    mov     x23, x6
   0x0000ffff9bcebb58 <+48>:    stp     x25, x26, [sp, #64]
0x0000ffff9bcebb5c <+52>: mov w0, #0x0 // #0
   0x0000ffff9bcebb60 <+56>:    str     w1, [x29, #108]
0x0000ffff9bcebb64 <+60>: cbz x19, 0xffff9bcebb74 <__libc_start_main+76>
=> 0x0000ffff9bcebb68 <+64>:    ldr     w0, [x19]
   0x0000ffff9bcebb6c <+68>:    cmp     w0, #0x0
   0x0000ffff9bcebb70 <+72>:    cset    w0, eq  // eq = none
0x0000ffff9bcebb74 <+76>: adrp x1, 0xffff9bd73000 <main_arena+1872> 0x0000ffff9bcebb78 <+80>: adrp x19, 0xffff9bd71000 <__libio_codecvt+168>
   0x0000ffff9bcebb7c <+84>:    str     w0, [x1, #1896]
0x0000ffff9bcebb80 <+88>: bl 0xffff9bd09e70 <_dl_relocate_static_pie>
   0x0000ffff9bcebb84 <+92>:    ldr     x1, [x19, #3288]

And:

(gdb) print (void *)$x19
$2 = (void *) 0x91200

Not sure what is going on.  This is with:

binutils-2.29.1-12.fc28.aarch64
gcc-7.2.1-6.fc28.aarch64

Any suggestions where to look next?

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]