[llvm-bugs] [Bug 42277] llvm-objcopy does not rip off .bss section

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 30 20:37:21 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=42277

Fangrui Song <i at maskray.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED
                 CC|                            |i at maskray.me

--- Comment #8 from Fangrui Song <i at maskray.me> ---
* comment 4

>  [ 3] .data             PROGBITS        0000000000000051 001051 000000 00  AX  0   0  1
>  [ 4] .bss              NOBITS          0000000000010000 001051 000004 00  WA  0   0  4

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

* comment 2

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

This was fixed by https://reviews.llvm.org/D71035 (included in lld 10.0.0)

At the previous commit 9e119ad69df716b728c8d190ac808fa509818c1e, llvm-objcopy
still produced 64k output.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200501/d56904d1/attachment.html>


More information about the llvm-bugs mailing list