You will observe that the nm files only differ in the last four lines, and that too in only three of them.
The difference is that the executable built from the source with just "inline" has the functions square, cube and fourthpower marked as "W" which according to man:nm means that "The symbol is a weak symbol that has not been specifically tagged as a weak object symbol".
In the same place, the executable built from the source with "static inline" has the same functions marked "t" which denotes a local symbol in the code section.
I actually expected static inline to make the entries for the functions disappear but OK, I'm calling pointers to those functions, so they won't disappear. But at least shouldn't they become weak objects, like they do for "inline"?
Though I do not profess to fully understand what a weak object is, (upon which matter I would like to learn more) it sounds like an object which does not have a full separate existence. If an inline function is such a weak object, how come a static inline one is not tagged as one?
Thanks. Shriramana Sharma.
Attachment:
function-pointers-inline-staticinline.tar.gz
Description: application/gzip