Seg Fault on cross compiled binary for ARM
### Description

Segmentation fault encountered when cross compiling for arm(cortex-a53).

### Nim Version

Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2024-07-07
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 1dcc364cd2e284f831735e0fe9b988b08c82ac4f
active boot switches: -d:release


### Current Output

```text
Traceback (most recent call last)
pasture.nim              pasture
asyncdispatch.nim        waitFor
asyncdispatch.nim        poll
asyncdispatch.nim        runOnce
asyncdispatch.nim        processPendingCallbacks
asyncmacro.nim           processRequest (Async)
asyncmacro.nim           reqHandler (Async)
system.nim               echoBinSafe
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Segmentation fault

Compiler warning:
/usr/bin/arm-linux-gnueabihf-ld: /home/vorrtt3x/.cache/nim/pasture_r/@m..@s..@s..@s.choosenim@stoolchains@snim-@hdevel@slib@spure@snativesockets.nim.c.o: in function `getAddrInfo__pureZnativesockets_u249':
@m..@s..@s..@s.choosenim@stoolchains@snim-@hdevel@slib@spure@snativesockets.nim.c:(.text+0x1284): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
```


### Expected Output

```text
write/read from file system
```


### Possible Solution

_No response_

### Additional Information

I'm trying to r/w requests via `asynchttpserver`. 
I've tried compiling with `zig cc`, `gcc` toolchains for arm, `clang`. Even tried using musl-libc.
The following is the config I defined as per my knowledge:
```
switch("gcc.exe", "zig cc")
switch("define", "release")
switch("cpu", "arm")
switch("os", "linux")
switch("passL", "-static")
switch("d", "debug")
switch("stacktrace", "on")
```

![image](https://github.com/nim-lang/Nim/assets/32898329/7f5f525e-5797-4e27-835b-ca8b41f23ea9)
