You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Versions of ld available

Target platformld versionNotes
Native Intel RHEL52.17Doesn't support -l:filename
Native Intel RHEL62.20 
ARM RTEMS 4.112.23+ 
ARM XIlinx Linux GNU EABI2.23+ 
ARM Xilinx EABI2.23+ 

We need the syntax -l:filename in order to support arbitrary file names for shared libraries, see below.

File names, sonames and the needed list

A shared library has both a file name and a so-called SO (shared object) name, or soname. The two need not be related as the soname can be set using the ld option -soname. The soname is contained in the dynamic string table at an offset given by the DT_SONAME entry in the dynamic section. Other entries of type DT_NEEDED, which also contain offsets into the dynamic string table, specify the needed list for the shared library. These are the shared libraries that must also be loaded for the shared library to work. Standard convention allows the needed list to contain both file names and sonames but we'll use only sonames.

File name conventions

RTEMS shared objects

 

Soname and needed list conventions

RTEMS shared objects

  1. Every shared object must have a soname.
  2. Sonames must be legal C identifiers.
  3. Sonames must be no longer than 128 characters long.
  4. Needed lists contain no file names, only sonames.
  5. The following sonames are reserved:
    1. "RTEMS___" for the shared object containing RTEMS, newlib and other run-time support.
    2. "SNT___" for the shared object containing the System Name Table.
    3. "ANT___" for the shared object containing the Application Name Table.

In general a shared object is found by using Svt_Translate() on the soname in order to obtain the full path name, where the soname is gotten from a needed list. The Symbol-Value tables used by Svt_Translate() are created by compiling C code which is why the sonames must be legal C identifiers. The length restriction on sonames comes from the RTEMS dynamic linker which for efficiency's sake uses a fixed-size buffer to create SVT keys from sonames. Sonames are also the keys used for the database of installed objects.

Dynamic symbol table

Every shared object must have a GNU-style hash table.

  • No labels