-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] Ignore R_*_NONE relocs when relocating non-alloc sections
We shouldn't report an error for R_*_NONE relocs since we're emitting them when writing relocations to discarded sections. Differential Revision: https://reviews.llvm.org/D30279 llvm-svn: 295936
- Loading branch information
Showing
6 changed files
with
31 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ enum RelExpr { | |
R_MIPS_TLSGD, | ||
R_MIPS_TLSLD, | ||
R_NEG_TLS, | ||
R_NONE, | ||
R_PAGE_PC, | ||
R_PC, | ||
R_PLT, | ||
|
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,6 @@ | ||
.section .text.foo,"axG",@progbits,foo,comdat,unique,0 | ||
foo: | ||
nop | ||
|
||
.section .debug_info | ||
.long .text.foo |
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,10 @@ | ||
# REQUIRES: x86 | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/relocatable-non-alloc.s -o %t2.o | ||
# RUN: ld.lld %t2.o %t2.o -r -o %t3.o | ||
# RUN: ld.lld %t1.o %t3.o -o %t.o | FileCheck -allow-empty %s | ||
|
||
# CHECK-NOT: has non-ABS reloc | ||
|
||
.globl _start | ||
_start: |