diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-04-17 15:55:18 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-04-17 19:23:01 -0400 |
commit | d610c148554766f2a0e48304fe2550b340f84872 (patch) | |
tree | 285c50b6cbc152381fe9225b2ea65e3d0e7be508 /src/network/sockatmark.c | |
parent | 14032c30e2d41e5c0dac25d399f7086f74d4e0c8 (diff) | |
download | musl-d610c148554766f2a0e48304fe2550b340f84872.tar.gz |
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.
Diffstat (limited to 'src/network/sockatmark.c')
0 files changed, 0 insertions, 0 deletions