Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.3.0
-
None
Description
The minorMappings static const data structure causes relocations by using an array of pointers. It also wastes space in the executable by duplicating the common prefixes that are already stored in majorMappings.
We could make minorMappings store the strings instead of pointers to strings to remove the relocations, like we do in majorMappings, but some entries are very long (40+ character), so we'd be storing a lot of NULs. Better to use qOffsetStringArray, and to strip the common prefixes. We can re-construct the string on the stack with two strcpy()s into a statically-sized buffer from the prefix in majorMappings and the suffix in minorMappings.