I want to make an ELF(ld -q flag, powerpc). I want to find that why generates "Segmentation fault(core dumped)" on relocations section.
======================= : GNU ld version 2.15 : GNU C version 3.4.1 060908 (powerpc-unknown-tkernel) : compiled by GNU C version 2.95.3 20010315 (release) [FreeBSD]. : linker option: -q ( --emit relocations ) ======================= ----------------------------------------------------------------------- : Makefile`s ld option is "-static -q -Wl,-q,-v" pcsv3-160$gmake Makefile:102: Dependencies: No such file or directory touch Dependencies /u9/te/tool/FreeBSD-i386/powerpc-unknown-tkernel/bin/gccppc -mcpu=405 -msoft-float -I/u9/te/include/unix -I/u9/te/include -D_PPC405_ -DBKERNEL -DUSE_UNICODE -DUSE_HKANA -DUSE_JIS -c ../src.kim/test.S -o test.o /u9/te/tool/FreeBSD-i386/powerpc-unknown-tkernel/bin/gccppc -L/u9/te/lib/ppc405 -mcpu=405 -msoft-float -static -q -Wl,-q,-v -T reloc.lnk -nostdlib test.o -o test collect2 version 3.4.1 060908 (PowerPC T-Kernel) /u9/te/tool/FreeBSD-i386/powerpc-unknown-tkernel/bin/ld -Qy -static -static -o test -L/u9/te/lib/ppc405 -L/u9/te/lib/ppc405 -L/u9/te/tool/FreeBSD-i386/libexec/gcc/powerpc-unknown-tkernel/3.4.1 -L/u9/te/tool/FreeBSD-i386/libexec/gcc -L/u9/te/tool/FreeBSD-i386/lib/gcc/powerpc-unknown-tkernel/3.4.1/nof -L/u9/te/tool/FreeBSD-i386/lib/gcc/powerpc-unknown-tkernel/3.4.1 -L/u9/te/tool/FreeBSD-i386/lib/gcc -L/u9/te/tool/FreeBSD-i386/powerpc-unknown-tkernel/bin -L/u9/te/tool/FreeBSD-i386/powerpc-unknown-tkernel -L/u9/te/tool/FreeBSD-i386/lib/gcc/powerpc-unknown-tkernel/3.4.1/nof -L/u9/te/tool/FreeBSD-i386/lib/gcc/powerpc-unknown-tkernel/3.4.1 -L/u9/te/tool/FreeBSD-i386/lib/gcc/powerpc-unknown-tkernel/3.4.1/../../../../powerpc-unknown-tkernel/lib -q -v test.o -T reloc.lnk /u9/te/tool/FreeBSD-i386/powerpc-unknown-tkernel/bin/ld: warning: cannot find entry symbol _start; defaulting to 20000000 GNU ld version 2.15 #/u9/te/tool/FreeBSD-i386/powerpc-unknown-tkernel/bin/gccppc -L/u9/te/lib/ppc405 -mcpu=405 -msoft-float -static -q -Wl,-q,-v -T reloc.lnk test.o -lg -ltk -lg -lsvc -o test /u9/te/tool/FreeBSD-i386/powerpc-unknown-tkernel/bin/nm -C -n test | /u9/te/etc/chkundef -powerpc > test.map ----------------------------------------------------------------------- pcsv3-160$cat test.S .text _start: stwu 1, -48(1) stw 31,44(1) mr 31,1 stw 3,8(31) stw 4,12(31) li 0,0 stw 0,16(31) lis 9,[EMAIL PROTECTED] li 0,1 stw 0,[EMAIL PROTECTED](9) .comm g,4,4 ----------------------------------------------------------------------- pcsv3-160$readelf -a test this is a part of readelf file. ---- Relocation section '.rela.text' at offset 0x2000 contains 2 entries: Offset Info Type Symbol's Value Symbol's Name Addend 002e7379 6d746162 unrecognised: 62 bad symbol index: 006d7461 72746162 2e7368 R_PPC_EMB_NADDR16_HI bad symbol index: 00002e73 ---- I found that ".rela.xxx" area is overlapping. -- Summary: ld -q , (Host PC/OS: Free-BSD, Target Machine: powerpc) Product: binutils Version: 2.15 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: rewex at hanmail dot net CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=3777 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils