/
githubmirror
/
rpm
Обзор
Документация
Войти
/
githubmirror
/
rpm
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/data/SOURCES/libhello.c
22 строки
440 B
Panu Matilainen
Generate requires for "pure" ELF DSO's regardless of executable bit
24 ноя 2020, 15:47
24 ноя 2020, 15:47
8901a6b
Код
Авторство
О чём код?
#include <stdio.h> /* * Sources to reproduce libhello.so and hellolib: * $ gcc -DIAM_LIB -shared -fPIE -o libhello.so libhello.c * $ gcc -L$(pwd) libhello.c -lhello -o helloexe * $ gcc -L$(pwd) -pie libhello.c -lhello -o hellopie */ int libhello_world(FILE *f); #ifdef IAM_LIB int libhello_world(FILE *f) { return fprintf(f, "hello world"); } #else int main(int argc, char *argv[]) { return libhello_world(stdout); } #endif