xref: /llvm-project/lld/test/ELF/linkerscript/symbol-assign-many-passes2.test (revision 9e33c096476ab5e02ab1c8442cc3cb4e32e29f17)
1# REQUIRES: arm
2# RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-linux-gnueabihf %S/Inputs/arm-thunk-many-passes.s -o %t.o
3# RUN: ld.lld %t.o -T %s -o %t
4# RUN: llvm-nm %t | FileCheck %s
5
6## arm-thunk-many-passes.s is worst case case of thunk generation that takes 9
7## passes to converge. It takes a few more passes to make symbol assignment
8## converge. Test that
9## 1. we don't error that "thunk creation not converged".
10## 2. we check convergence of symbols defined in an output section descriptor.
11
12# CHECK: 01011050 T a
13# CHECK: 0101104f T b
14# CHECK: 0101104e T c
15# CHECK: 0101104d T d
16# CHECK: 0101104c T e
17
18SECTIONS {
19  . = SIZEOF_HEADERS;
20  .text 0x00011000 : {
21    a = b + 1;
22    b = c + 1;
23    c = d + 1;
24    d = e + 1;
25    *(.text*);
26  }
27  e = .;
28}
29