Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit dd81b33

Browse files
author
George Rimar
committed
[LLD][ELF] - Add a test for elf::getPriority(StringRef S)
It covers the following line with a test: https://github.com/llvm-mirror/lld/blob/master/ELF/OutputSections.cpp#L383 git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@339348 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 8a350ed commit dd81b33

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/ELF/linkerscript/sort-init.s

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
3-
# RUN: echo "SECTIONS { .init_array : { *(SORT_BY_INIT_PRIORITY(.init_array.*)) } }" > %t1.script
3+
# RUN: echo "SECTIONS { .init_array : { *(SORT_BY_INIT_PRIORITY(.init_array.* foo*)) } }" > %t1.script
44
# RUN: ld.lld --script %t1.script %t1.o -o %t2
55
# RUN: llvm-objdump -s %t2 | FileCheck %s
66

77
# CHECK: Contents of section .init_array:
8-
# CHECK-NEXT: 03020000 00000000 010405
8+
# CHECK-NEXT: 03020000 00060000 010405
99

1010
.globl _start
1111
_start:
1212
nop
1313

14+
.section foo, "aw", @init_array
15+
.byte 6
1416
.section .init_array, "aw", @init_array
1517
.align 8
1618
.byte 1

0 commit comments

Comments
 (0)