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
The following reply was made to PR port-arm32/50218; it has been noted by GNATS.
From: Zaid Ibrahime <mzaidibrahime%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-arm32/50218: ARM executables linked with native linker on
cortex-a9 raises SIGILL
Date: Tue, 8 Sep 2015 17:12:42 +0530
--001a114c8f042599ff051f3addb1
Content-Type: text/plain; charset=UTF-8
I have reduced the C file in api.c in the working case by commenting some
part of the code. In the case of SIGILL its a full file
On Tue, Sep 8, 2015 at 5:00 PM, Zaid Ibrahime <mzaidibrahime%gmail.com@localhost>
wrote:
> The following reply was made to PR port-arm32/50218; it has been noted by
> GNATS.
>
> 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,
> 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 16:55:57 +0530
>
> --94eb2c032e6048771a051f3aa196
> Content-Type: text/plain; charset=UTF-8
>
> > Are you building from a single c source, or from libs?
> > My bet is the swapping happens fine for c source or "normal" objects,
> > but you are using some lib that has been partially stripped, which kills
> > the $t/$a markers. libgcc was one of those libraries (untill fixed)
>
> I have compiled 1 file.
> gcc -o api.o -DHAVE_CONFIG_H -I. -I.. -I../include -c api.c
>
> Now I have written a simple C function which calls only one function from
> the objs.
>
> gcc -o test2 -DHAVE_CONFIG_H -I. -I.. -I../include test1.c api.o
>
> # ./test2
> pid 447 (test2), uid 0: exited on signal 4 (core not dumped, err = 2)
> [1] Illegal instruction ./test2
>
> # gcc -o api.o -DHAVE_CONFIG_H -I. -I.. -I../include -c api.c
> # gcc -o test2 -DHAVE_CONFIG_H -I. -I.. -I../include test1.c api.o
> # ./test2
> #
>
> The content of the test1.c is always the same.
>
> # cat test1.c
> #include <yaml.h>
>
> int main ()
> {
> yaml_parser_t parser;
> yaml_parser_initialize (&parser);
> return 0;
> }
>
> The obj is correctly endianness swapped in the latter case. Wonder why the
> same function crashes in one case and not the other.
>
>
>
>
> On Tue, Sep 8, 2015 at 12:30 PM, Martin Husemann <martin%duskware.de@localhost>
> wrote:
>
> > The following reply was made to PR port-arm32/50218; it has been noted
> by
> > GNATS.
> >
> > From: Martin Husemann <martin%duskware.de@localhost>
> > To: Zaid Ibrahime <mzaidibrahime%gmail.com@localhost>
> > Cc: gnats-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 08:58:29 +0200
> >
> > On Tue, Sep 08, 2015 at 11:12:40AM +0530, Zaid Ibrahime wrote:
> > > > Small programs(<6K size) does not result in SIGILL as all the
> > > instruction are properly swapped for endianness by the linker.
> > >
> > > > Are you sure that it depends on size of the program?
> >
> > Are you building from a single c source, or from libs?
> > My bet is the swapping happens fine for c source or "normal" objects,
> > but you are using some lib that has been partially stripped, which
> kills
> > the $t/$a markers. libgcc was one of those libraries (untill fixed)
> >
> > Martin
> >
> >
>
> --94eb2c032e6048771a051f3aa196
> Content-Type: text/html; charset=UTF-8
> Content-Transfer-Encoding: quoted-printable
>
> <div dir=3D"ltr"><span style=3D"color:rgb(80,0,80);font-size:12.8px">>
> A=
> re you building from a single c source, or from libs?</span><br
> style=3D"co=
> lor:rgb(80,0,80);font-size:12.8px"><span
> style=3D"color:rgb(80,0,80);font-s=
> ize:12.8px">> My bet is the swapping happens fine for c source or
> "=
> normal" objects,</span><br
> style=3D"color:rgb(80,0,80);font-size:12.8p=
> x"><span style=3D"color:rgb(80,0,80);font-size:12.8px">> but you are
> usi=
> ng some lib that has been partially stripped, which kills</span><br style=
> =3D"color:rgb(80,0,80);font-size:12.8px"><span
> style=3D"color:rgb(80,0,80);=
> font-size:12.8px">> the $t/$a markers. libgcc was one of those
> libraries=
> (untill fixed)</span><br
> style=3D"color:rgb(80,0,80);font-size:12.8px"><di=
> v><span
> style=3D"color:rgb(80,0,80);font-size:12.8px"><br></span></div><div=
> ><font color=3D"#500050"><span style=3D"font-size:12.8px">I have compiled
> 1=
> file.=C2=A0</span></font></div><div><font color=3D"#500050"><span
> style=3D=
> "font-size:12.8px">gcc -o api.o -DHAVE_CONFIG_H =C2=A0-I. -I..
> -I../include=
> =C2=A0-c =C2=A0api.c</span><br></font></div><div><font
> color=3D"#500050"><=
> span style=3D"font-size:12.8px"><br></span></font></div><div><span
> style=3D=
> "color:rgb(80,0,80);font-size:12.8px">Now I have written a simple C
> functio=
> n which calls only one function from the objs.</span><font
> color=3D"#500050=
> "><span style=3D"font-size:12.8px"><br></span></font></div><div><span
> style=
> =3D"color:rgb(80,0,80);font-size:12.8px"><br></span></div><div><div><font
> c=
> olor=3D"#500050"><span style=3D"font-size:12.8px">gcc -o test2
> -DHAVE_CONFI=
> G_H =C2=A0-I. -I.. -I../include test1.c api.o</span></font></div><div
> style=
> =3D"color:rgb(80,0,80);font-size:12.8px"><br></div></div><div
> style=3D""><d=
> iv style=3D"color:rgb(80,0,80);font-size:12.8px"># ./test2</div><div
> style=
> =3D"color:rgb(80,0,80);font-size:12.8px">pid 447 (test2), uid 0: exited
> on =
> signal 4 (core not dumped, err =3D 2)</div><div
> style=3D"color:rgb(80,0,80)=
> ;font-size:12.8px">[1] =C2=A0 Illegal instruction =C2=A0 =C2=A0
> ./test2</di=
> v><div style=3D"color:rgb(80,0,80);font-size:12.8px"><br></div><div style=
> =3D""><div style=3D""><font color=3D"#500050"><span
> style=3D"font-size:12.8=
> px"># gcc -o api.o -DHAVE_CONFIG_H =C2=A0-I. -I.. -I../include =C2=A0-c
> =C2=
> =A0api.c</span></font></div><div style=3D""><font color=3D"#500050"><span
> s=
> tyle=3D"font-size:12.8px"># gcc -o test2 -DHAVE_CONFIG_H =C2=A0-I. -I..
> -I.=
> ./include test1.c api.o</span></font></div><div style=3D""><font
> color=3D"#=
> 500050"><span style=3D"font-size:12.8px">#
> ./test2</span></font></div><div =
> style=3D""><font color=3D"#500050"><span style=3D"font-size:12.8px"># =C2=
> =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
> =
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
> =A0 =C2=A0 =C2=A0</span></font></div><div style=3D""><font
> color=3D"#500050=
> "><span style=3D"font-size:12.8px"><br></span></font></div><div
> style=3D"">=
> <font color=3D"#500050"><span style=3D"font-size:12.8px">The content of
> the=
> test1.c is always the same.</span></font></div><div style=3D""><font
> color=
> =3D"#500050"><span
> style=3D"font-size:12.8px"><br></span></font></div><div =
> style=3D""><font color=3D"#500050"><div style=3D""><span
> style=3D"font-size=
> :12.8px"># cat test1.c</span></div><div style=3D""><span
> style=3D"font-size=
> :12.8px">#include <yaml.h></span></div><div style=3D""><span
> style=3D=
> "font-size:12.8px"><br></span></div><div style=3D""><span
> style=3D"font-siz=
> e:12.8px">int main ()</span></div><div style=3D""><span
> style=3D"font-size:=
> 12.8px">{</span></div><div style=3D""><span
> style=3D"font-size:12.8px">=C2=
> =A0 yaml_parser_t parser;</span></div><div style=3D""><span
> style=3D"font-s=
> ize:12.8px">=C2=A0 yaml_parser_initialize (&parser);</span></div><div
> s=
> tyle=3D""><span style=3D"font-size:12.8px">return 0;</span></div><div
> style=
> =3D""><span style=3D"font-size:12.8px">}</span></div><div
> style=3D"font-siz=
> e:12.8px"><br></div><div style=3D"font-size:12.8px">The obj is correctly
> en=
> dianness swapped in the latter case. Wonder why the same function crashes
> i=
> n one case and not the other.</div></font></div></div></div><div><font
> colo=
> r=3D"#500050"><span
> style=3D"font-size:12.8px"><br></span></font></div><div=
> ><span
> style=3D"color:rgb(80,0,80);font-size:12.8px"><br></span></div><div>=
> <span
> style=3D"color:rgb(80,0,80);font-size:12.8px"><br></span></div></div>=
> <div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Tue, Sep 8,
> 20=
> 15 at 12:30 PM, Martin Husemann <span dir=3D"ltr"><<a href=3D"mailto:
> mar=
> tin%duskware.de@localhost" target=3D"_blank">martin%duskware.de@localhost</a>></span>
> wrote:=
> <br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0
> .8ex;border-lef=
> t:1px #ccc solid;padding-left:1ex"><span class=3D"">The following reply
> was=
> made to PR port-arm32/50218; it has been noted by GNATS.<br>
> <br>
> From: Martin Husemann <<a href=3D"mailto:martin%duskware.de@localhost
> ">martin@dusk=
> ware.de</a>><br>
> </span>To: Zaid Ibrahime <<a href=3D"mailto:mzaidibrahime%gmail.com@localhost
> ">mza=
> idibrahime%gmail.com@localhost</a>><br>
> Cc: <a href=3D"mailto:gnats-bugs%netbsd.org@localhost">gnats-bugs%netbsd.org@localhost
> </a><br>
> <span class=3D"">Subject: Re: port-arm32/50218: ARM executables linked
> with=
> native linker on cortex-a9 raises SIGILL<br>
> </span>Date: Tue, 8 Sep 2015 08:58:29 +0200<br>
> <div class=3D"HOEnZb"><div class=3D"h5"><br>
> =C2=A0On Tue, Sep 08, 2015 at 11:12:40AM +0530, Zaid Ibrahime wrote:<br>
> =C2=A0>=C2=A0 > Small programs(<6K size) does not result in
> SIGILL=
> as all the<br>
> =C2=A0> instruction are properly swapped for endianness by the
> linker.<b=
> r>
> =C2=A0><br>
> =C2=A0>=C2=A0 > Are you sure that it depends on size of the
> program?<=
> br>
> <br>
> =C2=A0Are you building from a single c source, or from libs?<br>
> =C2=A0My bet is the swapping happens fine for c source or
> "normal"=
> ; objects,<br>
> =C2=A0but you are using some lib that has been partially stripped, which
> ki=
> lls<br>
> =C2=A0the $t/$a markers. libgcc was one of those libraries (untill
> fixed)<b=
> r>
> <br>
> =C2=A0Martin<br>
> <br>
> </div></div></blockquote></div><br></div>
>
> --94eb2c032e6048771a051f3aa196--
>
>
--001a114c8f042599ff051f3addb1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I have reduced the C file in api.c in the working case by =
commenting some part of the code. In the case of SIGILL its a full file</di=
v><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Tue, Sep 8, =
2015 at 5:00 PM, Zaid Ibrahime <span dir=3D"ltr"><<a href=3D"mailto:mzai=
dibrahime%gmail.com@localhost" target=3D"_blank">mzaidibrahime%gmail.com@localhost</a>></spa=
n> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><span class=3D"">The following =
reply was made to PR port-arm32/50218; it has been noted by GNATS.<br>
<br>
</span><span class=3D"">From: Zaid Ibrahime <<a href=3D"mailto:mzaidibra=
hime%gmail.com@localhost">mzaidibrahime%gmail.com@localhost</a>><br>
To: <a href=3D"mailto:gnats-bugs%netbsd.org@localhost">gnats-bugs%netbsd.org@localhost</a><br>
Cc: <a href=3D"mailto:port-arm32-maintainer%netbsd.org@localhost">port-arm32-maintain=
er%netbsd.org@localhost</a>, <a href=3D"mailto:gnats-admin%netbsd.org@localhost">gnats-admin@ne=
tbsd.org</a>,<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"mailto:netbsd-bugs%netbsd.org@localhost">netbs=
d-bugs%netbsd.org@localhost</a><br>
</span><span class=3D"">Subject: Re: port-arm32/50218: ARM executables link=
ed with native linker on<br>
=C2=A0cortex-a9 raises SIGILL<br>
</span>Date: Tue, 8 Sep 2015 16:55:57 +0530<br>
<br>
=C2=A0--94eb2c032e6048771a051f3aa196<br>
=C2=A0Content-Type: text/plain; charset=3DUTF-8<br>
<div><div class=3D"h5"><br>
=C2=A0> Are you building from a single c source, or from libs?<br>
=C2=A0> My bet is the swapping happens fine for c source or "normal=
" objects,<br>
=C2=A0> but you are using some lib that has been partially stripped, whi=
ch kills<br>
=C2=A0> the $t/$a markers. libgcc was one of those libraries (untill fix=
ed)<br>
<br>
=C2=A0I have compiled 1 file.<br>
=C2=A0gcc -o api.o -DHAVE_CONFIG_H=C2=A0 -I. -I.. -I../include=C2=A0 -c=C2=
=A0 api.c<br>
<br>
=C2=A0Now I have written a simple C function which calls only one function =
from<br>
=C2=A0the objs.<br>
<br>
=C2=A0gcc -o test2 -DHAVE_CONFIG_H=C2=A0 -I. -I.. -I../include test1.c api.=
o<br>
<br>
=C2=A0# ./test2<br>
=C2=A0pid 447 (test2), uid 0: exited on signal 4 (core not dumped, err =3D =
2)<br>
=C2=A0[1]=C2=A0 =C2=A0Illegal instruction=C2=A0 =C2=A0 =C2=A0./test2<br>
<br>
=C2=A0# gcc -o api.o -DHAVE_CONFIG_H=C2=A0 -I. -I.. -I../include=C2=A0 -c=
=C2=A0 api.c<br>
=C2=A0# gcc -o test2 -DHAVE_CONFIG_H=C2=A0 -I. -I.. -I../include test1.c ap=
i.o<br>
=C2=A0# ./test2<br>
=C2=A0#<br>
<br>
=C2=A0The content of the test1.c is always the same.<br>
<br>
=C2=A0# cat test1.c<br>
=C2=A0#include <yaml.h><br>
<br>
=C2=A0int main ()<br>
=C2=A0{<br>
=C2=A0 =C2=A0yaml_parser_t parser;<br>
=C2=A0 =C2=A0yaml_parser_initialize (&parser);<br>
=C2=A0return 0;<br>
=C2=A0}<br>
<br>
=C2=A0The obj is correctly endianness swapped in the latter case. Wonder wh=
y the<br>
=C2=A0same function crashes in one case and not the other.<br>
<br>
<br>
<br>
<br>
=C2=A0On Tue, Sep 8, 2015 at 12:30 PM, Martin Husemann <<a href=3D"mailt=
o:martin%duskware.de@localhost">martin%duskware.de@localhost</a>> wrote:<br>
<br>
=C2=A0> The following reply was made to PR port-arm32/50218; it has been=
noted by<br>
=C2=A0> GNATS.<br>
=C2=A0><br>
=C2=A0> From: Martin Husemann <<a href=3D"mailto:martin%duskware.de@localhost">=
martin%duskware.de@localhost</a>><br>
=C2=A0> To: Zaid Ibrahime <<a href=3D"mailto:mzaidibrahime%gmail.com@localhost"=
>mzaidibrahime%gmail.com@localhost</a>><br>
=C2=A0> Cc: <a href=3D"mailto:gnats-bugs%netbsd.org@localhost">gnats-bugs@netbsd.o=
rg</a><br>
=C2=A0> Subject: Re: port-arm32/50218: ARM executables linked with nativ=
e linker<br>
=C2=A0> on cortex-a9 raises SIGILL<br>
=C2=A0> Date: Tue, 8 Sep 2015 08:58:29 +0200<br>
=C2=A0><br>
=C2=A0>=C2=A0 On Tue, Sep 08, 2015 at 11:12:40AM +0530, Zaid Ibrahime wr=
ote:<br>
=C2=A0>=C2=A0 >=C2=A0 > Small programs(<6K size) does not resul=
t in SIGILL as all the<br>
=C2=A0>=C2=A0 > instruction are properly swapped for endianness by th=
e linker.<br>
=C2=A0>=C2=A0 ><br>
=C2=A0>=C2=A0 >=C2=A0 > Are you sure that it depends on size of th=
e program?<br>
=C2=A0><br>
=C2=A0>=C2=A0 Are you building from a single c source, or from libs?<br>
=C2=A0>=C2=A0 My bet is the swapping happens fine for c source or "=
normal" objects,<br>
=C2=A0>=C2=A0 but you are using some lib that has been partially strippe=
d, which kills<br>
=C2=A0>=C2=A0 the $t/$a markers. libgcc was one of those libraries (unti=
ll fixed)<br>
=C2=A0><br>
=C2=A0>=C2=A0 Martin<br>
=C2=A0><br>
=C2=A0><br>
<br>
</div></div>=C2=A0--94eb2c032e6048771a051f3aa196<br>
<span class=3D"">=C2=A0Content-Type: text/html; charset=3DUTF-8<br>
=C2=A0Content-Transfer-Encoding: quoted-printable<br>
<br>
</span>=C2=A0<div dir=3D3D"ltr"><span style=3D3D"co=
lor:rgb(80,0,80);font-size:12.8px">&gt; A=3D<br>
=C2=A0re you building from a single c source, or from libs?</span><=
;br style=3D3D"co=3D<br>
=C2=A0lor:rgb(80,0,80);font-size:12.8px"><span style=3D3D"c=
olor:rgb(80,0,80);font-s=3D<br>
=C2=A0ize:12.8px">&gt; My bet is the swapping happens fine for =
c source or &quot;=3D<br>
=C2=A0normal&quot; objects,</span><br style=3D3D"color:rg=
b(80,0,80);font-size:12.8p=3D<br>
=C2=A0x"><span style=3D3D"color:rgb(80,0,80);font-size:12.8=
px">&gt; but you are usi=3D<br>
=C2=A0ng some lib that has been partially stripped, which kills</span>=
;<br style=3D<br>
=C2=A0=3D3D"color:rgb(80,0,80);font-size:12.8px"><span styl=
e=3D3D"color:rgb(80,0,80);=3D<br>
=C2=A0font-size:12.8px">&gt; the $t/$a markers. libgcc was one =
of those libraries=3D<br>
=C2=A0 (untill fixed)</span><br style=3D3D"color:rgb(80,0,80)=
;font-size:12.8px"><di=3D<br>
=C2=A0v><span style=3D3D"color:rgb(80,0,80);font-size:12.8px&quo=
t;><br></span></div><div=3D<br>
=C2=A0><font color=3D3D"#500050"><span style=3D3D&quo=
t;font-size:12.8px">I have compiled 1=3D<br>
=C2=A0 file.=3DC2=3DA0</span></font></div><div><=
font color=3D3D"#500050"><span style=3D3D=3D<br>
=C2=A0"font-size:12.8px">gcc -o api.o -DHAVE_CONFIG_H =3DC2=3D=
A0-I. -I.. -I../include=3D<br>
=C2=A0 =3DC2=3DA0-c =3DC2=3DA0api.c</span><br></font><=
/div><div><font color=3D3D"#500050"><=3D<br>
=C2=A0span style=3D3D"font-size:12.8px"><br></span>=
;</font></div><div><span style=3D3D=3D<br>
=C2=A0"color:rgb(80,0,80);font-size:12.8px">Now I have written=
a simple C functio=3D<br>
=C2=A0n which calls only one function from the objs.</span><font c=
olor=3D3D"#500050=3D<br>
=C2=A0"><span style=3D3D"font-size:12.8px"><br&g=
t;</span></font></div><div><span style=3D<br>
=C2=A0=3D3D"color:rgb(80,0,80);font-size:12.8px"><br><=
;/span></div><div><div><font c=3D<br>
=C2=A0olor=3D3D"#500050"><span style=3D3D"font-size:12=
.8px">gcc -o test2 -DHAVE_CONFI=3D<br>
=C2=A0G_H =3DC2=3DA0-I. -I.. -I../include test1.c api.o</span></fo=
nt></div><div style=3D<br>
=C2=A0=3D3D"color:rgb(80,0,80);font-size:12.8px"><br><=
;/div></div><div style=3D3D""><d=3D<br>
=C2=A0iv style=3D3D"color:rgb(80,0,80);font-size:12.8px"># ./t=
est2</div><div style=3D<br>
=C2=A0=3D3D"color:rgb(80,0,80);font-size:12.8px">pid 447 (test=
2), uid 0: exited on =3D<br>
=C2=A0signal 4 (core not dumped, err =3D3D 2)</div><div style=3D3D=
"color:rgb(80,0,80)=3D<br>
=C2=A0;font-size:12.8px">[1] =3DC2=3DA0 Illegal instruction =3DC2=
=3DA0 =3DC2=3DA0 ./test2</di=3D<br>
=C2=A0v><div style=3D3D"color:rgb(80,0,80);font-size:12.8px"=
;><br></div><div style=3D<br>
=C2=A0=3D3D""><div style=3D3D""><font color=
=3D3D"#500050"><span style=3D3D"font-size:12.8=3D<br>
=C2=A0px"># gcc -o api.o -DHAVE_CONFIG_H =3DC2=3DA0-I. -I.. -I../in=
clude =3DC2=3DA0-c =3DC2=3D<br>
=C2=A0=3DA0api.c</span></font></div><div style=3D3D&qu=
ot;"><font color=3D3D"#500050"><span s=3D<br>
=C2=A0tyle=3D3D"font-size:12.8px"># gcc -o test2 -DHAVE_CONFIG=
_H =3DC2=3DA0-I. -I.. -I.=3D<br>
=C2=A0./include test1.c api.o</span></font></div><div =
style=3D3D""><font color=3D3D"#=3D<br>
=C2=A0500050"><span style=3D3D"font-size:12.8px"># =
./test2</span></font></div><div =3D<br>
=C2=A0style=3D3D""><font color=3D3D"#500050">&=
lt;span style=3D3D"font-size:12.8px"># =3DC2=3D<br>
=C2=A0=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3D=
A0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3D<br>
=C2=A0=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3D=
C2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3D<br>
=C2=A0=3DA0 =3DC2=3DA0 =3DC2=3DA0</span></font></div><=
div style=3D3D""><font color=3D3D"#500050=3D<br>
=C2=A0"><span style=3D3D"font-size:12.8px"><br&g=
t;</span></font></div><div style=3D3D"">=
=3D<br>
=C2=A0<font color=3D3D"#500050"><span style=3D3D"fo=
nt-size:12.8px">The content of the=3D<br>
=C2=A0 test1.c is always the same.</span></font></div><=
;div style=3D3D""><font color=3D<br>
=C2=A0=3D3D"#500050"><span style=3D3D"font-size:12.8px=
"><br></span></font></div><div =3D<br>
=C2=A0style=3D3D""><font color=3D3D"#500050">&=
lt;div style=3D3D""><span style=3D3D"font-size=3D<br>
=C2=A0:12.8px"># cat test1.c</span></div><div style=
=3D3D""><span style=3D3D"font-size=3D<br>
=C2=A0:12.8px">#include &lt;yaml.h&gt;</span></div=
><div style=3D3D""><span style=3D3D=3D<br>
=C2=A0"font-size:12.8px"><br></span></div>&l=
t;div style=3D3D""><span style=3D3D"font-siz=3D<br>
=C2=A0e:12.8px">int main ()</span></div><div style=
=3D3D""><span style=3D3D"font-size:=3D<br>
=C2=A012.8px">{</span></div><div style=3D3D"&qu=
ot;><span style=3D3D"font-size:12.8px">=3DC2=3D<br>
=C2=A0=3DA0 yaml_parser_t parser;</span></div><div style=3D3=
D""><span style=3D3D"font-s=3D<br>
=C2=A0ize:12.8px">=3DC2=3DA0 yaml_parser_initialize (&amp;parse=
r);</span></div><div s=3D<br>
=C2=A0tyle=3D3D""><span style=3D3D"font-size:12.8px&qu=
ot;>return 0;</span></div><div style=3D<br>
=C2=A0=3D3D""><span style=3D3D"font-size:12.8px"&=
gt;}</span></div><div style=3D3D"font-siz=3D<br>
=C2=A0e:12.8px"><br></div><div style=3D3D"font-=
size:12.8px">The obj is correctly en=3D<br>
=C2=A0dianness swapped in the latter case. Wonder why the same function cra=
shes i=3D<br>
=C2=A0n one case and not the other.</div></font></div><=
;/div></div><div><font colo=3D<br>
=C2=A0r=3D3D"#500050"><span style=3D3D"font-size:12.8p=
x"><br></span></font></div><div=3D<br>
=C2=A0><span style=3D3D"color:rgb(80,0,80);font-size:12.8px"=
;><br></span></div><div>=3D<br>
=C2=A0<span style=3D3D"color:rgb(80,0,80);font-size:12.8px">=
;<br></span></div></div>=3D<br>
=C2=A0<div class=3D3D"gmail_extra"><br><div class=
=3D3D"gmail_quote">On Tue, Sep 8, 20=3D<br>
=C2=A015 at 12:30 PM, Martin Husemann <span dir=3D3D"ltr">&=
amp;lt;<a href=3D3D"mailto:<a href=3D"mailto:mar">mar</a>=3D<br>
=C2=A0<a href=3D"mailto:tin%duskware.de@localhost">tin%duskware.de@localhost</a>" target=
=3D3D"_blank"><a href=3D"mailto:martin%duskware.de@localhost">martin@dus=
kware.de</a></a>&gt;</span> wrote:=3D<br>
=C2=A0<br><blockquote class=3D3D"gmail_quote" style=3D3D=
"margin:0 0 0 .8ex;border-lef=3D<br>
=C2=A0t:1px #ccc solid;padding-left:1ex"><span class=3D3D"&=
quot;>The following reply was=3D<br>
<span class=3D"">=C2=A0 made to PR port-arm32/50218; it has been noted by G=
NATS.<br><br>
=C2=A0<br><br>
=C2=A0From: Martin Husemann &lt;<a href=3D3D"mailto:<a href=3D"=
mailto:martin%duskware.de@localhost">martin%duskware.de@localhost</a>">martin@dusk=3D<b=
r>
=C2=A0<a href=3D"http://ware.de" rel=3D"noreferrer" target=3D"_blank">ware.=
de</a></a>&gt;<br><br>
</span>=C2=A0</span>To: Zaid Ibrahime &lt;<a href=3D3D"ma=
ilto:<a href=3D"mailto:mzaidibrahime%gmail.com@localhost">mzaidibrahime%gmail.com@localhost</a>=
">mza=3D<br>
=C2=A0<a href=3D"mailto:idibrahime%gmail.com@localhost">idibrahime%gmail.com@localhost</a></=
a>&gt;<br><br>
=C2=A0Cc: <a href=3D3D"mailto:<a href=3D"mailto:gnats-bugs@netbsd.o=
rg">gnats-bugs%netbsd.org@localhost</a>"><a href=3D"mailto:gnats-bugs@netbsd.=
org">gnats-bugs%netbsd.org@localhost</a></a><br><br>
=C2=A0<span class=3D3D"">Subject: Re: port-arm32/50218: ARM=
executables linked with=3D<br>
=C2=A0 native linker on cortex-a9 raises SIGILL<br><br>
=C2=A0</span>Date: Tue, 8 Sep 2015 08:58:29 +0200<br><br>
=C2=A0<div class=3D3D"HOEnZb"><div class=3D3D"h5&qu=
ot;><br><br>
=C2=A0=3DC2=3DA0On Tue, Sep 08, 2015 at 11:12:40AM +0530, Zaid Ibrahime wro=
te:<br><br>
=C2=A0=3DC2=3DA0&gt;=3DC2=3DA0 &gt; Small programs(&lt;6K size)=
does not result in SIGILL=3D<br>
=C2=A0 as all the<br><br>
=C2=A0=3DC2=3DA0&gt; instruction are properly swapped for endianness by=
the linker.<b=3D<br>
=C2=A0r><br>
=C2=A0=3DC2=3DA0&gt;<br><br>
=C2=A0=3DC2=3DA0&gt;=3DC2=3DA0 &gt; Are you sure that it depends on=
size of the program?<=3D<br>
=C2=A0br><br>
=C2=A0<br><br>
=C2=A0=3DC2=3DA0Are you building from a single c source, or from libs?<b=
r><br>
=C2=A0=3DC2=3DA0My bet is the swapping happens fine for c source or &qu=
ot;normal&quot=3D<br>
=C2=A0; objects,<br><br>
=C2=A0=3DC2=3DA0but you are using some lib that has been partially stripped=
, which ki=3D<br>
=C2=A0lls<br><br>
=C2=A0=3DC2=3DA0the $t/$a markers. libgcc was one of those libraries (until=
l fixed)<b=3D<br>
=C2=A0r><br>
=C2=A0<br><br>
=C2=A0=3DC2=3DA0Martin<br><br>
=C2=A0<br><br>
=C2=A0</div></div></blockquote></div><br><=
/div><br>
<br>
=C2=A0--94eb2c032e6048771a051f3aa196--<br>
<br>
</blockquote></div><br></div>
--001a114c8f042599ff051f3addb1--
Home |
Main Index |
Thread Index |
Old Index