NetBSD-Bugs archive

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

Re: port-arm32/50218: ARM executables linked with native linker on cortex-a9 raises SIGILL



 > what command line are you using for linking?

Please find the compiler/linker options that I have tried out so far.
(Note: All these options resulted in SIGILL)

1.As in PR 49337, I have checked the following commands.(using
"-static" itself results in SIGILL even for a small C program which
just has return statement)
 > cc -Wall -O2 -static -c hello.c
 > cc -static -o first hello.o

2. # gcc -o api.o -DHAVE_CONFIG_H  -I. -I.. -I../include  -c  api.c
    # ld -r -o libyaml.a  api.o
    #gcc –DHAVE_CONFIG_H  –o  test1  -I../include test1.c api.o
Also I have tried to pass explicitly"-be8" to the linker which
resulted in the same SIGILL
(As mentioned in the previous post, I am calling one of the function
in api.c from test1.c
also  in the second case when I reduced library size by commenting
some part of the code in api.c. I was able to execute without any
issue).


3. #gcc -DHAVE_CONFIG_H -I. -I..  -I../include    -msoft-float
-mtune=cortex-a9 -c -o my.o my.c
    #gcc -shared  -fPIC -DPIC -o ./my.o   -L/lib -L/usr/lib
-msoft-float -mtune=cortex-a9 -Wl,-soname libmyx.so.2
    #gcc -I../include -msoft-float -dynamic -mtune=cortex-a9 -g -o
example-deconstructor example-deconstructor.o  ./libmyx.so.2



On Wed, Sep 9, 2015 at 1:40 AM, Matt Thomas <matt%3am-software.com@localhost> wrote:
> The following reply was made to PR port-arm32/50218; it has been noted by GNATS.
>
> From: Matt Thomas <matt%3am-software.com@localhost>
> To: gnats-bugs%NetBSD.org@localhost
> Cc: port-arm32-maintainer%netbsd.org@localhost,
>  gnats-admin%netbsd.org@localhost,
>  netbsd-bugs%netbsd.org@localhost,
>  mzaidibrahime%gmail.com@localhost
> Subject: Re: port-arm32/50218: ARM executables linked with native linker on cortex-a9 raises SIGILL
> Date: Tue, 8 Sep 2015 13:07:09 -0700
>
>  > On Sep 8, 2015, at 5:45 AM, Zaid Ibrahime <mzaidibrahime%gmail.com@localhost> =
>  wrote:
>  >=20
>  > The following reply was made to PR port-arm32/50218; it has been noted =
>  by GNATS.
>  >=20
>  > From: Zaid Ibrahime <mzaidibrahime%gmail.com@localhost>
>  > To: gnats-bugs%netbsd.org@localhost
>  > Cc: port-arm32-maintainer%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,=20
>  >      netbsd-bugs%netbsd.org@localhost
>  > Subject: Re: port-arm32/50218: ARM executables linked with native =
>  linker on
>  > cortex-a9 raises SIGILL
>  > Date: Tue, 8 Sep 2015 18:14:36 +0530
>  >=20
>  >> So is the function where it crashes from libgcc?
>  >=20
>  > No the first instruction of the function itself crashes(due to wrong
>  > endianness). the function was compiled on the target.
>
>  what command line are you using for linking?=
>



Home | Main Index | Thread Index | Old Index