Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] - Fix calculation of memory region offset.
This is PR33714. Previously for each input section offset of memory region was incremented on a size of output section. That resulted in a wrong error message saying about overflow. Patch fixes that. Differential revision: https://reviews.llvm.org/D35803 llvm-svn: 308955
- Loading branch information
George Rimar
committed
Jul 25, 2017
1 parent
97c8e09
commit f694d33
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# REQUIRES: x86 | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t | ||
# RUN: echo "MEMORY { ram (rwx) : ORIGIN = 0, LENGTH = 2K } \ | ||
# RUN: SECTIONS { .text : { *(.text*) } > ram }" > %t.script | ||
# RUN: ld.lld -o %t2 --script %t.script %t | ||
|
||
.text | ||
.global _start | ||
_start: | ||
.zero 1024 | ||
|
||
.section .text.foo,"ax",%progbits | ||
foo: | ||
nop |