akaros/kern/linker_tables.ld
<<
>>
Prefs
   1/* this is INCLUDEd into the arch-specific ld scripts */
   2
   3        /* Linker-made tables.  Our tables (e.g. devtab) are 2^6 aligned,
   4         * independently of us aligning '.'.  We align '.' to get the right
   5         * start, e.g.  __devtabstart. */
   6        . = ALIGN(64);
   7        /* We shouldn't have to use PROVIDE, but if we don't, we get the wrong
   8         * value for '.'.  And items with empty tables get the KLA (basically
   9         * 0) */
  10        .devtab : {
  11                PROVIDE(__devtabstart = .);
  12                PROVIDE(devtab = .);
  13                *(.devtab)
  14                PROVIDE(__devtabend = .);
  15        }
  16
  17        /* Not sure if these need to be aligned to 64 bytes or not.  We had to
  18         * change the alignment above for the devtab, so we just changed it here
  19         * too, but it's unclear if this is 100% necessary.  In any event, it
  20         * doesn't hurt anything, it just wastes some bytes in our binary. */
  21        . = ALIGN(64);
  22        .linkerfunc1 : {
  23                PROVIDE(__linkerfunc1start = .);
  24                *(.linkerfunc1)
  25                PROVIDE(__linkerfunc1end = .);
  26        }
  27
  28        . = ALIGN(64);
  29        .linkerfunc2 : {
  30                PROVIDE(__linkerfunc2start = .);
  31                *(.linkerfunc2)
  32                PROVIDE(__linkerfunc2end = .);
  33        }
  34
  35        . = ALIGN(64);
  36        .linkerfunc3 : {
  37                PROVIDE(__linkerfunc3start = .);
  38                *(.linkerfunc3)
  39                PROVIDE(__linkerfunc3end = .);
  40        }
  41
  42        . = ALIGN(64);
  43        .linkerfunc4 : {
  44                PROVIDE(__linkerfunc4start = .);
  45                *(.linkerfunc4)
  46                PROVIDE(__linkerfunc4end = .);
  47        }
  48