This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bug: Core dump in elf32-arm.c:3858:bfd_elf32_arm_vfp11_fix_veneer_locations arm-elf-ld 2.18


Hello,

The following log shows a core dump in
elf32-arm.c:3858:bfd_elf32_arm_vfp11_fix_veneer_locations. The pointer
errnode->u.b.veneer is NULL and is being dereferenced. Madness ensues.

Thanks,
Shaun

$ /usr/local/libexec/gcc/arm-elf/4.2.3/collect2 -X -o main.elf
-L../lib -L/usr/local/lib/gcc/arm-elf/4.2.3/thumb
-L/usr/local/lib/gcc/arm-elf/4.2.3/../../../../arm-elf/lib/thumb
-L/usr/local/lib/gcc/arm-elf/4.2.3
-L/usr/local/lib/gcc/arm-elf/4.2.3/../../../../arm-elf/lib main.o
../lib/libcomconf.a ../lib/libwat.a ../lib/libeth.a ../lib/liblcd.a
../lib/libflash.a ../lib/libarch.a ../lib/libmalloc.a ../lib/libutil.a
loader.bin.o firmware.bin.o --start-group -lgcc -lg -lc -lnosys
--end-group -T../lib/bb.ld
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
/usr/local/lib/gcc/arm-elf/4.2.3/../../../../arm-elf/lib/thumb/libg.a(lib_a-closer.o):
In function `_close_r':
/home/sjackman/src/toolchain/gcc-4.2.3/_build/arm-elf/thumb/newlib/libc/reent/../../../../../../newlib/libc/reent/closer.c:53:
warning: _close is not implemented and will always fail
/usr/local/lib/gcc/arm-elf/4.2.3/../../../../arm-elf/lib/thumb/libg.a(lib_a-fstatr.o):
In function `_fstat_r':
/home/sjackman/src/toolchain/gcc-4.2.3/_build/arm-elf/thumb/newlib/libc/reent/../../../../../../newlib/libc/reent/fstatr.c:62:
warning: _fstat is not implemented and will always fail
/usr/local/lib/gcc/arm-elf/4.2.3/../../../../arm-elf/lib/thumb/libg.a(lib_a-makebuf.o):
In function `__smakebuf_r':
/home/sjackman/src/toolchain/gcc-4.2.3/_build/arm-elf/thumb/newlib/libc/stdio/../../../../../../newlib/libc/stdio/makebuf.c:110:
warning: isatty is not implemented and will always fail
/usr/local/lib/gcc/arm-elf/4.2.3/../../../../arm-elf/lib/thumb/libg.a(lib_a-lseekr.o):
In function `_lseek_r':
/home/sjackman/src/toolchain/gcc-4.2.3/_build/arm-elf/thumb/newlib/libc/reent/../../../../../../newlib/libc/reent/lseekr.c:58:
warning: _lseek is not implemented and will always fail
/usr/local/lib/gcc/arm-elf/4.2.3/../../../../arm-elf/lib/thumb/libg.a(lib_a-readr.o):
In function `_read_r':
/home/sjackman/src/toolchain/gcc-4.2.3/_build/arm-elf/thumb/newlib/libc/reent/../../../../../../newlib/libc/reent/readr.c:58:
warning: _read is not implemented and will always fail
/usr/local/bin/arm-elf-ld: unknown architecture of input file
`loader.bin.o' is incompatible with arm output
/usr/local/bin/arm-elf-ld: unknown architecture of input file
`firmware.bin.o' is incompatible with arm output
$ gdb /usr/local/bin/arm-elf-ld -c core
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db
library "/lib/i686/cmov/libthread_db.so.1".


warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `/usr/local/bin/arm-elf-ld -X -o main.elf
-L../lib -L/usr/local/lib/gcc/arm-elf/'.
Program terminated with signal 11, Segmentation fault.
#0  bfd_elf32_arm_vfp11_fix_veneer_locations (abfd=0x8262ba8,
    link_info=0x80ff660) at ../../bfd/elf32-arm.c:3858
3858                  sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
(gdb) bt
#0  bfd_elf32_arm_vfp11_fix_veneer_locations (abfd=0x8262ba8,
    link_info=0x80ff660) at ../../bfd/elf32-arm.c:3858
#1  0x08067254 in arm_elf_after_allocation ()
    at ../../ld/emultempl/armelf.em:171
#2  0x0805955b in lang_process () at ../../ld/ldlang.c:5816
#3  0x0805d0c6 in main (argc=-72538984, argv=0xb7fc1000)
    at ../../ld/ldmain.c:459
(gdb) f
#0  bfd_elf32_arm_vfp11_fix_veneer_locations (abfd=0x8262ba8,
    link_info=0x80ff660) at ../../bfd/elf32-arm.c:3858
3858                  sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
(gdb) l
3853              switch (errnode->type)
3854                {
3855                case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
3856                case VFP11_ERRATUM_BRANCH_TO_THUMB_VENEER:
3857                  /* Find veneer symbol.  */
3858                  sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
3859                           errnode->u.b.veneer->u.v.id);
3860
3861                  myh = elf_link_hash_lookup
3862                    (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
(gdb) p errnode->u.b.veneer
$1 = (struct elf32_vfp11_erratum_list *) 0x0
(gdb) x/i $pc
0x8082f95 <bfd_elf32_arm_vfp11_fix_veneer_locations+165>:
    mov    0xc(%eax),%eax
(gdb) p/x $eax
$2 = 0x0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]