------- Additional Comments From jmorrison at printronix dot com 2008-08-20 18:33 ------- Reply to #10:
Item 1. I'll play around so more with the linker script. Item 2. Here is the information you asked for (i hope): I've edited out my mistakes... For brevity I change "/home/morr_jo/work/ToolChain/cross" to "***" At point of fault, htab is 0x00. Going UP the call chain to the caller, I got the values below. I stopped there. Program received signal SIGSEGV, Segmentation fault. 0x0806fe40 in bfd_putb32 (data=1317011489, p=0xb66f694) at ***/src/binutils-2.18.50/bfd/libbfd.c:742 742 addr[0] = (data >> 24) & 0xff; (gdb) bt #0 0x0806fe40 in bfd_putb32 (data=1317011489, p=0xb66f694) at ***/src/binutils-2.18.50/bfd/libbfd.c:742 #1 0x08085cce in ppc_elf_finish_dynamic_sections (output_bfd=0x892fbe0, info=0x8110e60) at ***/src/binutils-2.18.50/bfd/elf32-ppc.c:7739 #2 0x080a28f1 in bfd_elf_final_link (abfd=0x892fbe0, info=0x8110e60) at ***/src/binutils-2.18.50/bfd/elflink.c:10801 #3 0x0805ba4d in ldwrite () at ***/src/binutils-2.18.50/ld/ldwrite.c:567 #4 0x08059843 in main (argc=50, argv=0xbff83044) at ***/src/binutils-2.18.50/ld/ldmain.c:462 (gdb) print htab $1 = 0 (gdb) print htab->got->contents Attempt to extract a component of a value that is not a structure pointer. (gdb) up #1 0x08085cce in ppc_elf_finish_dynamic_sections (output_bfd=0x892fbe0, info=0x8110e60) at ***/src/binutils-2.18.50/bfd/elf32-ppc.c:7739 7739 bfd_put_32 (output_bfd, 0x4e800021 /* blrl */, p - 4); (gdb) print htab $2 = (struct ppc_elf_link_hash_table *) 0x8931df0 (gdb) print htab->got $3 = (asection *) 0x893a7e4 (gdb) x/50x htab->got 0x893a7e4: 0x08103048 0x00000018 0x00000008 0x0893a88c 0x893a7f4: 0x0893a73c 0x00104113 0x00000102 0x00000000 0x893a804: 0x00000000 0x00000010 0x00000000 0x000cb0b0 0x893a814: 0x08931730 0x00000002 0x00000000 0x00000000 0x893a824: 0x00000000 0x00000000 0x00000000 0x00000000 0x893a834: 0x00000000 0x00000000 0x00000000 0x00000000 0x893a844: 0x0aaba718 0x00000000 0x00000000 0x00000000 0x893a854: 0x00000000 0x00000000 0x00000000 0x00000000 0x893a864: 0x08939148 0x00000000 0x089380a0 0x089391f4 0x893a874: 0x0893a870 0x08943644 0x09ec8d5c 0x00000000 0x893a884: 0x08103043 0x056935ec 0x08103043 0x00000019 0x893a894: 0x00000009 0x0893a934 0x0893a7e4 0x0010c10b 0x893a8a4: 0x00000100 0x00000000 (gdb) print htab->got->contents $4 = (unsigned char *) 0xaaba718 "" (gdb) x/50x htab->got->contents 0xaaba718: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba728: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba738: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba748: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba758: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba768: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba778: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba788: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba798: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba7a8: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba7b8: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba7c8: 0x00000000 0x00000000 0x00000000 0x00000000 0xaaba7d8: 0x00000000 0x00000000 (gdb) print/x htab->elf.hgot->root.u.def.value $7 = 0xbb4f80 (gdb) print/x htab->got->size $8 = 0x10 (gdb) up #2 0x080a28f1 in bfd_elf_final_link (abfd=0x892fbe0, info=0x8110e60) at ***/src/binutils-2.18.50/bfd/elflink.c:10801 10801 if (! (*bed->elf_backend_finish_dynamic_sections) (abfd, info)) (gdb) x/30x htab->got->contents Attempt to extract a component of a value that is not a structure pointer. (gdb) print/x htab->got->size Attempt to extract a component of a value that is not a structure pointer. (gdb) print/x htab->elf.hgot->root.u.def.value Attempt to extract a component of a value that is not a structure pointer. (gdb) bt #0 0x0806fe40 in bfd_putb32 (data=1317011489, p=0xb66f694) at ***/src/binutils-2.18.50/bfd/libbfd.c:742 #1 0x08085cce in ppc_elf_finish_dynamic_sections (output_bfd=0x892fbe0, info=0x8110e60) at ***/src/binutils-2.18.50/bfd/elf32-ppc.c:7739 #2 0x080a28f1 in bfd_elf_final_link (abfd=0x892fbe0, info=0x8110e60) at ***/src/binutils-2.18.50/bfd/elflink.c:10801 #3 0x0805ba4d in ldwrite () at ***/src/binutils-2.18.50/ld/ldwrite.c:567 #4 0x08059843 in main (argc=50, argv=0xbff83044) at ***/src/binutils-2.18.50/ld/ldmain.c:462 (gdb) -- http://sourceware.org/bugzilla/show_bug.cgi?id=6844 ------- 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