This is the mail archive of the binutils@sources.redhat.com 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]

Re: YAH8LP (Yet another H8 Ld Problem :)


Nick Clifton wrote:

> Boggle.  I have no idea what this could be.  The pointer being freed
> should have been allocated earlier on in the function, and nothing
> should have interfered with it.  My only guess would be that the
> shrinking of the data[] array has somehow walked over the memory
> allocated to the reloc_vector.

NOTE: Electric Fence did catch something earlier and was already
installed. :)
 
> How can this problem be reproduced ?  ie what is your current command
> line ?

Yes.  The same object files we were using before, luckily enough.

h8300-rtems-ld -mh8300h start.o cpu_asm.o cpu.o

It gives some undefineds but ends in a core dump.

And the backtrace after an ElectricFence produced core dump.  EF caught
it earlier.

b#0  bfd_getb32 (addr=0x401e2000 <Address 0x401e2000 out of bounds>)
    at ../../binutils-2.10/bfd/libbfd.c:973
973	  v = (unsigned long) addr[0] << 24;
(gdb) bt
#0  bfd_getb32 (addr=0x401e2000 <Address 0x401e2000 out of bounds>)
    at ../../binutils-2.10/bfd/libbfd.c:973
#1  0x80674a7 in h8300_reloc16_extra_cases (abfd=0x401f8f7c, 
    link_info=0x808a180, link_order=0x401d4c30, reloc=0x40204168, 
    data=0x401e1e80 "\001@o\200", src_ptr=0xbffff7e8,
dst_ptr=0xbffff7ec)
    at ../../binutils-2.10/bfd/coff-h8300.c:786
#2  0x806a5d8 in bfd_coff_reloc16_get_relocated_section_contents (
    in_abfd=0x401d0f7c, link_info=0x808a180, link_order=0x401d4c30, 
    data=0x401e1e80 "\001@o\200", relocateable=false,
symbols=0x401fce44)
    at ../../binutils-2.10/bfd/reloc16.c:343
#3  0x805e4d4 in bfd_get_relocated_section_contents (abfd=0x401d0f7c, 
    link_info=0x808a180, link_order=0x401d4c30, data=0x401e1e80
"\001@o\200", 
    relocateable=false, symbols=0x401fce44)
    at ../../binutils-2.10/bfd/bfd.c:1135
#4  0x80635e1 in default_indirect_link_order (output_bfd=0x401d0f7c, 
    info=0x808a180, output_section=0x401d4294, link_order=0x401d4c30, 
    generic_linker=true) at ../../binutils-2.10/bfd/linker.c:2743
#5  0x8062ab1 in _bfd_generic_final_link (abfd=0x401d0f7c,
info=0x808a180)
    at ../../binutils-2.10/bfd/linker.c:2047
#6  0x8057436 in ldwrite () at ../../binutils-2.10/ld/ldwrite.c:519
#7  0x8054fbe in main (argc=5, argv=0xbffff914)
    at ../../binutils-2.10/ld/ldmain.c:367


> Cheers
>         Nick

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

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