[LLVMbugs] [Bug 18620] New: [MIPS] A call PIC function problem in shared link without '-fPIC'
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jan 25 21:48:01 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18620
Bug ID: 18620
Summary: [MIPS] A call PIC function problem in shared link
without '-fPIC'
Product: clang
Version: 3.4
Hardware: SGI
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: r at hev.cc
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11941
--> http://llvm.org/bugs/attachment.cgi?id=11941&action=edit
Assembly source codes without -fPIC
Simple test case:
#include <stdio.h>
int
main (int argc, char *argv[])
{
printf ("Hello\n");
return 0;
}
Compiled without -fPIC:
[heiher at archlinux work]$ clang -march=mips64r2 -mabi=n32 -o test test.c
/tmp/test-c0d709.s: Assembler messages:
/tmp/test-c0d709.s:30: Warning: macro instruction expanded into multiple
instructions
[heiher at archlinux work]$ ./test
Segmentation fault (core dumped)
Compiled with -fPIC:
[heiher at archlinux work]$ clang -march=mips64r2 -mabi=n32 -fPIC -o test test.c
[heiher at archlinux work]$ ./test
Hello
clang version:
clang version 3.4 (tags/RELEASE_34/final)
Target: mips64el-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation:
/usr/bin/../lib/gcc/mips64el-unknown-linux-gnu/4.8.2
Found candidate GCC installation: /usr/lib/gcc/mips64el-unknown-linux-gnu/4.8.2
Selected GCC installation: /usr/bin/../lib/gcc/mips64el-unknown-linux-gnu/4.8.2
--
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/20140126/00ddb923/attachment.html>
More information about the llvm-bugs
mailing list