Opened on 05/14/19 at 00:32:24
Closed on 05/22/19 at 00:03:14
#3748 closed defect (fixed)
libdl uses a linear symbol search on object file symbols
Reported by: | Chris Johns | Owned by: | Chris Johns <chrisj@…> |
---|---|---|---|
Priority: | normal | Milestone: | 5.1 |
Component: | lib/dl | Version: | 5 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
Symbol searching has two parts, searching the object file and searching the global symbol table. Currently the object file search is linear and the global table search uses a hash table.
A large incrementally linked object file can have a large local and global set of symbols and this can slow the loading process. This issue does not show up for small object files with a few symbols which is typically how our libraries are made.
Change the object file symbol search to a binary search (bsearch
). A hash table for each object file would increase the in memory object file footprint by a significant amount and would harm the small object file use case that only have a few symbols. A binary search is a suitable compromise.
Change History (1)
comment:1 Changed on 05/22/19 at 00:03:14 by Chris Johns <chrisj@…>
Owner: | set to Chris Johns <chrisj@…> |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
In 327e45da/rtems: