diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2019-09-03 10:24:07 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2019-09-03 10:24:07 +0000 |
commit | 25d5b54542e0b41dbb14e3771388677c4b9703cc (patch) | |
tree | 2d647cba8d6c3adb42f4d81f61daf698a292f9aa /llvm/test/CodeGen/Mips/start-asm-file.ll | |
parent | 607c92afdab93700323f9e0e5ad0b9b951f510d5 (diff) | |
download | bcm5719-llvm-25d5b54542e0b41dbb14e3771388677c4b9703cc.tar.gz bcm5719-llvm-25d5b54542e0b41dbb14e3771388677c4b9703cc.zip |
[mips] Switch to the `.text` section after emitting asm file preamble
Now the last `.section` directive in the MIPS asm file preamble
is the `.section .mdebug.abi`. If assembler code injected for example
by the LLVM `module asm` or the C ` __asm` directives do not contain
explicit switching to the `.text` section it goes to the `.mdebug.abi`
section. It might be unexpected to the user and in fact for example
breaks building some existing code like FreeBSD libc [1].
The patch forces switching to the `.text` section after emitting MIPS
assembler file preamble.
[1] https://bugs.llvm.org/show_bug.cgi?id=43119
Fix PR43119.
Differential Revision: https://reviews.llvm.org/D67014
llvm-svn: 370735
Diffstat (limited to 'llvm/test/CodeGen/Mips/start-asm-file.ll')
-rw-r--r-- | llvm/test/CodeGen/Mips/start-asm-file.ll | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/start-asm-file.ll b/llvm/test/CodeGen/Mips/start-asm-file.ll index b80f20a1f13..b8270574b6b 100644 --- a/llvm/test/CodeGen/Mips/start-asm-file.ll +++ b/llvm/test/CodeGen/Mips/start-asm-file.ll @@ -71,4 +71,5 @@ ; CHECK: .section .mdebug.abi[[ABI]] ; CHECK: .nan [[NAN]] +; CHECK: .text ; CHECK: .file |