<?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>7630</bug_id>
          
          <creation_ts>2015-04-20 12:32:34 +0000</creation_ts>
          <short_desc>Provide some hint for the &quot;textrel&quot; QA issue</short_desc>
          <delta_ts>2015-04-27 17:09:41 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</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>27 April 2015: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.9 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Laszlo Papp">lpapp</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>50409</commentid>
    <comment_count>0</comment_count>
    <who name="Laszlo Papp">lpapp</who>
    <bug_when>2015-04-20 12:32:34 +0000</bug_when>
    <thetext>The documentation (*) writes:

  ELF binary &apos;&lt;file&gt;&apos; has relocations in .text [textrel] ¶

  The specified ELF binary contains relocations in its .text sections. This   situation can result in a performance impact at runtime.

A hint could be added that the fix is likely to assign -fPIC/-fpic to gcc. This could spare some investigation time for the casual reader.

* http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#qa-issue-textrel</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50410</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-04-20 12:35:04 +0000</bug_when>
    <thetext>I agree we should extend this entry as currently it is a bit sparse. It could also be worth linking to this page for further information:

http://www.akkadia.org/drepper/textrelocs.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50416</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2015-04-20 14:42:40 +0000</bug_when>
    <thetext>Hi, 

I have made a couple changes in the ref-manual.  This bit about runtime performance issues appears in two different places.  Please look at the following sections and give me your feedback:

 * http://www.yoctoproject.org/docs/1.9/ref-manual/ref-manual.html#ref-classes-insane - see the &quot;textrel&quot; bullet item.

 * http://www.yoctoproject.org/docs/1.9/ref-manual/ref-manual.html#qa-issue-textrel

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50418</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-04-20 14:56:09 +0000</bug_when>
    <thetext>&quot;If you do experience performance issues..&quot; isn&apos;t really correct, it&apos;s a suggested resolution to the general issue. Also &quot;assign -fPIC to gcc&quot; isn&apos;t really something the user can action.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50420</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2015-04-20 15:14:48 +0000</bug_when>
    <thetext>Paul, 

I need more information to reword this.  How does the developer determine if they are having performance issues due to text relocation?  Are they able to isolate slowdowns to this particular issue?  Would it be better to just say &quot;For runtime performance issues, ...&quot;?  

Also, if the user cannot assign &quot;-fPIC to gcc&quot; as a workaround, how does this workaround get applied?  Is there a workaround?

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50421</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-04-20 15:23:04 +0000</bug_when>
    <thetext>That&apos;s just it - -fPIC isn&apos;t a workaround, it&apos;s the proper way to fix it. My issue was mainly in the way you&apos;re stating it - it&apos;s not that the user should go and check if there are performance issues, they should just fix it and then both the warning and any potential performance issues go away. The problem with &quot;assign -fPIC to gcc&quot; is it doesn&apos;t sufficiently explain what to do.

Rather than having this as a &quot;Tip&quot; box I would suggest simply having the following sentence at the end of the first paragraph: &apos;Typically the way to solve this is by adding -fPIC to the compiler command line options, for example where the software you are building reads CFLAGS from the environment adding the following to the recipe should fix it:

CFLAGS_append = &quot; -fPIC &quot;
&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50423</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2015-04-20 15:45:27 +0000</bug_when>
    <thetext>Paul, 

Check out the latest at http://www.yoctoproject.org/docs/1.9/ref-manual/ref-manual.html#qa-issue-textrel and let me know.  I did some rewriting on your original text. 

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50514</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-04-27 10:15:14 +0000</bug_when>
    <thetext>Looks good to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50525</commentid>
    <comment_count>8</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2015-04-27 15:38:54 +0000</bug_when>
    <thetext>Thanks Paul... I will leave this in IN PROGRESS REVIEW until I either hear from Laszlo or a reasonable time passes without further comments. 

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50526</commentid>
    <comment_count>9</comment_count>
    <who name="Laszlo Papp">lpapp</who>
    <bug_when>2015-04-27 15:44:12 +0000</bug_when>
    <thetext>Looks good, thank you for your help!

I would personally suggest a minor improvement to the text, but it is not strictly necessary:

&quot;Typically, the way to solve this performance issue is to add &quot;-fPIC&quot; *or &quot;-fpic&quot;* to the compiler command-line option&quot;

-fpic might be preferred on embedded systems with minimal requirements, so it is good to be aware of, even though -fPIC is much more common.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50538</commentid>
    <comment_count>10</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2015-04-27 17:09:41 +0000</bug_when>
    <thetext>Laszlo... .thanks for the additional suggestion.  I have added that to the text.  I am marking the bug RESOLVED and setting the doc flag to &quot;Done.&quot;

Change can be viewed at http://www.yoctoproject.org/docs/1.9/ref-manual/ref-manual.html#qa-issue-textrel

Thanks, 
Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>