Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PR] Add AARCH64_MOVW_UABS_G* relocations support
Summary: This patch fixes issue facebookarchive/BOLT#177 Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei (cherry picked from FBD31130162)
- Loading branch information
Showing
4 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This reproduces issue 177 from our github repo | ||
# AARCH64_MOVW_UABS_G* relocations handling | ||
|
||
# REQUIRES: system-linux | ||
|
||
# RUN: %host_cc %cflags -no-pie %s -o %t.exe -Wl,-q | ||
# RUN: llvm-bolt %t.exe -o %t.bolt -use-old-text=0 -lite=0 -trap-old-code | ||
# RUN: %t.bolt | ||
|
||
.text | ||
.align 4 | ||
.global test | ||
.type test, %function | ||
test: | ||
mov x0, xzr | ||
ret | ||
.size test, .-test | ||
|
||
.align 4 | ||
.global main | ||
.type main, %function | ||
main: | ||
movz x0, #:abs_g3:test | ||
movk x0, #:abs_g2_nc:test | ||
movk x0, #:abs_g1_nc:test | ||
movk x0, #:abs_g0_nc:test | ||
br x0 | ||
.size main, .-main |