forked from OSchip/llvm-project
[ELF] - ICF: test we do not merge sectinons which relocations points to symbols of the different types.
This test case covers the following line of code: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L261 Previously it was uncovered. llvm-svn: 335453
This commit is contained in:
parent
cff2caac75
commit
afcd983a49
|
@ -0,0 +1,20 @@
|
|||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
|
||||
# RUN: ld.lld -shared -z notext %t1 -o %t --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
|
||||
|
||||
## Check ICF does not collect sections which relocations point to symbols
|
||||
## of the different types. Like to defined and undefined symbols in this test case.
|
||||
|
||||
# CHECK-NOT: selected
|
||||
|
||||
.globl und
|
||||
|
||||
.section .text
|
||||
.globl _start
|
||||
_start:
|
||||
ret
|
||||
|
||||
.section .text.foo, "ax"
|
||||
.quad _start
|
||||
|
||||
.section .text.bar, "ax"
|
||||
.quad und
|
Loading…
Reference in New Issue