KasperskyOS Community Edition 1.2
Contents
Contents
Cross compilers
The toolchain provided in the KasperskyOS SDK includes one or more GCC compilers. The toolchain/bin
directory contains the following files:
- Executable files of compilers (for example,
x86_64-pc-kos-gcc
,arm-kos-g++
) - Executable files of linkers (for example,
x86_64-pc-kos-ld
,arm-kos-ld
) - Executable files of assemblers (for example,
x86_64-pc-kos-as
,arm-kos-as
)
In addition to standard macros, an additional macro __KOS__=1
is defined in GCC. Use of this macro lets you simplify porting of the software code to KasperskyOS, and also simplifies development of platform-independent programs.
To view the list of standard macros of GCC, run the following command:
echo '' | aarch64-kos-gcc -dM -E -
Linker operation specifics
When building the executable file of an application, by default the linker links the following libraries in the specified order:
- libc is the standard C library.
- libm is the library that implements the mathematical functions of the standard C language library.
- libvfs_stubs is the library that contains stubs of I/O functions (for example,
open
,socket
,read
,write
). - libkos is the library for accessing the KasperskyOS core endpoints.
- libenv is the library of the subsystem for configuring the environment of applications (environment variables, arguments of the
main
function, and custom configurations). - libsrvtransport-u is the library that supports IPC between processes and the kernel.