== separate debuginfo conventions == We have the existing convention of a debuginfo path, with directories like /usr/lib/debug wherein we look up individual ELF files' .debug counterpart file. The old convention is by name (/usr/lib/debug/usr/bin/foo.debug for /usr/bin/foo with .gnu_debuglink foo.debug). The new convention (tried first) is by build ID (/usr/lib/debug/.build-id/xx/xxx... in lowercase hex of the build ID bits), yielding a symlink to the individual .debug file (-> ../../usr/bin/foo.debug). If we go whole hog on DwarfInterObject debug.a format, then we no longer have individual .debug ELF files to find. * Compatibility: For older tools (gdb, crash, etc), have an exploder tool that turns debug.a back into individual .debug files (with copies in place of interobject refs). * New lookup convention. 1. Could keep .build-id/xx/... symlink convention, but when the symlink is to an archive, find the ELF member with matching ID. a. Symlink has automagic tie in for RpmDebugInfo to enable {{{yum install /usr/lib/debug/.build-id/...}}} 1. Just check all of /usr/lib/debug/*/debug.a by that name convention, match IDs inside (same even by name w/o IDs?) 1. Some new kind of lookup database in /usr/lib/debug/.build-id/something a. Separate ones would be same as */debug.a with internal ID map. b. Consolidated database in /usr/lib/debug needs fiddler tool, RpmDebugInfo %post magic (or resp. other packaging systems) ==== build ID lookup map ==== Build IDs lend themselves to a sorted table optimized for binary search. A quick lookup table could be inside each package's debug.a like a {{{__.SYMDEF}}} pointing to the archive member with the ID. A consolidated table in a file could point to the archive files by name; putting it like that makes the symlink hack sound OK. Lookup table would indicate: number B of bytes in a build ID, number N of IDs in the table. Then an array of N offsets (archive member offsets or offsets into a string table), followed by N*B bytes giving the corresponding array of N B-byte IDs. The arrays are sorted by memcmp ordering of the IDs. Binary search by ID value is optimal, and the offset fields are aligned regardless of B.