Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.48 KB

README.de.md

File metadata and controls

50 lines (34 loc) · 1.48 KB

Sprachen: English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Français | Deutsch | Español | Italiano | Русский | العربية

← NeverC Beispiele

Linux vollständig statisches Binary Beispiel

Eigenständige, statisch gelinkte Linux-Datei mit NeverC. Null Laufzeitabhängigkeiten.

NeverC bündelt ein Linux-Sysroot (Ubuntu 22.04, glibc 2.35) in runtime/linux/.

Erstellung

cd examples/linux-static
neverc make          # debug: -g (Standard beim ersten Build)
neverc make release  # release: -O2 --strip
neverc make debug    # zurück zu debug

Das Makefile speichert PROFILE, sodass spätere neverc make-Aufrufe dieselbe debug/release-Auswahl behalten. Release nutzt NeverCs integriertes --strip: Debug-Metadaten und unnötige statische Symbolnamen entfallen, benötigte Loader-/Dynamik-ABI-Namen bleiben. Siehe Release-Builds.

AArch64:

neverc make TARGET=aarch64-linux-gnu

Manuelle Erstellung

neverc --target=x86_64-linux-gnu -Wall -static -lm -o static-demo main.c

Ausführung

chmod +x static-demo
./static-demo

Funktionen

  • Systeminformationen
  • Mathematische Funktionen: sqrt, sin, pow, log
  • String-Operationen, dynamische Speicherverwaltung