Skip to content

Commit 55a40d3

Browse files
link_fdata does not support hardcoded offsets in no-LBR mode
For example, the below fails as the script tries to match it with the LBR mode: ``` // RUN: link_fdata --no-lbr ... // FDATA: 1 foo 0 10 ```
1 parent 25b58c8 commit 55a40d3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

bolt/test/AArch64/fdata-nolbr.s

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Check that using link_fdata tool in non-lbr mode allows using hardcoded
2+
# addresses for basic block offsets.
3+
4+
# REQUIRES: system-linux
5+
6+
# RUN: %clang %cflags -o %t %s
7+
# RUN: %clang %s %cflags -Wl,-q -o %t
8+
# RUN: not link_fdata --no-lbr %s %t %t.fdata 2>&1 | FileCheck %s
9+
10+
.text
11+
.globl foo
12+
.type foo, %function
13+
foo:
14+
# FDATA: 1 foo 0 10
15+
ret
16+
17+
# Currently does not work on non-lbr mode.
18+
# CHECK: AssertionError: ERROR: wrong format/whitespaces must be escaped

0 commit comments

Comments
 (0)