<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>1473</bug_id>
          
          <creation_ts>2011-09-13 07:18:20 +0000</creation_ts>
          <short_desc>Prelink causes x86 and qemuarm failures when built on 32bit system</short_desc>
          <delta_ts>2011-09-16 09:01:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Cross-prelink</product>
          <component>cross-prelink</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>1.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saul Wold">sgw</reporter>
          <assigned_to name="Mark Hatle">mark.hatle</assigned_to>
          <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yp.cp.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>16140</commentid>
    <comment_count>0</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-09-13 07:18:20 +0000</bug_when>
    <thetext>When prelinker is enable on 32bit host system, it fails to build correct images for qemux86 and qemuarm.

On qemux86, the image fails to boot with a segfault and kernel panic during the init phase.

Freeing unused kernel memory: 444k freed
usb 1-1: new full speed USB device number 2 using uhci_hcd
INIT: version 2.88 booting
init[1]: segfault at 38 ip 45a0a6c7 sp bfe15e6c error 4 in libc-2.13.so[45995000+15f000]
init[1]: segfault at 16 ip 0804b3c7 sp bfe15ae0 error 4 in init.sysvinit[8048000+7000]
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 3.0.4-yocto-standard+ #1
Call Trace:
 [&lt;c14e6933&gt;] ? printk+0x1d/0x1f
 [&lt;c14e6838&gt;] panic+0x66/0x144
 [&lt;c1036323&gt;] do_exit+0x733/0x7f0
 [&lt;c10366b4&gt;] do_group_exit+0x34/0xa0
 [&lt;c1044bd0&gt;] get_signal_to_deliver+0x1e0/0x560
 [&lt;c1001dbc&gt;] do_signal+0x6c/0x860
 [&lt;c14e6933&gt;] ? printk+0x1d/0x1f
 [&lt;c14e64be&gt;] ? __bad_area_nosemaphore+0x111/0x120
 [&lt;c14e651d&gt;] ? bad_area+0x37/0x3d
 [&lt;c14ee620&gt;] ? spurious_fault+0xcd/0xcd
 [&lt;c14eea36&gt;] ? do_page_fault+0x416/0x490
 [&lt;c10de31f&gt;] ? vfs_read+0x11f/0x160
 [&lt;c14ee620&gt;] ? spurious_fault+0xcd/0xcd
 [&lt;c10028c7&gt;] do_notify_resume+0x77/0xa0
 [&lt;c14ec4ca&gt;] work_notifysig+0x13/0x19
 [&lt;c14ee620&gt;] ? spurious_fault+0xcd/0xcd
[sudo] password for sgw: 


For qemuarm, it hangs during pslplash before Sato starts.  I do not have more details on which process hangs at this point.

By disabling the prelink process, both pass these issues correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16156</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2011-09-13 17:08:33 +0000</bug_when>
    <thetext>I have a potential fix for this issue:


--- a/trunk/src/rtld/rtld.c
+++ b/trunk/src/rtld/rtld.c
@@ -1120,7 +1120,7 @@ process_one_dso (DSO *dso, int host_paths)
                   (size_t) (l-&gt;l_map_start - cur_dso_ent-&gt;dso-&gt;base));
 
           if (l-&gt;l_tls_modid)
-            printf (&quot; TLS(0x%Zx, 0x%0*Zx)\n&quot;, l-&gt;l_tls_modid,
+            printf (&quot; TLS(0x%Zx, 0x%0*Zx)\n&quot;, (size_t) l-&gt;l_tls_modid,
                     (int) size_pointer,
                     (size_t) l-&gt;l_tls_offset);
           else


Initial testing on 32-bit host, targeting x86 and arm targets is positive.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16263</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2011-09-16 09:01:12 +0000</bug_when>
    <thetext>Change has been checked in, and appears to be working.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>