[PATCH] RTL Fixes

chrisj at rtems.org chrisj at rtems.org
Wed Nov 21 06:11:03 UTC 2018


Hi,

These 3 patches fix 3 issues in libdl.

1. The first patch adds support for common variables. I suspect this
   started to happen when we switch to separate text and data sections
   for functions. Libdl now allocates the address of uninitialised 
   variables when loading.

2. A bug in the post loading unresolved symbol handling has been fixed.
   Unresolved symbols are resolved when the object file with a symbol
   is loaded. The symbol names and relocation records are held in a
   global pool and symbol name indexes were not reindexed when an
   unresolved symbol was resolved and removed.

3. Object module dependency tracking has been added. A loaded object
   file referenced by another object file cannot be unloaded until 
   the dependent object module is unloaded. Object modules that
   depend on each other cannot be unloaded, there is not practicable
   way to do this. This change internally moves reloc process to
   2 phases, something that will be needed for relocation fixups.

Notes:

1. I am yet to visit RAP loading. I see an issue with dl06 on
   ARM.

2. These changes may work on 4.11, I have not tried to back port
   them and that task is not a current focus for me. If you do
   back port them please send me a copy.

Chris



More information about the devel mailing list