-
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.
[ELF][MIPS] Use
InputSectionBase::getOutputSection()
to access outp…
…ut sections from the `MipsGotSection` Follow-up to r294005. This patch restores handling of MISP GOT relocations against merge sections. llvm-svn: 295040
- Loading branch information
Showing
2 changed files
with
31 additions
and
2 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,28 @@ | ||
# Check R_MIPS_GOT16 relocation against merge section. | ||
|
||
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -o %t.o %s | ||
# RUN: ld.lld -shared -o %t.so %t.o | ||
# RUN: llvm-readobj -t -mips-plt-got %t.so | FileCheck %s | ||
|
||
# REQUIRES: mips | ||
|
||
# CHECK: Symbol { | ||
# CHECK: Name: $.str | ||
# CHECK-NEXT: Value: 0xF4 | ||
# CHECK: } | ||
|
||
# CHECK: Local entries [ | ||
# CHECK-NEXT: Entry { | ||
# CHECK-NEXT: Address: | ||
# CHECK-NEXT: Access: -32744 | ||
# CHECK-NEXT: Initial: 0x0 | ||
# CHECK: } | ||
# CHECK: ] | ||
|
||
.text | ||
lw $t9, %got($.str)($gp) | ||
addiu $a0, $t9, %lo($.str) | ||
|
||
.section .rodata.str,"aMS",@progbits,1 | ||
$.str: | ||
.asciz "foo" |