bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/19005] objcopy buffer-over-read


From: ams at sourceware dot org
Subject: [Bug binutils/19005] objcopy buffer-over-read
Date: Mon, 28 Sep 2015 09:44:35 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19005

--- Comment #15 from Andrew Stubbs <ams at sourceware dot org> ---
It's just because the padding is added to the output section size when
--gap-fill is set in the following snippet:


objcopy.c, copy_object()

      size = bfd_section_size (obfd, osections[i]);
      gap_start = bfd_section_lma (obfd, osections[i]) + size;
      gap_stop = bfd_section_lma (obfd, osections[i + 1]);
      if (gap_start < gap_stop)
        {
          if (! bfd_set_section_size (obfd, osections[i],
                                      size + (gap_stop - gap_start)))


The u-boot build system is doing this:

arm-none-linux-gnueabi-objcopy -j .text -j .secure_text -j .rodata -j .hash -j
.data -j .got.plt -j .u_boot_list -j .rel.dyn --gap-fill=0xff -O binary u-boot
u-boot.bin

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]