Dynamic Linker String Matching Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional dynamic linkers face inefficiencies in loading shared libraries due to the need for byte-by-byte comparisons of long string entries, leading to increased processing time as the table lengthens.
Innovation Solution
Implementing a comparison module that determines the length of the source string and its last segment, comparing this with candidate strings in the table, reducing the number of byte-by-byte comparisons by first matching the last segments and only performing full comparisons when necessary.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If byte-by-byte comparison is used to match source string with table entries, then matching accuracy is improved, but processing time increases significantly
Solution Approach 1:
The patent divides the string matching process into two segments: first comparing only the last character of strings, then performing full byte-by-byte comparison only when the last characters match. This segmentation reduces the average comparison length from potentially 30-40 bytes to typically 1 byte, while maintaining 100% matching accuracy through the two-stage verification process.
2Reliability
If the dynamic linker processes all table entries completely, then no matching errors occur, but the loading speed decreases as table lengthens
Solution Approach 1:
The patent applies preliminary action by comparing the last character of strings before performing the complete byte-by-byte comparison. This preliminary filter eliminates most non-matching entries early in the process, allowing the system to maintain 100% linking reliability through full comparison when needed while achieving significant loading speed improvements by avoiding unnecessary full comparisons.
3Loss of information
If long string entries are stored in the symbol table, then more detailed symbol information is available, but comparison overhead increases
Solution Approach 1:
The patent segments the comparison process to handle long string entries efficiently: the last character serves as a quick discriminant that can eliminate most long entries without comparing their full length. This allows the system to maintain complete symbol information in the table while reducing average comparison time from potentially 30-40 bytes to typically 1 byte, as the segmentation enables early elimination of non-matching long entries.
Data Source
AI summary
An embodiment generally relates to a method of increasing efficiency in a dynamic linker. The method includes determining a length of a source string and a check segment of the source string and selecting a candidate string from a plurality of strings. The method also includes determining a candidate check segment of the candidate string based on the length of the source string and verifying the source string and the candidate string are identical in response to the check segment of the source string being identical to candidate check segment.


