[Bug libelf/23903] Uses linux specifc mremap

mark at klomp dot org sourceware-bugzilla@sourceware.org
Wed Nov 21 12:31:00 GMT 2018


Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
                 CC|                            |mark at klomp dot org

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
That is a weird error. It means you could compile fine as if mremap was
available, but only during linking it is suddenly discovered that there is no

mremap is needed for supporting ELF_C_RDWR_MMAP with ELF files that grow. See
for example the tests/run-copyadd-sections.sh and
tests/run-copymany-sections.sh testcases (and the explanation in the second why
we don't use ELF_C_RDWR_MMAP). mremap is used because it is the only way to
extend an mmap without moving it.

Even on GNU/Linux mremap might fail, in which case writing out an
ELF_C_RDWR_MMAPed ELF file might just not work (it normally works when
extending the file a little, but not when multiple pages are needed).

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Elfutils-devel mailing list