Re: ww07 - Agenda
followup wrt identification of symbols used by an empty program, since it was pulling in libc.
The program "test.c":
while (1); /* Infinite loop */
gcc test.c -o test
My initial thought of using prelink did not work, because apparently prelink has been bitrotting at least since 2017.
Admittedly, also yours truly had not used it since 2010. For some reason, it's still around, though.
Anyways, there are various other ways to obtain the desired information.
One of them is to use nm:
nm -D test
From man nm:
"U" The symbol is undefined.
"w" The symbol is a weak symbol that has not been specifically tagged as a weak object symbol. When a weak defined symbol is linked with a normal defined symbol, the normal
defined symbol is used with no error. When a weak undefined symbol is linked and the symbol is not defined, the value of the symbol is determined in a system-specific manner
without error. On some systems, uppercase indicates that a default value has been specified.
Those weak housekeeping symbols seem to be the reason why libc is being pulled in.