https://bugs.llvm.org/show_bug.cgi?id=35708
Bug ID: 35708
Summary: llvm-objcopy adds incorrect padding between sections
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: l...@owenpshaw.net
CC: llvm-bugs@lists.llvm.org
Created attachment 19582
--> https://bugs.llvm.org/attachment.cgi?id=19582&action=edit
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
padding.
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
addresses.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs