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">&gt;
 > 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">&gt; My bet is the swapping happens fine for c source or
 > &quot;=
 >  normal&quot; 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">&gt; 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">&gt; 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 &lt;yaml.h&gt;</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 (&amp;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">&lt;<a href=3D"mailto:
 > mar=
 >  tin%duskware.de@localhost" target=3D"_blank">martin%duskware.de@localhost</a>&gt;</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 &lt;<a href=3D"mailto:martin%duskware.de@localhost
 > ">martin@dusk=
 >  ware.de</a>&gt;<br>
 >  </span>To: Zaid Ibrahime &lt;<a href=3D"mailto:mzaidibrahime%gmail.com@localhost
 > ">mza=
 >  idibrahime%gmail.com@localhost</a>&gt;<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&gt;=C2=A0 &gt; Small programs(&lt;6K size) does not result in
 > SIGILL=
 >   as all the<br>
 >  =C2=A0&gt; instruction are properly swapped for endianness by the
 > linker.<b=
 >  r>
 >  =C2=A0&gt;<br>
 >  =C2=A0&gt;=C2=A0 &gt; 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
 > &quot;normal&quot=
 >  ; 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">&lt;<a href=3D"mailto:mzai=
 dibrahime%gmail.com@localhost" target=3D"_blank">mzaidibrahime%gmail.com@localhost</a>&gt;</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 &lt;<a href=3D"mailto:mzaidibra=
 hime%gmail.com@localhost">mzaidibrahime%gmail.com@localhost</a>&gt;<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&gt; Are you building from a single c source, or from libs?<br>
 =C2=A0&gt; My bet is the swapping happens fine for c source or &quot;normal=
 &quot; objects,<br>
 =C2=A0&gt; but you are using some lib that has been partially stripped, whi=
 ch kills<br>
 =C2=A0&gt; 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 &lt;yaml.h&gt;<br>
 <br>
 =C2=A0int main ()<br>
 =C2=A0{<br>
 =C2=A0 =C2=A0yaml_parser_t parser;<br>
 =C2=A0 =C2=A0yaml_parser_initialize (&amp;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 &lt;<a href=3D"mailt=
 o:martin%duskware.de@localhost">martin%duskware.de@localhost</a>&gt; wrote:<br>
 <br>
 =C2=A0&gt; The following reply was made to PR port-arm32/50218; it has been=
  noted by<br>
 =C2=A0&gt; GNATS.<br>
 =C2=A0&gt;<br>
 =C2=A0&gt; From: Martin Husemann &lt;<a href=3D"mailto:martin%duskware.de@localhost";>=
 martin%duskware.de@localhost</a>&gt;<br>
 =C2=A0&gt; To: Zaid Ibrahime &lt;<a href=3D"mailto:mzaidibrahime%gmail.com@localhost"=
 >mzaidibrahime%gmail.com@localhost</a>&gt;<br>
 =C2=A0&gt; Cc: <a href=3D"mailto:gnats-bugs%netbsd.org@localhost";>gnats-bugs@netbsd.o=
 rg</a><br>
 =C2=A0&gt; Subject: Re: port-arm32/50218: ARM executables linked with nativ=
 e linker<br>
 =C2=A0&gt; on cortex-a9 raises SIGILL<br>
 =C2=A0&gt; Date: Tue, 8 Sep 2015 08:58:29 +0200<br>
 =C2=A0&gt;<br>
 =C2=A0&gt;=C2=A0 On Tue, Sep 08, 2015 at 11:12:40AM +0530, Zaid Ibrahime wr=
 ote:<br>
 =C2=A0&gt;=C2=A0 &gt;=C2=A0 &gt; Small programs(&lt;6K size) does not resul=
 t in SIGILL as all the<br>
 =C2=A0&gt;=C2=A0 &gt; instruction are properly swapped for endianness by th=
 e linker.<br>
 =C2=A0&gt;=C2=A0 &gt;<br>
 =C2=A0&gt;=C2=A0 &gt;=C2=A0 &gt; Are you sure that it depends on size of th=
 e program?<br>
 =C2=A0&gt;<br>
 =C2=A0&gt;=C2=A0 Are you building from a single c source, or from libs?<br>
 =C2=A0&gt;=C2=A0 My bet is the swapping happens fine for c source or &quot;=
 normal&quot; objects,<br>
 =C2=A0&gt;=C2=A0 but you are using some lib that has been partially strippe=
 d, which kills<br>
 =C2=A0&gt;=C2=A0 the $t/$a markers. libgcc was one of those libraries (unti=
 ll fixed)<br>
 =C2=A0&gt;<br>
 =C2=A0&gt;=C2=A0 Martin<br>
 =C2=A0&gt;<br>
 =C2=A0&gt;<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&lt;div dir=3D3D&quot;ltr&quot;&gt;&lt;span style=3D3D&quot;co=
 lor:rgb(80,0,80);font-size:12.8px&quot;&gt;&amp;gt; A=3D<br>
 =C2=A0re you building from a single c source, or from libs?&lt;/span&gt;&lt=
 ;br style=3D3D&quot;co=3D<br>
 =C2=A0lor:rgb(80,0,80);font-size:12.8px&quot;&gt;&lt;span style=3D3D&quot;c=
 olor:rgb(80,0,80);font-s=3D<br>
 =C2=A0ize:12.8px&quot;&gt;&amp;gt; My bet is the swapping happens fine for =
 c source or &amp;quot;=3D<br>
 =C2=A0normal&amp;quot; objects,&lt;/span&gt;&lt;br style=3D3D&quot;color:rg=
 b(80,0,80);font-size:12.8p=3D<br>
 =C2=A0x&quot;&gt;&lt;span style=3D3D&quot;color:rgb(80,0,80);font-size:12.8=
 px&quot;&gt;&amp;gt; but you are usi=3D<br>
 =C2=A0ng some lib that has been partially stripped, which kills&lt;/span&gt=
 ;&lt;br style=3D<br>
 =C2=A0=3D3D&quot;color:rgb(80,0,80);font-size:12.8px&quot;&gt;&lt;span styl=
 e=3D3D&quot;color:rgb(80,0,80);=3D<br>
 =C2=A0font-size:12.8px&quot;&gt;&amp;gt; the $t/$a markers. libgcc was one =
 of those libraries=3D<br>
 =C2=A0 (untill fixed)&lt;/span&gt;&lt;br style=3D3D&quot;color:rgb(80,0,80)=
 ;font-size:12.8px&quot;&gt;&lt;di=3D<br>
 =C2=A0v&gt;&lt;span style=3D3D&quot;color:rgb(80,0,80);font-size:12.8px&quo=
 t;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div=3D<br>
 =C2=A0&gt;&lt;font color=3D3D&quot;#500050&quot;&gt;&lt;span style=3D3D&quo=
 t;font-size:12.8px&quot;&gt;I have compiled 1=3D<br>
 =C2=A0 file.=3DC2=3DA0&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;=
 font color=3D3D&quot;#500050&quot;&gt;&lt;span style=3D3D=3D<br>
 =C2=A0&quot;font-size:12.8px&quot;&gt;gcc -o api.o -DHAVE_CONFIG_H =3DC2=3D=
 A0-I. -I.. -I../include=3D<br>
 =C2=A0 =3DC2=3DA0-c =3DC2=3DA0api.c&lt;/span&gt;&lt;br&gt;&lt;/font&gt;&lt;=
 /div&gt;&lt;div&gt;&lt;font color=3D3D&quot;#500050&quot;&gt;&lt;=3D<br>
 =C2=A0span style=3D3D&quot;font-size:12.8px&quot;&gt;&lt;br&gt;&lt;/span&gt=
 ;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=3D3D=3D<br>
 =C2=A0&quot;color:rgb(80,0,80);font-size:12.8px&quot;&gt;Now I have written=
  a simple C functio=3D<br>
 =C2=A0n which calls only one function from the objs.&lt;/span&gt;&lt;font c=
 olor=3D3D&quot;#500050=3D<br>
 =C2=A0&quot;&gt;&lt;span style=3D3D&quot;font-size:12.8px&quot;&gt;&lt;br&g=
 t;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=3D<br>
 =C2=A0=3D3D&quot;color:rgb(80,0,80);font-size:12.8px&quot;&gt;&lt;br&gt;&lt=
 ;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font c=3D<br>
 =C2=A0olor=3D3D&quot;#500050&quot;&gt;&lt;span style=3D3D&quot;font-size:12=
 .8px&quot;&gt;gcc -o test2 -DHAVE_CONFI=3D<br>
 =C2=A0G_H =3DC2=3DA0-I. -I.. -I../include test1.c api.o&lt;/span&gt;&lt;/fo=
 nt&gt;&lt;/div&gt;&lt;div style=3D<br>
 =C2=A0=3D3D&quot;color:rgb(80,0,80);font-size:12.8px&quot;&gt;&lt;br&gt;&lt=
 ;/div&gt;&lt;/div&gt;&lt;div style=3D3D&quot;&quot;&gt;&lt;d=3D<br>
 =C2=A0iv style=3D3D&quot;color:rgb(80,0,80);font-size:12.8px&quot;&gt;# ./t=
 est2&lt;/div&gt;&lt;div style=3D<br>
 =C2=A0=3D3D&quot;color:rgb(80,0,80);font-size:12.8px&quot;&gt;pid 447 (test=
 2), uid 0: exited on =3D<br>
 =C2=A0signal 4 (core not dumped, err =3D3D 2)&lt;/div&gt;&lt;div style=3D3D=
 &quot;color:rgb(80,0,80)=3D<br>
 =C2=A0;font-size:12.8px&quot;&gt;[1] =3DC2=3DA0 Illegal instruction =3DC2=
 =3DA0 =3DC2=3DA0 ./test2&lt;/di=3D<br>
 =C2=A0v&gt;&lt;div style=3D3D&quot;color:rgb(80,0,80);font-size:12.8px&quot=
 ;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=3D<br>
 =C2=A0=3D3D&quot;&quot;&gt;&lt;div style=3D3D&quot;&quot;&gt;&lt;font color=
 =3D3D&quot;#500050&quot;&gt;&lt;span style=3D3D&quot;font-size:12.8=3D<br>
 =C2=A0px&quot;&gt;# gcc -o api.o -DHAVE_CONFIG_H =3DC2=3DA0-I. -I.. -I../in=
 clude =3DC2=3DA0-c =3DC2=3D<br>
 =C2=A0=3DA0api.c&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=3D3D&qu=
 ot;&quot;&gt;&lt;font color=3D3D&quot;#500050&quot;&gt;&lt;span s=3D<br>
 =C2=A0tyle=3D3D&quot;font-size:12.8px&quot;&gt;# gcc -o test2 -DHAVE_CONFIG=
 _H =3DC2=3DA0-I. -I.. -I.=3D<br>
 =C2=A0./include test1.c api.o&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div =
 style=3D3D&quot;&quot;&gt;&lt;font color=3D3D&quot;#=3D<br>
 =C2=A0500050&quot;&gt;&lt;span style=3D3D&quot;font-size:12.8px&quot;&gt;# =
 ./test2&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div =3D<br>
 =C2=A0style=3D3D&quot;&quot;&gt;&lt;font color=3D3D&quot;#500050&quot;&gt;&=
 lt;span style=3D3D&quot;font-size:12.8px&quot;&gt;# =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&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;=
 div style=3D3D&quot;&quot;&gt;&lt;font color=3D3D&quot;#500050=3D<br>
 =C2=A0&quot;&gt;&lt;span style=3D3D&quot;font-size:12.8px&quot;&gt;&lt;br&g=
 t;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=3D3D&quot;&quot;&gt;=
 =3D<br>
 =C2=A0&lt;font color=3D3D&quot;#500050&quot;&gt;&lt;span style=3D3D&quot;fo=
 nt-size:12.8px&quot;&gt;The content of the=3D<br>
 =C2=A0 test1.c is always the same.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt=
 ;div style=3D3D&quot;&quot;&gt;&lt;font color=3D<br>
 =C2=A0=3D3D&quot;#500050&quot;&gt;&lt;span style=3D3D&quot;font-size:12.8px=
 &quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div =3D<br>
 =C2=A0style=3D3D&quot;&quot;&gt;&lt;font color=3D3D&quot;#500050&quot;&gt;&=
 lt;div style=3D3D&quot;&quot;&gt;&lt;span style=3D3D&quot;font-size=3D<br>
 =C2=A0:12.8px&quot;&gt;# cat test1.c&lt;/span&gt;&lt;/div&gt;&lt;div style=
 =3D3D&quot;&quot;&gt;&lt;span style=3D3D&quot;font-size=3D<br>
 =C2=A0:12.8px&quot;&gt;#include &amp;lt;yaml.h&amp;gt;&lt;/span&gt;&lt;/div=
 &gt;&lt;div style=3D3D&quot;&quot;&gt;&lt;span style=3D3D=3D<br>
 =C2=A0&quot;font-size:12.8px&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&l=
 t;div style=3D3D&quot;&quot;&gt;&lt;span style=3D3D&quot;font-siz=3D<br>
 =C2=A0e:12.8px&quot;&gt;int main ()&lt;/span&gt;&lt;/div&gt;&lt;div style=
 =3D3D&quot;&quot;&gt;&lt;span style=3D3D&quot;font-size:=3D<br>
 =C2=A012.8px&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=3D3D&quot;&qu=
 ot;&gt;&lt;span style=3D3D&quot;font-size:12.8px&quot;&gt;=3DC2=3D<br>
 =C2=A0=3DA0 yaml_parser_t parser;&lt;/span&gt;&lt;/div&gt;&lt;div style=3D3=
 D&quot;&quot;&gt;&lt;span style=3D3D&quot;font-s=3D<br>
 =C2=A0ize:12.8px&quot;&gt;=3DC2=3DA0 yaml_parser_initialize (&amp;amp;parse=
 r);&lt;/span&gt;&lt;/div&gt;&lt;div s=3D<br>
 =C2=A0tyle=3D3D&quot;&quot;&gt;&lt;span style=3D3D&quot;font-size:12.8px&qu=
 ot;&gt;return 0;&lt;/span&gt;&lt;/div&gt;&lt;div style=3D<br>
 =C2=A0=3D3D&quot;&quot;&gt;&lt;span style=3D3D&quot;font-size:12.8px&quot;&=
 gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=3D3D&quot;font-siz=3D<br>
 =C2=A0e:12.8px&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=3D3D&quot;font-=
 size:12.8px&quot;&gt;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.&lt;/div&gt;&lt;/font&gt;&lt;/div&gt;&lt=
 ;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;font colo=3D<br>
 =C2=A0r=3D3D&quot;#500050&quot;&gt;&lt;span style=3D3D&quot;font-size:12.8p=
 x&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div=3D<br>
 =C2=A0&gt;&lt;span style=3D3D&quot;color:rgb(80,0,80);font-size:12.8px&quot=
 ;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;=3D<br>
 =C2=A0&lt;span style=3D3D&quot;color:rgb(80,0,80);font-size:12.8px&quot;&gt=
 ;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;=3D<br>
 =C2=A0&lt;div class=3D3D&quot;gmail_extra&quot;&gt;&lt;br&gt;&lt;div class=
 =3D3D&quot;gmail_quote&quot;&gt;On Tue, Sep 8, 20=3D<br>
 =C2=A015 at 12:30 PM, Martin Husemann &lt;span dir=3D3D&quot;ltr&quot;&gt;&=
 amp;lt;&lt;a href=3D3D&quot;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>&quot; target=
 =3D3D&quot;_blank&quot;&gt;<a href=3D"mailto:martin%duskware.de@localhost";>martin@dus=
 kware.de</a>&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:=3D<br>
 =C2=A0&lt;br&gt;&lt;blockquote class=3D3D&quot;gmail_quote&quot; style=3D3D=
 &quot;margin:0 0 0 .8ex;border-lef=3D<br>
 =C2=A0t:1px #ccc solid;padding-left:1ex&quot;&gt;&lt;span class=3D3D&quot;&=
 quot;&gt;The following reply was=3D<br>
 <span class=3D"">=C2=A0 made to PR port-arm32/50218; it has been noted by G=
 NATS.&lt;br&gt;<br>
 =C2=A0&lt;br&gt;<br>
 =C2=A0From: Martin Husemann &amp;lt;&lt;a href=3D3D&quot;mailto:<a href=3D"=
 mailto:martin%duskware.de@localhost";>martin%duskware.de@localhost</a>&quot;&gt;martin@dusk=3D<b=
 r>
 =C2=A0<a href=3D"http://ware.de"; rel=3D"noreferrer" target=3D"_blank">ware.=
 de</a>&lt;/a&gt;&amp;gt;&lt;br&gt;<br>
 </span>=C2=A0&lt;/span&gt;To: Zaid Ibrahime &amp;lt;&lt;a href=3D3D&quot;ma=
 ilto:<a href=3D"mailto:mzaidibrahime%gmail.com@localhost";>mzaidibrahime%gmail.com@localhost</a>=
 &quot;&gt;mza=3D<br>
 =C2=A0<a href=3D"mailto:idibrahime%gmail.com@localhost";>idibrahime%gmail.com@localhost</a>&lt;/=
 a&gt;&amp;gt;&lt;br&gt;<br>
 =C2=A0Cc: &lt;a href=3D3D&quot;mailto:<a href=3D"mailto:gnats-bugs@netbsd.o=
 rg">gnats-bugs%netbsd.org@localhost</a>&quot;&gt;<a href=3D"mailto:gnats-bugs@netbsd.=
 org">gnats-bugs%netbsd.org@localhost</a>&lt;/a&gt;&lt;br&gt;<br>
 =C2=A0&lt;span class=3D3D&quot;&quot;&gt;Subject: Re: port-arm32/50218: ARM=
  executables linked with=3D<br>
 =C2=A0 native linker on cortex-a9 raises SIGILL&lt;br&gt;<br>
 =C2=A0&lt;/span&gt;Date: Tue, 8 Sep 2015 08:58:29 +0200&lt;br&gt;<br>
 =C2=A0&lt;div class=3D3D&quot;HOEnZb&quot;&gt;&lt;div class=3D3D&quot;h5&qu=
 ot;&gt;&lt;br&gt;<br>
 =C2=A0=3DC2=3DA0On Tue, Sep 08, 2015 at 11:12:40AM +0530, Zaid Ibrahime wro=
 te:&lt;br&gt;<br>
 =C2=A0=3DC2=3DA0&amp;gt;=3DC2=3DA0 &amp;gt; Small programs(&amp;lt;6K size)=
  does not result in SIGILL=3D<br>
 =C2=A0 as all the&lt;br&gt;<br>
 =C2=A0=3DC2=3DA0&amp;gt; instruction are properly swapped for endianness by=
  the linker.&lt;b=3D<br>
 =C2=A0r&gt;<br>
 =C2=A0=3DC2=3DA0&amp;gt;&lt;br&gt;<br>
 =C2=A0=3DC2=3DA0&amp;gt;=3DC2=3DA0 &amp;gt; Are you sure that it depends on=
  size of the program?&lt;=3D<br>
 =C2=A0br&gt;<br>
 =C2=A0&lt;br&gt;<br>
 =C2=A0=3DC2=3DA0Are you building from a single c source, or from libs?&lt;b=
 r&gt;<br>
 =C2=A0=3DC2=3DA0My bet is the swapping happens fine for c source or &amp;qu=
 ot;normal&amp;quot=3D<br>
 =C2=A0; objects,&lt;br&gt;<br>
 =C2=A0=3DC2=3DA0but you are using some lib that has been partially stripped=
 , which ki=3D<br>
 =C2=A0lls&lt;br&gt;<br>
 =C2=A0=3DC2=3DA0the $t/$a markers. libgcc was one of those libraries (until=
 l fixed)&lt;b=3D<br>
 =C2=A0r&gt;<br>
 =C2=A0&lt;br&gt;<br>
 =C2=A0=3DC2=3DA0Martin&lt;br&gt;<br>
 =C2=A0&lt;br&gt;<br>
 =C2=A0&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;=
 /div&gt;<br>
 <br>
 =C2=A0--94eb2c032e6048771a051f3aa196--<br>
 <br>
 </blockquote></div><br></div>
 
 --001a114c8f042599ff051f3addb1--
 



Home | Main Index | Thread Index | Old Index