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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs