[RTEMS Project] #3741: libdl loading ELF objects from libbsd NFS file system ends in a deadlock

RTEMS trac trac at rtems.org
Fri May 3 00:46:02 UTC 2019

#3741: libdl loading ELF objects from libbsd NFS file system ends in a deadlock
 Reporter:  dufault                |       Owner:  Chris Johns
     Type:  defect                 |      Status:  accepted
 Priority:  normal                 |   Milestone:  5.1
Component:  lib/dl                 |     Version:  5
 Severity:  normal                 |  Resolution:
 Keywords:  run-time-loader libdl  |  Blocked By:
 Blocking:                         |

Comment (by Chris Johns):

 I have posted a reasonable solution to the bug but I think there is a
 better solution. The current trampoline processing is reloc record based
 and it should target symbol based. A trampoline to a target symbol will be
 the same set of instructions and could be shared by relocations. This
 would drop the trampoline slot count.

 A change would move away from a trampoline cache of each record to a cache
 of target symbols referenced by reloc records. The tramp check would see
 which symbols are in range and which are out of range to determine the
 number of slots to allocate. A relocation record that is not the full
 address range would still need a slot if the symbol is unresolved. The
 symbol cache entry would reference count reloc records referencing it and
 be deleted once there are no more references. The symbol cache entry would
 hold the trampoline slot number once allocated for use by other relocation

 Note, the trampoline code is transparent to the execution of the object
 code and only has the target symbol address in it therefore it can be
 shared by more than one relocation record.

 The unresolved table code may need to be split as the symbol record may
 grow the size of the record union and effect the memory footprint for
 unresolved symbols.

Ticket URL: <http://devel.rtems.org/ticket/3741#comment:6>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list