Subject: Re: PR 12312 - madplay dumps core
To: Ignatios Souvatzis <is@netbsd.org>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 03/17/2001 12:05:30
> On Tue, Mar 13, 2001 at 05:44:13PM +0000, Nick Hudson wrote:
> > Have you got a build log and a backtrace?
> build log is attached. Here's my gdb session:
> 
> marie mad-0.12.5b !% ./madplay ~/meu_anjo.mp3
> MPEG Audio Decoder 0.12.5 (beta) - Copyright (C) 2000-2001 Robert Leslie
> Segmentation fault (core dumped)
> marie mad-0.12.5b !% gdb .libs/madplay *core
[...]
> #0  0x2004a738 in loop ()
> (gdb) where
> #0  0x2004a738 in loop ()
> Cannot access memory at address 0xefbfcfb8.
> (gdb) disas 0x2004a730 0x20041740
> Dump of assembler code from 0x2004a730 to 0x20041740:
> End of assembler dump.
> (gdb) disas 0x2004a730 0x2004a740
> Dump of assembler code from 0x2004a730 to 0x2004a740:
> 0x2004a730 <III_imdct_l+560>:   ldr     r2, 0x2004ae2c <$$lit_a1+24>
> 0x2004a734 <loop>:      ldr     ip, [r0]
> 0x2004a738 <loop+4>:    ldmia   r2!, {r5, r6, r7, r8, r9, sl, fp}
> 0x2004a73c <loop+8>:    smull   r3, r4, r5, ip

This code sequence (wherever it's from) is not valid pic code (though the 
address indicates it's in a shared library).  So the first step is find 
which file it's from, then find what command was used to compile it and 
then fix the rules to ensure that -fPIC is passed to the compiler when 
building shared-library code.