<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/110119>110119</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc] add `mremap` syscall wrapper
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
SchrodingerZhu
</td>
</tr>
</table>
<pre>
We need to create a `mremap` wrapper for linux targets, see https://man7.org/linux/man-pages/man2/mremap.2.html.
This requires:
- implement the entrypoint header similar to `libc/src/sys/mman/mmap.h`
- modify `libc/src/sys/mman/CMakeLists.txt` accordingly
- implement the entrypoint similar to `libc/src/sys/mman/linux/mmap.cpp`
- modify `libc/src/sys/mman/linux/CMakeLists.txt` accordingly
- add in the header spec
- modify `functions` section in `libc/newhdrgen/yaml/sys/mman.yaml`
- modify `SysMMan` section in `libc/spec/linux.td`
- add in test
- similar to `libc/test/src/sys/mman/linux/mmap_test.cpp`
- modify `libc/test/src/sys/mman/linux/CMakeLists.txt` accordingly
-----------------------------------------------------
Misc:
- How to build libc for dev: https://libc.llvm.org/full_host_build.html
- Code style and dev guide: https://libc.llvm.org/dev/index.html
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVE1v5CgQ_TX4gtoC_JH2wYdsotYetk9ZaaS5RNiUbWYweAB34n8_AvdXosx0ZnwABFWvXj1XFXdO9hqgRsU_qHhM-OwHY-undrBGSN2D_TrMSWPEUn8BrAEE9ga3FrgHzDEqyWhh5BMqCX6xfJrA4s5YrKSeX7HntgfvEHvADgAP3k8OZfeI7RDbjVzfpcb2iO2i9Xq1mXgPbj2zsEX4lKWDH1WKyCMi9-v6_yAdtvBjlhYi6tXbBstxUjCC9tgPgEF7u0xGao8H4AIsdnKUituQDSqJkk2L2M7ZuC4x_sj1uk3pgEqyAmOMN3g0QnbL7_0e9vw7_Cedd6l_9UEe3rbGBk3VcpPkZ9mdhQss22n6c54nhE_x5UJgqSPZk4wTtKeI1wG7WbdeGu0CkoN4Dq4XLhpeBmF7CCQWPqo3xNJ4c0nmGvppcfs9178EjpSOiaVenFEu9MH5C_CHUkeTm4o_B7N3sn-g-m2wT4h_zOFvvtV1L1177pIN_te8hJSbWSqBA9HYtgIOKLt_16jhNVXqMB67tZuVeh6M88_RO3bmCfbBCMDOLwow1yLg4X6WAm6jhtBsJ7WA1yvEdU1EnYkqq3gCNb1jd1lR0DJPhrql20xkeUZEXlAKFHJCtkC7inTFtsm7RNaMsJxUrKSsYHmeZnlZsYbSklQV3RYc5QRGLtWZSiKdm6GmlFBaJYo3oFycjoz1xgjcSes8jkaIsTAzbR18N83cO5QTFX_jGc1Lr-J0jcVQPMYifDM23eJartRpfCazVfVbqXrph7lJWzMG3dThtG0ma75BG4or8gmVdeR9qNnPAAAA__8h49UX">