<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - llvm-objcopy does not rip off .bss section"
   href="https://bugs.llvm.org/show_bug.cgi?id=42277">bug 42277</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>CONFIRMED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>i@maskray.me
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - llvm-objcopy does not rip off .bss section"
   href="https://bugs.llvm.org/show_bug.cgi?id=42277#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - llvm-objcopy does not rip off .bss section"
   href="https://bugs.llvm.org/show_bug.cgi?id=42277">bug 42277</a>
              from <span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span></b>
        <pre>* <a href="show_bug.cgi?id=42277#c4">comment 4</a>

<span class="quote">>  [ 3] .data             PROGBITS        0000000000000051 001051 000000 00  AX  0   0  1
>  [ 4] .bss              NOBITS          0000000000010000 001051 000004 00  WA  0   0  4</span >

sh_offset(.bss) has a bug: sh_addr%maxpagesize != sh_offset%maxpagesize.
This was fixed by <a href="https://reviews.llvm.org/D66658">https://reviews.llvm.org/D66658</a>

* <a href="show_bug.cgi?id=42277#c2">comment 2</a>

<span class="quote">> After the bad commit, llvm-objcopy produces a binary as big as the .bss base address.</span >
>
<span class="quote">> $ ls -l foo.bin
> -rwxr-xr-x 1 masahiro masahiro 65536 Jun 15 01:59 foo.bin</span >

This was fixed by <a href="https://reviews.llvm.org/D71035">https://reviews.llvm.org/D71035</a> (included in lld 10.0.0)

At the previous commit 9e119ad69df716b728c8d190ac808fa509818c1e, llvm-objcopy
still produced 64k output.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>