[llvm-bugs] [Bug 35708] New: llvm-objcopy adds incorrect padding between sections
llvm-bugs at lists.llvm.org
Wed Dec 20 11:49:02 PST 2017
Bug ID: 35708
Summary: llvm-objcopy adds incorrect padding between sections
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: llvm at owenpshaw.net
CC: llvm-bugs at lists.llvm.org
Created attachment 19582
Align segment using physical instead of virtual address
On a bare metal ARM project, llvm-objcopy creates a binary file that has a lot
of extra zero padding before the .data section. GNU objcopy does not add this
It appears to be related to the LayoutSegments function and its use of
alignToAddr. The alignment is based off the segment's virtual address, which
in my .data case is different from its physical address.
Changing LayoutSegments to align using the physical address works like a charm
(see attached patch).
Does anyone agree/disagree that using the physical address correct? It doesn't
break any tests, but none of the tests used different virtual and physical
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs