Skip to main content

Adesh Native Linker (adeshlink)

● PARTIAL(Windows x86-64 PE is execution-tested; other output formats have significant limitations)

adeshlink is Adesh's native object linker and binary inspection tool. It reads ADOB objects and supported object/archive inputs, resolves symbols, lays out sections, applies supported relocations, and writes a target binary.

Planned for v0.4.0: The native-toolchain work described on this page is planned for Adesh v0.4.0. Target support is uneven, so do not interpret a listed output format as a completed or production-ready target.


Output format status​

Format/pathVerified scopeImportant limits
Windows PE32+Static & DLL x86-64 executables; produced binaries have been executed in end-to-end tests with real CRT importsIn-tree execution tested on Windows x86-64
ELFStatic & dynamic x86-64 executables execution-tested; shared libraries (.so) verified via dlopen/dlsymx86-64 Linux execution-tested; AArch64 pending hardware tests
Mach-O64-bit Mach-O headers, LC_SEGMENT_64, and dyld binding structures verified by decodersDynamic linking execution pending macOS CI runner
WASMLinker writer existsUse the compiler's WASM backend for runnable WebAssembly modules
Static archivesGNU ar archive reading and writingMulti-member archive resolution

The native code generator is also target-limited. x86-64 has a substantial integer GPR subset; AArch64 and RISC-V emit only a small proof-of-concept instruction set. See Native Compiler Toolchain for the end-to-end pipeline and compiler limitations.

For the tested Windows x86-64 path:

adesh build main.adesh --emit-adob -o build/main.adob
adeshlink build/main.adob -o build/main.exe

To request ELF output:

adeshlink --target x86_64-linux -o build/main.elf build/main.adob

ELF output is currently static-only and has not been run-tested. Choosing a target does not imply that its code generator, runtime, or binary format is complete.

The linker implements section garbage collection (--gc-sections) and identical code folding (--icf=safe or --icf=all) along with link-map and symbol-stripping options. These features do not constitute link-time optimization.

Shared-library output and LTO are not implemented. Requests fail explicitly:

adeshlink --shared main.adob -o libmain.dll
adeshlink --lto main.adob -o app.exe

--shared does not produce a DLL, .so, or dylib. --lto does not perform LTO. Use a supported static executable path instead.

Archive and inspection commands​

The CLI includes archive and binary-inspection commands. They are useful tooling, not guaranteed drop-in replacements for every LLVM or binutils behavior.

adeshlink ar rcs libmath.a math.obj
adeshlink nm app.exe
adeshlink objdump app.exe -h
adeshlink inspect main.adob
adeshlink sections main.adob
adeshlink relocations main.adob
adeshlink size app.exe
adeshlink strip app.exe -o app-stripped.exe

For ADOB-specific inspection and validation, see ADOB CLI tools.