llvm-project/lld/test/ELF/linkerscript
George Rimar cc4d3e5745 [ELF] - Linkerscript: properly mark minus expression with non-absolute flag
This is alternative to D28857 which was incorrect.

One of linux scripts contains:

vvar_start = . - 2 * (1 << 12);
vvar_page = vvar_start;
vvar_vsyscall_gtod_data = vvar_page + 128;
Previously we did not mark first expression as non-absolute,
though it contains location counter.

And LLD failed with error:
relocation R_X86_64_PC32 cannot refer to absolute symbol

This patch should fix the issue, and opens road for doing the same for other operators
(though not clear if that is needed).

Differential revision: https://reviews.llvm.org/D29332

llvm-svn: 293748
2017-02-01 09:01:16 +00:00
..
Inputs Fix program header propagation. 2016-11-14 15:39:38 +00:00
absolute-expr.s Remove string table offsets from tests. 2016-11-01 21:26:28 +00:00
absolute.s Read an expression in the form of "ABSOLUTE(<expr>) op <expr> ...". 2016-10-19 23:11:21 +00:00
addr.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
align-empty.s Don't depend on lld creating space for the headers. 2016-09-30 00:06:24 +00:00
align.s [ELF] - Linkerscript: Implement two argument version of ALIGN() 2016-12-16 18:19:35 +00:00
alignof.s [ELF] Print file:line for 'undefined section' errors 2016-11-28 09:58:04 +00:00
alternate-sections.s Add an interesting test. 2016-09-14 18:06:02 +00:00
arm-exidx-phdrs.s Always create a PT_ARM_EXIDX if needed. 2016-11-28 00:40:21 +00:00
assert.s [ELF] Allow `ASSERT` in output section descriptions 2016-11-22 18:01:50 +00:00
at.s Disable --rosegment when we have linker scripts. 2016-09-20 15:22:27 +00:00
comdat-gc.s Linkerscript: don't crash when GC .debug_line 2016-09-26 09:04:16 +00:00
common-assign.s [ELF] - Do not crash when assign common symbol's values in script 2017-01-20 09:45:36 +00:00
common.s Don't depend on lld creating space for the headers. 2016-09-30 00:06:24 +00:00
constructor.s [ELF] - Committed missing ld.ldd invocation to constructor.s 2017-01-23 16:55:13 +00:00
data-commands.s [ELF] Fix test case thinko from r289152 2016-12-09 21:51:37 +00:00
data-segment-relro.s Don't depend on lld creating space for the headers. 2016-09-30 00:06:24 +00:00
define.s [ELF] - Linkerscript: implement DEFINED() command. 2016-09-23 13:17:23 +00:00
diagnostic.s [ELF] Better error reporting for linker scripts 2016-11-21 15:49:56 +00:00
discard-interp.s Don't depend on lld creating space for the headers. 2016-09-30 00:06:24 +00:00
discard-section.s Alternative fix for reloc tareting discarded section 2016-10-12 12:31:34 +00:00
dot-is-not-abs.s The expr '.' is not absolute. 2016-10-31 21:36:23 +00:00
double-bss.s Rewrite CommonInputSection as a synthetic input section. 2016-11-05 23:05:47 +00:00
dynamic-sym.s Allow use define symbols to override linker defined ones. 2016-11-17 21:20:16 +00:00
dynamic.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
edata-etext.s Change the way how we print out line numbers. 2016-11-21 13:49:57 +00:00
eh-frame-hdr.s Make tests less dependent on the exact layout. 2016-09-20 15:08:24 +00:00
ehdr_start.s Change the way how we print out line numbers. 2016-11-21 13:49:57 +00:00
empty-load.s Don't create a bogus PT_PHDR if we don't allocate the headers. 2017-01-20 20:46:15 +00:00
empty-tls.s Don't crash if PT_TLS is empty. 2016-07-29 19:24:27 +00:00
entry.s Remove `REQUIRES: shell` hack to workaround an echo issue. 2016-12-09 18:49:37 +00:00
exclude-multiple.s [ELF] - Linkerscript: reimplement readSectionExcludes() 2016-09-21 08:53:21 +00:00
excludefile.s Don't CHECK the addresses. NFC 2016-09-19 18:58:30 +00:00
extend-pt-load.s Don't depend on lld creating space for the headers. 2016-09-30 00:06:24 +00:00
filename-spec.s Make tests less dependent on the exact layout. 2016-09-20 15:08:24 +00:00
fill.s Make tests less dependent on the exact layout. 2016-09-20 15:08:24 +00:00
group.s Remove `REQUIRES: shell` hack to workaround an echo issue. 2016-12-09 18:49:37 +00:00
header-addr.s Use the correct page size. 2016-11-21 20:20:04 +00:00
huge-temporary-file.s [ELF] - Fix for huge-temporary-file.s 2017-01-17 14:06:44 +00:00
implicit-program-header.s Fix program header propagation. 2016-11-14 15:39:38 +00:00
input-order.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
input-sec-dup.s Make tests less dependent on the exact layout. 2016-09-20 15:08:24 +00:00
linkerscript.s [ELF] - Linkerscript: Fall back to search paths when INCLUDE not found 2016-12-21 09:42:25 +00:00
loadaddr.s [ELF] Print file:line for 'undefined section' errors 2016-11-28 09:58:04 +00:00
locationcounter.s [ELF] Use MaxPageSize for aligning PT_LOAD 2016-09-28 00:09:20 +00:00
locationcountererr.s [ELF] - Do not crash when move location counter backward. 2016-12-15 07:27:28 +00:00
memory.s [LinkerScript] Implement `MEMORY` command 2017-01-24 02:34:00 +00:00
merge-sections-reloc.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
merge-sections.s Don't depend on lld creating space for the headers. 2016-09-30 00:06:24 +00:00
multi-sections-constraint.s Make test less dependent on the section order. 2016-09-20 20:48:54 +00:00
multiple-tbss.s Fix VA computation for tbss. 2016-09-22 12:35:44 +00:00
no-pt-load.s Avoid accessing an end() iterator. 2016-11-17 14:18:08 +00:00
no-space.s Don't create a bogus PT_PHDR if we don't allocate the headers. 2017-01-20 20:46:15 +00:00
non-absolute.s [ELF] - Linkerscript: properly mark minus expression with non-absolute flag 2017-02-01 09:01:16 +00:00
non-alloc.s Don't create a bogus PT_PHDR if we don't allocate the headers. 2017-01-20 20:46:15 +00:00
numbers.s Remove trailing whitespace. 2016-10-05 20:09:50 +00:00
openbsd-bootdata.s [ELF] - Teach LLD to recognize PT_OPENBSD_BOOTDATA 2016-12-06 17:57:42 +00:00
openbsd-randomize.s [ELF] Choose default segment when it is not specified 2016-10-19 15:04:49 +00:00
openbsd-wxneeded.s [ELF] - Update testcases after llvm change. 2016-10-18 11:11:03 +00:00
orphan-align.s Don't depend on lld creating space for the headers. 2016-09-30 00:06:24 +00:00
orphan-first-cmd.s Also skip regular symbol assignment at the start of a script. 2016-11-27 09:44:45 +00:00
orphan.s ELF: Place relro sections after non-relro sections in r/w segment. 2017-01-10 01:21:30 +00:00
orphans.s Revert "Revert "Only restrict order if both sections are in the script."" 2016-09-20 22:43:15 +00:00
ouputformat.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
outputarch.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
outsections-addr.s [ELF] Change the way we compute file offsets 2016-09-29 09:20:33 +00:00
page-size-align.s Use the correct MaxPageSize. 2016-12-07 20:10:43 +00:00
page-size.s lld: Default image base address to 0x200000 on x86-64 2016-11-23 17:44:02 +00:00
phdr-check.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
phdrs-flags.s [ELF] Choose default segment when it is not specified 2016-10-19 15:04:49 +00:00
phdrs.s Change which input sections we concatenate 2017-01-05 14:20:35 +00:00
repsection-symbol.s ELF: Place relro sections after non-relro sections in r/w segment. 2017-01-10 01:21:30 +00:00
repsection-va.s Make test less dependent on the section order. 2016-09-20 20:48:54 +00:00
rosegment.s Disable --rosegment when we have linker scripts. 2016-09-20 15:22:27 +00:00
searchdir.s Remove `REQUIRES: shell` hack to workaround an echo issue. 2016-12-09 18:49:37 +00:00
sections-constraint.s [ELF] Heuristic for placing orphan section 2016-11-08 10:44:48 +00:00
sections-constraint2.s Fix constraint checking in ONLY_IF_RO. 2016-09-16 20:34:02 +00:00
sections-constraint3.s Only process commands in a ONLY_IF_RO if it matches. 2016-09-16 21:05:36 +00:00
sections-constraint4.s [ELF] Linkerscript: fixed bug about commands processing. 2016-09-17 09:50:10 +00:00
sections-constraint5.s Implement ONLY_IF_RO/ONLY_IF_RW like bfd. 2016-09-21 18:33:44 +00:00
sections-keep.s Include version string into ".comment" section. 2016-11-10 20:20:37 +00:00
sections-padding.s [ELF] - Support optional comma after output section command. 2017-01-17 15:32:12 +00:00
sections-sort.s Include version string into ".comment" section. 2016-11-10 20:20:37 +00:00
sections.s [ELF] - Linkerscript: do not fail on additional semicolons in linkerscript. 2017-01-31 08:50:11 +00:00
segment-start.s [ELF] Linkerscript: print location of undefined symbol usage 2016-12-22 13:13:12 +00:00
sizeof.s Allow SIZEOF() command on nonexistent section. 2016-11-17 20:27:10 +00:00
sizeofheaders.s Disable --rosegment when we have linker scripts. 2016-09-20 15:22:27 +00:00
sort-constructors.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
sort-init.s [ELF] - Linkerscript: implemented SORT_BY_INIT_PRIORITY. 2016-09-15 19:15:12 +00:00
sort-nested.s Make tests less dependent on the exact layout. 2016-09-20 15:08:24 +00:00
sort-non-script.s ELF: Place relro sections after non-relro sections in r/w segment. 2017-01-10 01:21:30 +00:00
sort.s [ELF] - Accept --sort-section=xxx command form. 2016-12-16 11:59:52 +00:00
sort2.s Don't depend on lld creating space for the headers. 2016-09-30 00:06:24 +00:00
start-end.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
subalign.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
symbol-assignexpr.s [ELF] Allow defined symbols to be assigned from linker script 2017-01-09 18:36:57 +00:00
symbol-conflict.s The expr '.' is not absolute. 2016-10-31 21:36:23 +00:00
symbol-only.s Create sections with just assignments as STT_NOBITS. 2016-11-26 06:55:35 +00:00
symbolreferenced.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
symbols-synthetic.s lld: Default image base address to 0x200000 on x86-64 2016-11-23 17:44:02 +00:00
symbols.s The expr '.' is not absolute. 2016-10-31 21:36:23 +00:00
tbss.s Don't depend on lld creating space for the headers. 2016-09-30 00:06:24 +00:00
undef.s Remove useless file prefix. 2016-09-02 20:40:53 +00:00
va.s Start linker scripts at 0. 2016-09-30 00:16:11 +00:00
visibility.s Correctly merge visibility of linkerscript created symbols. 2016-10-31 13:14:53 +00:00
wildcards.s Include version string into ".comment" section. 2016-11-10 20:20:37 +00:00
wildcards2.s Make tests less dependent on the exact layout. 2016-09-20 15:08:24 +00:00