Vocabulary
elf

Inputs
segmenta Elf32/64_Phdr
sectionsa Elf32/64_Shdr-array


Outputs
sectionsan object


Definition


TYPED:: elf-segment-sections
( segment: Elf32/64_Phdr sections: Elf32/64_Shdr-array -- sections )
segment [ p_offset>> dup ] [ p_filesz>> + ] bi [a,b)
:> segment-interval sections
[ dup [ sh_offset>> dup ] [ sh_size>> + ] bi [a,b) 2array ]
{ } map-as :> section-intervals section-intervals [
second segment-interval interval-intersect
empty-interval = not
] filter keys ;