bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld relocate symbols(in small common section) to a unaligned address.


From: zhigang gong
Subject: Re: ld relocate symbols(in small common section) to a unaligned address.(on mips r3000 target)
Date: Thu, 8 Sep 2005 12:32:19 +0800

Hi Nick,

         Tanks for you reply so soonly. I had already download the
latest snapshot(binutils-050907), and the problem has not resolve
yet.I try to make the case smaller, but i failed. As when I make some
modification ,the problem will not exist any more. I have to send you
a little big test case(less than 1Mbytes tarball). Really appreciate
for your kindly help.

Here is the readme file of the test case tarball, which you will find
in it also.

LD version 2.16.1 or binutils-050907, configuration is
./configure --target=mipsel-elf

Now invoke the make in the current directory. There will generat three files.
symbol.list
                 This file is the libextras.a's  symbol list,and you
can search "piofree_handle" in it.
                 You will find the follow statements:
                                     86: 00000004    28 OBJECT  GLOBAL
DEFAULT  COM piofree_intr
                                     87: 00000004     4 OBJECT  GLOBAL
DEFAULT  COM piofree_handle
                                     88: 00000000     0 NOTYPE  GLOBAL
DEFAULT  UND cyg_interrupt_create
                 It's clearly that the aligment of piofree_handle is 4
bytes aligned.

thread_gdb
                 This file is the output elf image(excecuable).


thread_gdb.map
                 This file is the output elf image's map file, and you
can search "piofree_handle"  too.
                 You will get the follow statements:
                                     .scommon       0x000000008090bc44
       0x9 thread_gdb.o
                                     0x000000008090bc44                worker_cv
                                     0x000000008090bc4c               
worker_state
                                     .scommon       0x000000008090bc4d
       0xc extras.o
                                     0x000000008090bc4d               
piofree_handle
                                     0x000000008090bc51               
flag_int_reason
                                     *fill*         0x000000008090bc59
       0x3 00
                 Now you will find the problem is that the
piofree_handle is misaligned.When excute the image in my
                 platform, there will raise unaligned access exception.

Best Regars,
Zhigang.

On 9/7/05, Nick Clifton <address@hidden> wrote:
> Hi Zhigang,
> 
> > /home/zhigang/0808/pattern_install/lib/extras.o
> >                 0x000000008090bc4d                
> > piofree_handle                          ------Please see here, the 
> > address is not correct aligned
> 
> >                 .comm   piofree_handle,4,4    (the alignment is right)
> 
> This does indeed appear to be a bug in the linker.  Are you able to 
> create a *small* test case which reproduces this problem ?  With that we 
> could investigate it and try to fix it.
> 
> Oh - one other thing you could try is to download the current binutils 
> sources from the mainline of the CVS repository and build a new linker. 
>   Several rather subtle and nasty linker bugs have been fixed recently 
> and your problem might be one of those fixed bugs.
> 
> Cheers
>    Nick
> 
> 
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]