| __ld_insert_kernel_exports

Previous | Automatically Inserted Section Contents | Next

__ld_insert_kernel_exports can be used to export symbols from a library. It treats all symbols that are declared external and look like "libname@index" or "libname__index" as exported entries. index is a hexadecimal number which must have exactly 4 digits.
__ld_insert_kernel_exports inserts library exports in the format used by kernels:

- For each exported item...
  - 2 bytes: location (offset from the beginning of the library; may be 0 if nothing was specified)
- 2 bytes: 0

Note: Since exported entries are stored one after another, skipped entries will take up additional space in the export table. For example, if you only define one symbol called "libname@0010", then there will be 16*2=32 bytes of zeroes in the export table.

See also: __ld_insert_fargo_exports