<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font size="3"><font face="Calibri,Helvetica,sans-serif">(Just for
        the record to avoid misleading)<br>
        <br>
        I think the .eqv should fully work, but need to correct the
        reason for why. <br>
        <br>
        It is not because it turned the new symbol into non-function
        type, but because .eqv<br>
        is expect to always evaulate the snapshot value of the equaled
        expression at each<br>
        place the new symbol is used, you don't know it's final value
        and the associated<br>
        section, therefore it is associated with undefined section until
        the final stage of<br>
        assembling.  So, when doing ADR instruction assembling, at that
        stage, the new<br>
        symbol is still without definition section assigned, therefore
        is able to skip the LSB<br>
        setting which only happens for thumb function symbol with
        defined section.<br>
         <br>
        binutils-gdb/gas/config/tc-arm.c: do_t_adr<br>
        ...<br>
        <br>
          && S_IS_DEFINED (inst.reloc.exp.X_add_symbol)<br>
          && THUMB_IS_FUNC (inst.reloc.exp.X_add_symbol))<br>
            inst.reloc.exp.X_add_number += 1;<br>
        <br>
        Use .equ, the magic disappear.<br>
        <br>
        Regards,<br>
        Jiong<br>
        <br>
      </font></font>
    <div class="moz-cite-prefix">On 04/08/17 14:58, Jiong Wang wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:ba03fc24-d1dc-daa1-035a-181892e10d6f@foss.arm.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <p><span class="pl-en">Change</span></p>
      <p><span class="pl-en">  "adreq lr</span><span class="pl-s1">,</span><span
          class="pl-en"> X(ff_h264_idct_add_neon) </span><span
          class="pl-s1">+</span><span class="pl-en"> CONFIG_THUMB"</span></p>
      <p><span class="pl-en">Into:</span></p>
      <p>.eqv <span class="pl-en">ff_h264_idct_add_neon_without_func_type,
        </span><span class="pl-en">X(ff_h264_idct_add_neon)</span><br>
        <span class="pl-en"></span><span class="pl-en">adreq lr</span><span
          class="pl-s1">,</span><span class="pl-en">  </span><span
          class="pl-s1"><span class="pl-en">ff_h264_idct_add_neon_without_func_type
          </span>+</span><span class="pl-en"> CONFIG_THUMB</span></p>
      <p><span class="pl-en">might be a solution.  The idea is we use
          .eqv to remove the function attribute, so the assembler won't
          set LSB in any case.<br>
        </span></p>
      <br>
      <div class="moz-cite-prefix">On 04/08/17 12:39, Jiong Wang wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:70941b7c-03b6-6a18-ff66-138b3115fc5f@foss.arm.com">
        <meta http-equiv="Content-Type" content="text/html;
          charset=utf-8">
        Hi,
        <p>  This issue is caused by a recent change in ARM assembler
          included since Binutils 2.29.</p>
        <p>  The details of that change can be found at <a
            class="moz-txt-link-freetext"
            href="https://sourceware.org/bugzilla/show_bug.cgi?id=21458"
            moz-do-not-send="true">https://sourceware.org/bugzilla/show_bug.cgi?id=21458</a><br>
        </p>
        <p>  The semantics of ADR has changed.  In general, the address
          generated by ADR will guarantee the LSB be set if it's a thumb
          function address.</p>
        <p>   I noticed h264idct_neon.S is using something like:</p>
        <p>     <span class="pl-en">adreq lr</span><span class="pl-s1">,</span><span
            class="pl-en"> X(ff_h264_idct_add_neon) </span><span
            class="pl-s1">+</span><span class="pl-en"> CONFIG_THUMB<br>
          </span></p>
        <p>   As ADR now will set the LSB automatically, you don't need
          CONFIG_THUMB any more.</p>
        <p>   I think h264idct_neon.S needs to be updated, and the
          modification should make sure it works with both old Binutils
          and the new one.</p>
        Regards,<br>
        Jiong<br>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>