On 8/8/23 04:38, Alex Bennée wrote:
-    if (host_start < host_map_start) {
-        memset((void *)host_start, 0, host_map_start - host_start);
+    if (align_bss < end_bss) {
+        abi_long err = target_mmap(align_bss, end_bss - align_bss, prot,
+                                   MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS,
+                                   -1, 0);
+        if (err == -1) {
+            perror("cannot mmap brk");
+            exit(-1);

brk != bss even if brk generally comes after the bss section.

I've removed this error report entirely, returning failure to the caller, which will then handle it like any other mmap failure of the image.


r~


Reply via email to