Linker scripts & _init, _fini

Derick Hammond derick at perkinstechnologies.com.au
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 = .);
   *crti.o(.init)
   *(.init)
   *crtn.o(.init)
   . = ALIGN (16);
   PROVIDE (_fini = .);
   *crti.o(.fini)
   *(.fini)
   *crtn.o(.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.

Regards,
Derick Hammond

PS - Tool versions:
   rtems-base-binutils-2.13.2.1-2
   m68k-rtems-binutils-2.13.2.1-2
   rtems-base-gcc-gcc3.2.2newlib1.11.0-2
   m68k-rtems-gcc-gcc3.2.2newlib1.11.0-2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20030715/6485341e/attachment.html>


More information about the users mailing list