davidlattimore / wild

A very fast linker for Linux
Apache License 2.0
670 stars 17 forks source link

Use Vec for active records in compute_segment_layout #99

Closed marxin closed 2 months ago

marxin commented 2 months ago

The suggested approach can catch invalid encapsulation of segments like:

events.push(OrderEvent::SegmentStart(crate::program_segments::LOAD_RO));
events.push(OrderEvent::SegmentStart(crate::program_segments::PHDR));
events.push(OrderEvent::SegmentEnd(crate::program_segments::LOAD_RO));
events.push(OrderEvent::SegmentEnd(crate::program_segments::PHDR));