Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Every shared object must have a GNU-style hash table (--hash-style=gnu). System V hash tables will be ignored and should not be generated.
  2. Symbols beginning with "lnk_" Certain symbols are used for data and functions to be made known to used by the dynamic linker. Currently in use these are:
    1. "lnk_preferences" which labels object preference data , to be passed to lnk_prelude().
    2. "lnk_prelude" which labels a function to be called by the dynamic linker just after the functions pointed to by the .init_array have been run.

The "lnk_" special symbols must have global visibility in order for the dynamic linker to see them. However, it treats them as strictly local definitions and won't make cross-object references with them.

...

The shared object containing RTEMS, newlib and other run-time support is unique in that it has to be loaded at a fixed location, the start of the RTS Region. The loading is done by U-Boot which looks at the physical addresses of the loadable segments in order to determine where to put them. In order to set the physical addresses properly the linker script for the RTEMS object assigns all output to a region of memory, defined using the MEMORY directive, whose origin is at the required location. This has the side effect of giving the lowest loadable segment in the shared object a non-zero starting virtual address which has to be taken into account when using symbols defined by the object. All other shared objects are created with virtual addresses starting at zero.File names need not begin with "lib"; we use -l: instead of plain -l (or just name the shared object file as input).