Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MC: ensure that we have a section before accessing it
We would attempt to access the symbol section without ensuring that the symbol was not absolute. When the assembler referenced relocation is not evaluated to the absolute, but when we record the relocation, we would query the section. Because the symbol is absolute, it does not have a section associated with it, triggering an assertion. Just be more careful about the access of the section. Addresses PR31064! llvm-svn: 287619
- Loading branch information
Showing
2 changed files
with
30 additions
and
15 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,13 @@ | ||
@ RUN: llvm-mc -triple armv7-linux -filetype obj -o - %s | llvm-objdump -triple armv7 -D -r - | FileCheck %s | ||
|
||
.text | ||
|
||
__aeabi_unwind_cpp_pr0 = 0xdeadbeef | ||
|
||
f: | ||
.fnstart | ||
bx lr | ||
.fnend | ||
|
||
@ CHECK: R_ARM_NONE __aeabi_unwind_cpp_pr0 | ||
|