#!/bin/sh# program# <- liba.so## Expected: Weak symbol in liba.so resolves to symbol in program,# not to symbol in liba.so.. ./test_setup# create liba.socat > liba.c << EOIint __attribute__((weak)) c() { return 2; }int __attribute__((weak)) a() { return c(); }int (*a_p)() = &c;int b() { return (*a_p)(); }EOI# buildcompile_lib -o liba.so liba.c# create programcat > program.c << EOIextern int a();extern int b();int c(){return 4;}intmain(){return a() + b();}EOI# buildcompile_program -o program program.c ./liba.so# runtest_run_ok ./program 8