-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support R_X86_64_PC8 and R_X86_64_PC16.
They are defined by the x86-64 ELF ABI standard. Differential Revision: https://reviews.llvm.org/D57799 llvm-svn: 353314
- Loading branch information
Showing
2 changed files
with
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// REQUIRES: x86 | ||
|
||
// This is a test for R_X86_64_PC8 and R_X86_64_PC16. | ||
|
||
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o | ||
// RUN: echo '.globl foo; foo:' | llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t2.o | ||
// RUN: ld.lld -o %t.exe %t1.o %t2.o | ||
// RUN: llvm-objdump -s %t.exe | FileCheck %s | ||
|
||
// CHECK: Contents of section .text: | ||
// CHECK: 2000cccc cccccccc cccccccc cccccccc | ||
// CHECK: 20cccccc cccccccc cccccccc cccccccc | ||
|
||
.globl _start | ||
_start: | ||
|
||
.word foo - _start | ||
.fill 14,1,0xcc | ||
|
||
.byte foo - _start | ||
.fill 15,1,0xcc |