llvm-project
bb443359 - [ELF] Validate merge section offsets in getSymVA and match GNU ld (#188677)

Commit
12 days ago
[ELF] Validate merge section offsets in getSymVA and match GNU ld (#188677) Move the "offset is outside the section" error for merge sections from getSectionPiece to getSymVA, where we know the offset comes from a section symbol + addend. Include the offset value in the diagnostic. Accept offset == section_size (one-past-end) to match GNU ld behavior, while rejecting offset > section_size. Skip out-of-bounds offsets in MarkLive to avoid assertion failures in getSectionPiece.
Author
Parents
Loading