forked from OSchip/llvm-project
[ELF] - ICF: test we do not merge sections which relocations differs only in addend.
This is to test the following `return false` line which was uncovered by our tests earlier: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L255 llvm-svn: 335357
This commit is contained in:
parent
9b9e25d34c
commit
0cde82ade5
|
@ -0,0 +1,20 @@
|
||||||
|
# REQUIRES: x86
|
||||||
|
|
||||||
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
|
||||||
|
# RUN: ld.lld %t1 -o %t --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
|
||||||
|
|
||||||
|
# Check that ICF does not merge 2 sections which relocations
|
||||||
|
# differs in addend only.
|
||||||
|
|
||||||
|
# CHECK-NOT: selected
|
||||||
|
|
||||||
|
.section .text
|
||||||
|
.globl _start
|
||||||
|
_start:
|
||||||
|
ret
|
||||||
|
|
||||||
|
.section .text.foo, "ax"
|
||||||
|
.quad _start + 1
|
||||||
|
|
||||||
|
.section .text.bar, "ax"
|
||||||
|
.quad _start + 2
|
Loading…
Reference in New Issue