This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/54819] New: Microblaze: When enabling position independent code the linker does not recognize the object file
- From: "qball at sarine dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 05 Oct 2012 08:29:51 +0000
- Subject: [Bug other/54819] New: Microblaze: When enabling position independent code the linker does not recognize the object file
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54819
Bug #: 54819
Summary: Microblaze: When enabling position independent code
the linker does not recognize the object file
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: other
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: qball@sarine.nl
I hope this is the right place to report it, I'm sorry if it is not:
When compiling C code for the microblaze and you enable position independent
code (-fpic) the tool flow does not recognize the object file.
Example C code:
void main()
{
}
mb-gcc main.c -v -fpic
Using built-in specs.
COLLECT_GCC=/local_home/mkoedam/GCC3/install/bin/mb-gcc
COLLECT_LTO_WRAPPER=/local_home/mkoedam/GCC3/install/libexec/gcc/microblaze-xilinx-elf/4.7.2/lto-wrapper
Target: microblaze-xilinx-elf
Configured with: ../configure --target=microblaze-xilinx-elf
--prefix=/opt/mb-gcc/ --program-prefix=mb-
--prefix=/local_home/mkoedam/GCC3/install --enable-languages=c,c++
--disable-nls --without-headers --disable-multilib --disable-libssp
--with-newlib
Thread model: single
gcc version 4.7.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-fpic'
/local_home/mkoedam/GCC3/install/libexec/gcc/microblaze-xilinx-elf/4.7.2/cc1
-quiet -v main.c -quiet -dumpbase main.c -auxbase main -version -fpic -o
/tmp/cctiZK3o.s
GNU C (GCC) version 4.7.2 (microblaze-xilinx-elf)
compiled by GNU C version 4.6.3, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/../../../../microblaze-xilinx-elf/sys-include"
#include "..." search starts here:
#include <...> search starts here:
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/include
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/include-fixed
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/../../../../microblaze-xilinx-elf/include
End of search list.
GNU C (GCC) version 4.7.2 (microblaze-xilinx-elf)
compiled by GNU C version 4.6.3, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1bda14ee29b10396a8e5d1413b1c5be8
COLLECT_GCC_OPTIONS='-v' '-fpic'
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/../../../../microblaze-xilinx-elf/bin/as
-o /tmp/ccOegaQG.o /tmp/cctiZK3o.s
COMPILER_PATH=/local_home/mkoedam/GCC3/install/libexec/gcc/microblaze-xilinx-elf/4.7.2/:/local_home/mkoedam/GCC3/install/libexec/gcc/microblaze-xilinx-elf/4.7.2/:/local_home/mkoedam/GCC3/install/libexec/gcc/microblaze-xilinx-elf/:/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/:/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/:/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/../../../../microblaze-xilinx-elf/bin/
LIBRARY_PATH=/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/:/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/../../../../microblaze-xilinx-elf/lib/
COLLECT_GCC_OPTIONS='-v' '-fpic'
/local_home/mkoedam/GCC3/install/libexec/gcc/microblaze-xilinx-elf/4.7.2/collect2
-N -relax -G 0 -dT
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/../../../../microblaze-xilinx-elf/lib/xilinx.ld
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/../../../../microblaze-xilinx-elf/lib/crt0.o
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/crti.o
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/crtbegin.o
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/../../../../microblaze-xilinx-elf/lib/crtinit.o
-L/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2
-L/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/../../../../microblaze-xilinx-elf/lib
/tmp/ccOegaQG.o -lgcc -start-group -lgloss -lxil -lc -lm -end-group -lgcc
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/crtend.o
/local_home/mkoedam/GCC3/install/lib/gcc/microblaze-xilinx-elf/4.7.2/crtn.o
/tmp/ccOegaQG.o: could not read symbols: File format not recognized
collect2: error: ld returned 1 exit status
I can trace this back to GCC 4.6.2. 4.1.2 (from xilinx) works.
The compiler is compiled using the following script:
https://github.com/DaveDavenport/CrossCompilerGCCScript/blob/master/gcc_cross_compiler.sh
Please let me know if I need to provide more information.