Changes between Version 5 and Version 6 of Developer/Projects/SequencedInitialization


Ignore:
Timestamp:
May 11, 2010, 12:38:25 PM (9 years ago)
Author:
Sh
Comment:

/* Implementation Alternatives */

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Projects/SequencedInitialization

    v5 v6  
    3636= Implementation Alternatives =
    3737
    38 =  =Open Projects==
     38= Definitions =
     39
     40
     41; Input Section : Collection of input items identified by a section name for the linker.
     42; Output Section : Output part of the linker.
     43; Linker Set : An input section that contains only identical items with respect to size and layout.
     44
     45Sequenced initialization requires support by the linker.  The general approach is to put certain items identified by an input section into a special output section and mark the begin and end of this section.
     46= FreeBSD Approach =
     47
     48
     49FreeBSD uses a fixed linker set which contains arbitrarily ordered system initialization items.  Each item has an order field which is used to sort the items during runtime.  The initialization functions will be call with respect to this order.
     50
     51 *  [PRO] The order information is stored in the item and can evaluated on a per item basis.
     52 *  [PRO] Flexible order granularity.
     53 *  [CON] The order information requires space.
     54 *  [CON] Sorting at runtime requires space and time.
     55= Linux Approach =
     56
     57
     58Linux uses several linker sets which contain arbitrarily ordered system initialization items.  The linker sets have a hard coded order defined in the linker command file.
     59
     60 *  [PRO] No space overhead for the order information.
     61 *  [PRO] No runtime and space overhead to sort the items.
     62 *  [CON] Very limited order granularity.
     63 *  [CON] Relative huge code section in the linker command file.  Hard to maintain.
     64 *  [CON] Order information must be derived from the place in the linker sets.  It is impossible to derive the order value specified at compile time.
     65= RTEMS Approach =
     66
     67
     68RTEMS should use a fixed linker set which contains ordered system initialization items.  The order will be defined by the input section name.  The GNU linker is able to sort input sections by name.
     69
     70 *  [PRO] No space overhead for the order information.
     71 *  [PRO] No runtime and space overhead to sort the items.
     72 *  [PRO] Flexible order granularity.
     73 *  [CON] Depends on GNU linker feature.
     74 *  [CON] Order information must be derived from the place in the linker set.  It is impossible to derive the order value specified at compile time.
     75= Open Projects =
    3976
    4077