diff options
| author | Peter Smith <peter.smith@linaro.org> | 2017-12-04 10:34:15 +0000 |
|---|---|---|
| committer | Peter Smith <peter.smith@linaro.org> | 2017-12-04 10:34:15 +0000 |
| commit | 014be8ac3524c5879c431fb6b17f1473a11da18b (patch) | |
| tree | a6085aca2d79a4a5c53d3374ff3a3e6f45afc441 | |
| parent | ecbeab0ea1278d6d3e700a62808b941adc240095 (diff) | |
| download | bcm5719-llvm-014be8ac3524c5879c431fb6b17f1473a11da18b.tar.gz bcm5719-llvm-014be8ac3524c5879c431fb6b17f1473a11da18b.zip | |
[ELF] Add BYTE expression to test case for non-contiguous relro [NFC]
As well as location counter expressions. The data generating expressions
such as BYTE can generate a non-zero sized OutputSection that will report
0 until assignAddresses() is called. Add an example to the existing test
case relro-non-contiguous-script-data.s.
Differential Revision: https://reviews.llvm.org/D40732
llvm-svn: 319648
| -rw-r--r-- | lld/test/ELF/relro-non-contiguous-script-data.s | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lld/test/ELF/relro-non-contiguous-script-data.s b/lld/test/ELF/relro-non-contiguous-script-data.s index b56c864dc0c..c2332d14a98 100644 --- a/lld/test/ELF/relro-non-contiguous-script-data.s +++ b/lld/test/ELF/relro-non-contiguous-script-data.s @@ -8,6 +8,13 @@ // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o // RUN: not ld.lld --export-dynamic %t.o -o %t --script=%t.script 2>&1 | FileCheck %s +// RUN: echo "SECTIONS { \ +// RUN: .dynamic : { *(.dynamic) } \ +// RUN: .non_ro : { BYTE(1); } \ +// RUN: .jcr : { *(.jcr) } \ +// RUN: } " > %t2.script +// RUN: not ld.lld --export-dynamic %t.o -o %t --script=%t2.script 2>&1 | FileCheck %s + // CHECK: error: section: .jcr is not contiguous with other relro sections .global _start |

