musl/ldso
Rich Felker d610c14855 enable reclaim_gaps for fdpic
the existing laddr function for fdpic cannot translate ELF virtual
addresses outside of the LOAD segments to runtime addresses because
the fdpic loadmap only covers the logically-mapped part. however the
whole point of reclaim_gaps is to recover the slack space up to the
page boundaries, so it needs to work with such addresses.

add a new laddr_pg function that accepts any address in the page range
for the LOAD segment by expanding the loadmap records out to page
boundaries. only use the new version for reclaim_gaps, so as not to
impact performance of other address lookups.

also, only use laddr_pg for the start address of a gap; the end
address lies one byte beyond the end, potentially in a different page
where it would get mapped differently. instead of mapping end, apply
the length (end-start) to the mapped value of start.
2018-04-17 19:23:01 -04:00
..
dlstart.c fix regression in SH/FDPIC dynamic linker 2016-02-18 04:13:05 +00:00
dynlink.c enable reclaim_gaps for fdpic 2018-04-17 19:23:01 -04:00