'can a bare metal targeted binary be executed on a musllibc linux

my binary file compiled use toolchain from https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz,

with link flag:

-lstdc++ -Wl,-z,relro,-z,now -pass-exit-codes -lm -Wall '--specs=rdimon.specs' -lrdimon '-mcpu=cortex-a72.cortex-a53' -mthumb -static

compiled successfully, but when I execute this file on my openwrt router, it said:

Segmentation fault.

I think a bare-metal binary can also be executed on a linux system, it doesn't have any relationships with any os, only with a cpu model. Am I right?

FYI:

my chip model was rockchip 3389, armv8, 4 cortex-a72 core and 2 cortex-a53 core, run under aarch64 mode



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source