Before answer you question, I should guess the "binary" you mentioned is ELF Executables.
If it is really a binary(static link for example), it could run anywhere.
1. the rootfs is created by toolchain library. If you have skills to manually create a rootfs, you will know that very clear.
2. the dynamic link program needs dynamic linker.
ld.so(8) - Linux manual page
The dynamic linker is the program that manages shared dynamic libraries on behalf of an executable. It works to load libraries into memory and modify the program at runtime to call the functions in the library.
ELF allows executables to specify an interpreter, which is a program that should be used to run the executable. The compiler and static linker set the interpreter of executables that rely on dynamic libraries to be the dynamic linker.
That is why, if you dynamically link a program with glibc, could not run in the rootfs created by uclibc, or android.
If you run it, it will get very interesting error report, "file not found".
But if you statically link a program, you can run it in rootfs created by uclibc or android.
To speakly frankly, you should not raise this very basic question here. Here is the community not for the basic knowledge.
And If you are an software engineer. You have very long road ahead for you.
Show you here of the my host pc X64 the program(cat)
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
/lib64/ld-linux-x86-64.so.2 is the dynamic linker.
It is needed for running the dynamic linked program here is "/bin/cat"
readelf --headers /bin/cat
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
PHDR 0x0000000000000040 0x0000000000000040 0x0000000000000040
0x00000000000001f8 0x00000000000001f8 R E 0x8
INTERP 0x0000000000000238 0x0000000000000238 0x0000000000000238
0x000000000000001c 0x000000000000001c R 0x1
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x00000000000079d0 0x00000000000079d0 R E 0x200000
LOAD 0x0000000000007a70 0x0000000000207a70 0x0000000000207a70
0x0000000000000650 0x00000000000007f0 RW 0x200000
DYNAMIC 0x0000000000007c18 0x0000000000207c18 0x0000000000207c18
0x00000000000001f0 0x00000000000001f0 RW 0x8