Как собрать код в разделяемую библиотеку с помощью gcc
gcc -fPIC -c helloworld.c -o helloworld.o gcc -shared -Wl,-soname,libhelloworld.so.1 -o libhelloworld.so.1.0.1 helloworld.o
gcc -fPIC -c helloworld.c -o helloworld.o gcc -shared -Wl,-soname,libhelloworld.so.1 -o libhelloworld.so.1.0.1 helloworld.o
char sizeLow, sizeHigh;
int size;
FILE * pFile;
pFile = fopen ("myfile.bin" , "rb");
fread (&sizeHigh, 1, 1, pFile);
fread (&sizeLow, 1, 1, pFile);
size = (sizeHigh << 8) | sizeLow;
taskset -c 0 ./program_name
Could not load shared library symbols for library_name.so. Do you need "set solib-search-path" or "set sysroot"?
program | tee filename.log
cat /proc/cpuinfo | grep processor | wc -l
make -j 'cat /proc/cpuinfo | grep processor | wc -l'
grep processor /proc/cpuinfo | wc -l
ls -l
du -hs /path-to-directory
du -h --max-depth=1 /path-to-directory