Linker scripts & _init, _fini

Derick Hammond derick at
Tue Jul 15 08:14:02 UTC 2003

Hello All:

I have a question regarding linker scripts and initialization and 
finalization code.

The following is a portion of my current linker script:

   ** Initialization and finalization code.
   . = ALIGN (16);
   PROVIDE (_init = .);
   . = ALIGN (16);
   PROVIDE (_fini = .);

And it produces the following listing:

fff15fd0 <_init>:
fff15fd0:       4e56 0000       linkw %fp,#0
fff15fd4:       4eb9 fff0 0ac6  jsr fff00ac6 <frame_dummy>
fff15fda:       4e5e            unlk %fp
fff15fdc:       4e75            rts
fff15fde:       4eb9 fff0 0b0c  jsr fff00b0c <__do_global_ctors_aux>

fff15ff0 <_fini>:
fff15ff0:       4e56 0000       linkw %fp,#0
fff15ff4:       4eb9 fff0 0a70  jsr fff00a70 <__do_global_dtors_aux>
fff15ffa:       4e5e            unlk %fp
fff15ffc:       4e75            rts

It seems to me that the jsr fff00b0c <__do_global_ctors_aux> is unreachable 
code.  Is this correct?  If so how do I correct the problem?

Thanks in advance.

Derick Hammond

PS - Tool versions:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the users mailing list