[LLVMbugs] [Bug 23651] New: [Mips] -mabi=n32 option creates 64bit ELF file
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon May 25 13:47:41 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23651
Bug ID: 23651
Summary: [Mips] -mabi=n32 option creates 64bit ELF file
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: MIPS
Assignee: unassignedbugs at nondot.org
Reporter: kai at redstar.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14382
--> https://llvm.org/bugs/attachment.cgi?id=14382&action=edit
Demo file for compilation
Using the attached hello.ll on a mips64-unknown-linux-gnu machine:
localhost ldc # /build/work/llvm/bin/llc -filetype=obj -target-abi=n32 hello.ll
localhost ldc # file hello.o
hello.o: ELF 64-bit MSB relocatable, MIPS, MIPS64 version 1 (GNU/Linux), not
stripped
localhost ldc # /build/work/llvm/bin/llc -filetype=asm -target-abi=n32 hello.ll
localhost ldc # gcc -mabi=n32 -c hello.s
localhost ldc # file hello.o
hello.o: ELF 32-bit MSB relocatable, MIPS, N32 MIPS-III version 1 (SYSV), not
stripped
localhost ldc #
If I add -mattr=mips64 or -mattr=mips64r2 then I get the expected result:
localhost ldc # /build/work/llvm/bin/llc -filetype=asm -target-abi=n32
-mattr=mips64r2 hello.ll
localhost ldc # file hello.o
hello.o: ELF 32-bit MSB relocatable, MIPS, N32 MIPS64 rel2 version 1 (SYSV),
not stripped
localhost ldc # /build/work/llvm/bin/llc -filetype=asm -target-abi=n32
-mattr=mips64 hello.ll
localhost ldc # file hello.o
hello.o: ELF 32-bit MSB relocatable, MIPS, N32 MIPS64 rel2 version 1 (SYSV),
not stripped
(Note that in the last line the MIPS version is wrong: it should be MIPS64
version 1 (SYSV))
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150525/ff096375/attachment.html>
More information about the llvm-bugs
mailing list