linux-user/elfload: use MAP_FIXED_NOREPLACE in pgb_reserved_va
commitc1f6ad798c7bb328a6f387f2509bf86305383d37
authorAlex Bennée <alex.bennee@linaro.org>
Wed, 1 Jul 2020 13:56:45 +0000 (1 14:56 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Sat, 11 Jul 2020 14:53:00 +0000 (11 15:53 +0100)
tree915d6b186fa9a09aa201553faae7bb814e9ad183
parent27ebeda0c07dcc2e9eec98ed1f70115ffa1e3797
linux-user/elfload: use MAP_FIXED_NOREPLACE in pgb_reserved_va

Given we assert the requested address matches what we asked we should
also make that clear in the mmap flags. Otherwise we see failures in
the GitLab environment for some currently unknown but allowable
reason. We use MAP_FIXED_NOREPLACE if we can so we don't just clobber
an existing mapping. Also include the strerror string for a bit more
info on failure.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200701135652.1366-34-alex.bennee@linaro.org>
linux-user/elfload.c