Files
faumaray bba5c8a39a initial commit
Signed-off-by: Aleksey Selihov <faumaray@gmail.com>
2026-05-22 02:40:32 +03:00

13 lines
444 B
C

#include <math.h>
#include <string.h>
// Combines a libc.so.6 symbol (strlen) and a libm.so.6 symbol (sqrt).
// Returns 0 on success (verifies both imported symbols resolve correctly).
int multi_libc_test(void) {
const char* msg = "hello";
size_t n = strlen(msg); // libc.so.6
double s = sqrt((double)n); // libm.so.6
// sqrt(5) ≈ 2.236; check it's in a reasonable range.
return (s > 2.0 && s < 3.0) ? 0 : 1;
}