ld/pdb: Read inlinee-lines signature at correct offset
Fixes ld/pdb.c to read the signature at the correct offset within the payload, improving PDB parsing.
This patch corrects an issue in ld/pdb.c where the inlinee-lines signature was read from the wrong memory location. The fix ensures the signature is read from the start of the payload, not from the first entry’s file ID. Test cases have been updated to reflect this change and to flag linker failures as test failures, making the bug observable.
In Details
This change corrects an offset calculation within the PDB (Program Database) parsing logic in GNU ld. Specifically, it addresses how the parse_inlinee_lines function reads the signature for inlinee source line information. The fix ensures that the signature is read from the beginning of the data buffer passed to the function, rather than after some initial metadata, which was previously causing incorrect version checks and potential misinterpretations of PDB debug information.
- PDB
- Program Database, a file format used by Microsoft for storing debugging and project information.
- ld
- The GNU linker, responsible for combining object files and libraries into an executable or shared library.
- inlinee-lines signature
- A specific identifier within the PDB format that marks the beginning of inlinee source line information, used for debugging.