libphobos on ARM

Matthew Caron Matt.Caron at redlion.net
Mon Jun 4 04:31:59 PDT 2012


On 06/01/2012 10:13 PM, Andrew Wiley wrote:
> On Fri, Jun 1, 2012 at 3:24 PM, Alex Rønne Petersen <alex at lycus.org
> <mailto:alex at lycus.org>> wrote:
>     Please try building libphobos and libdruntime with -fno-section-anchors.
>
>
> You certainly need to do this, but -O0 means that section-anchors
> optimization is turned off anyway, so that isn't actually your problem.

Judging by:

https://bitbucket.org/goshawk/gdc/issue/120/fsection-anchors-broken-on-arm

(specifically 
https://bitbucket.org/goshawk/gdc/issue/120/fsection-anchors-broken-on-arm#comment-686378), 
I thought that was fixed.

I guess not. I'll build it with no-section-anchors from now on.

> Can you run `disassemble` in gdb to see what the faulting instruction is?


(gdb) disassemble
Dump of assembler code for function _D2gc3gcx3Gcx16fullcollectshellMFZk:
0x00045358 <_D2gc3gcx3Gcx16fullcollectshellMFZk+0>:     push    {r4, r5, 
r6, r7, r8, r9, r10, r11, lr}
0x0004535c <_D2gc3gcx3Gcx16fullcollectshellMFZk+4>:     vstmdb  sp!, 
{d8-d15}
0x00045360 <_D2gc3gcx3Gcx16fullcollectshellMFZk+8>:     add     r11, sp, 
#96    ; 0x60
0x00045364 <_D2gc3gcx3Gcx16fullcollectshellMFZk+12>:    sub     sp, sp, 
#68     ; 0x44
0x00045368 <_D2gc3gcx3Gcx16fullcollectshellMFZk+16>:    str     r0, 
[r11, #-152]
0x0004536c <_D2gc3gcx3Gcx16fullcollectshellMFZk+20>:    ldr     r3, 
[r11, #-152]
0x00045370 <_D2gc3gcx3Gcx16fullcollectshellMFZk+24>:    str     r3, 
[r11, #-140]
0x00045374 <_D2gc3gcx3Gcx16fullcollectshellMFZk+28>:    ldr     r3, 
[r11, #-140]
0x00045378 <_D2gc3gcx3Gcx16fullcollectshellMFZk+32>:    cmp     r3, #0 
; 0x0
0x0004537c <_D2gc3gcx3Gcx16fullcollectshellMFZk+36>:    beq     0x45390 
<_D2gc3gcx3Gcx16fullcollectshellMFZk+56>
0x00045380 <_D2gc3gcx3Gcx16fullcollectshellMFZk+40>:    ldr     r3, 
[r11, #-140]
0x00045384 <_D2gc3gcx3Gcx16fullcollectshellMFZk+44>:    mov     r0, r3
0x00045388 <_D2gc3gcx3Gcx16fullcollectshellMFZk+48>:    bl      0x4241c 
<_D2gc3g---Type <return> to continue, or q <return> to quit---
cx3Gcx11__invariantMFZv>
0x0004538c <_D2gc3gcx3Gcx16fullcollectshellMFZk+52>:    b       0x453cc 
<_D2gc3gcx3Gcx16fullcollectshellMFZk+116>
0x00045390 <_D2gc3gcx3Gcx16fullcollectshellMFZk+56>:    mov     r3, #9 
; 0x9
0x00045394 <_D2gc3gcx3Gcx16fullcollectshellMFZk+60>:    str     r3, 
[r11, #-132]
0x00045398 <_D2gc3gcx3Gcx16fullcollectshellMFZk+64>:    ldr     r3, [pc, 
#184]  ; 0x45458 <_D2gc3gcx3Gcx16fullcollectshellMFZk+256>
0x0004539c <_D2gc3gcx3Gcx16fullcollectshellMFZk+68>:    str     r3, 
[r11, #-128]
0x000453a0 <_D2gc3gcx3Gcx16fullcollectshellMFZk+72>:    mov     r3, #72 
; 0x48
0x000453a4 <_D2gc3gcx3Gcx16fullcollectshellMFZk+76>:    str     r3, 
[r11, #-124]
0x000453a8 <_D2gc3gcx3Gcx16fullcollectshellMFZk+80>:    ldr     r3, [pc, 
#172]  ; 0x4545c <_D2gc3gcx3Gcx16fullcollectshellMFZk+260>
0x000453ac <_D2gc3gcx3Gcx16fullcollectshellMFZk+84>:    str     r3, 
[r11, #-120]
0x000453b0 <_D2gc3gcx3Gcx16fullcollectshellMFZk+88>:    ldr     r3, [pc, 
#168]  ; 0x45460 <_D2gc3gcx3Gcx16fullcollectshellMFZk+264>
0x000453b4 <_D2gc3gcx3Gcx16fullcollectshellMFZk+92>:    str     r3, [sp]
0x000453b8 <_D2gc3gcx3Gcx16fullcollectshellMFZk+96>:    sub     r3, r11, 
#132   ; 0x84
0x000453bc <_D2gc3gcx3Gcx16fullcollectshellMFZk+100>:   ldm     r3, {r0, r1}
---Type <return> to continue, or q <return> to quit---
0x000453c0 <_D2gc3gcx3Gcx16fullcollectshellMFZk+104>:   sub     r3, r11, 
#124   ; 0x7c
0x000453c4 <_D2gc3gcx3Gcx16fullcollectshellMFZk+108>:   ldm     r3, {r2, r3}
0x000453c8 <_D2gc3gcx3Gcx16fullcollectshellMFZk+112>:   bl      0x21fd8 
<_d_assert_msg>
0x000453cc <_D2gc3gcx3Gcx16fullcollectshellMFZk+116>:   mov     r3, #0 
; 0x0
0x000453d0 <_D2gc3gcx3Gcx16fullcollectshellMFZk+120>:   str     r3, 
[r11, #-136]
0x000453d4 <_D2gc3gcx3Gcx16fullcollectshellMFZk+124>:   mov     r3, #0 
; 0x0
0x000453d8 <_D2gc3gcx3Gcx16fullcollectshellMFZk+128>:   str     r3, 
[r11, #-104]
0x000453dc <_D2gc3gcx3Gcx16fullcollectshellMFZk+132>:   sub     r3, r11, 
#136   ; 0x88
0x000453e0 <_D2gc3gcx3Gcx16fullcollectshellMFZk+136>:   str     r3, 
[r11, #-136]
0x000453e4 <_D2gc3gcx3Gcx16fullcollectshellMFZk+140>:   ldr     r2, 
[r11, #-140]
0x000453e8 <_D2gc3gcx3Gcx16fullcollectshellMFZk+144>:   ldr     r3, 
[r11, #-136]
0x000453ec <_D2gc3gcx3Gcx16fullcollectshellMFZk+148>:   mov     r0, r2
0x000453f0 <_D2gc3gcx3Gcx16fullcollectshellMFZk+152>:   mov     r1, r3
0x000453f4 <_D2gc3gcx3Gcx16fullcollectshellMFZk+156>:   bl      0x45468 
<_D2gc3gcx3Gcx11fullcollectMFPvZk>
---Type <return> to continue, or q <return> to quit---
---Type <return> to continue, or q <return> to quit---
0x000453f8 <_D2gc3gcx3Gcx16fullcollectshellMFZk+160>:   mov     r3, r0
0x000453fc <_D2gc3gcx3Gcx16fullcollectshellMFZk+164>:   str     r3, 
[r11, #-104]
0x00045400 <_D2gc3gcx3Gcx16fullcollectshellMFZk+168>:   ldr     r3, 
[r11, #-104]
0x00045404 <_D2gc3gcx3Gcx16fullcollectshellMFZk+172>:   str     r3, 
[r11, #-108]
0x00045408 <_D2gc3gcx3Gcx16fullcollectshellMFZk+176>:   ldr     r3, 
[r11, #-140]
0x0004540c <_D2gc3gcx3Gcx16fullcollectshellMFZk+180>:   cmp     r3, #0 
; 0x0
0x00045410 <_D2gc3gcx3Gcx16fullcollectshellMFZk+184>:   beq     0x45424 
<_D2gc3gcx3Gcx16fullcollectshellMFZk+204>
0x00045414 <_D2gc3gcx3Gcx16fullcollectshellMFZk+188>:   ldr     r3, 
[r11, #-140]
0x00045418 <_D2gc3gcx3Gcx16fullcollectshellMFZk+192>:   mov     r0, r3
0x0004541c <_D2gc3gcx3Gcx16fullcollectshellMFZk+196>:   bl      0x4241c 
<_D2gc3gcx3Gcx11__invariantMFZv>
0x00045420 <_D2gc3gcx3Gcx16fullcollectshellMFZk+200>:   b       0x45444 
<_D2gc3gcx3Gcx16fullcollectshellMFZk+236>
0x00045424 <_D2gc3gcx3Gcx16fullcollectshellMFZk+204>:   mov     r3, #0 
; 0x0
0x00045428 <_D2gc3gcx3Gcx16fullcollectshellMFZk+208>:   str     r3, 
[r11, #-116]
0x0004542c <_D2gc3gcx3Gcx16fullcollectshellMFZk+212>:   ldr     r3, [pc, 
#48]   ---Type <return> to continue, or q <return> to quit---
; 0x45464 <_D2gc3gcx3Gcx16fullcollectshellMFZk+268>
0x00045430 <_D2gc3gcx3Gcx16fullcollectshellMFZk+216>:   str     r3, 
[r11, #-112]
0x00045434 <_D2gc3gcx3Gcx16fullcollectshellMFZk+220>:   sub     r3, r11, 
#116   ; 0x74
0x00045438 <_D2gc3gcx3Gcx16fullcollectshellMFZk+224>:   ldm     r3, {r0, r1}
0x0004543c <_D2gc3gcx3Gcx16fullcollectshellMFZk+228>:   mov     r2, #0 
; 0x0
0x00045440 <_D2gc3gcx3Gcx16fullcollectshellMFZk+232>:   bl      0x22018 
<_d_assert>
0x00045444 <_D2gc3gcx3Gcx16fullcollectshellMFZk+236>:   ldr     r3, 
[r11, #-108]
0x00045448 <_D2gc3gcx3Gcx16fullcollectshellMFZk+240>:   mov     r0, r3
0x0004544c <_D2gc3gcx3Gcx16fullcollectshellMFZk+244>:   sub     sp, r11, 
#96    ; 0x60
0x00045450 <_D2gc3gcx3Gcx16fullcollectshellMFZk+248>:   vldmia  sp!, 
{d8-d15}
0x00045454 <_D2gc3gcx3Gcx16fullcollectshellMFZk+252>:   pop     {r4, r5, 
r6, r7, r8, r9, r10, r11, pc}
0x00045458 <_D2gc3gcx3Gcx16fullcollectshellMFZk+256>:   andeq   r12, 
r11, r0, asr r8
0x0004545c <_D2gc3gcx3Gcx16fullcollectshellMFZk+260>:   andeq   r12, 
r11, r12, asr r8
0x00045460 <_D2gc3gcx3Gcx16fullcollectshellMFZk+264>:   andeq   r0, r0, 
r9, lsr r9
---Type <return> to continue, or q <return> to quit---
0x00045464 <_D2gc3gcx3Gcx16fullcollectshellMFZk+268>:   andeq   r12, 
r11, r8, lsr #17


-- 
Matthew Caron, Build Engineer
Sixnet, a Red Lion business | www.sixnet.com
+1 (518) 877-5173 x138 office


More information about the D.gnu mailing list