Versions Compared

Key

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

...

Static linking must be done by calling ld explicitly, rather than relying on g++ to do it implicitly. The latter uses the linker option --eh-frame-hdr which causes ld to abort with an error about a "non-representable section" in the output.

-shared and -nostdlib
as for g++.|
-z combreloc
Makes sure that all relocation table entries go into a single contiguous sub-region of the shared object, even if by mischance they end up in more than one output section. This option also causes the linker to sort the entries so that those reference the same symbol occur together. This allows the dynamic linker to use a one-entry symbol lookup cache.|
-T scriptname
Use the custom linker script.|
-Map filename
to make a link map.|
-soname modulename.major.minor.branch
to set the soname field to the module's name with version numbers and development branch appended.|
*-o modulename.major.minor.branch.so *
Module filename.|
-fhash-style=sysv
to suppress generation of a GNU-style hash table.|

Each module that the one being constructed depends on should be named on the linker command line so that each of their sonames will be recorded in a DT_NEEDED entry in the elf dynamic section. This defines a minimum set of compatbility requirements; compatibility requirements can be expanded by implementing an rce_isCompatible function, as described in Chapter Y. Can set rce core comaptibility here? Is this optional, only for cases where the dependency is not direct? Won't dynalink try to resolve?