You're not stumped, that was exactly the problem.
The linker decided to
prioritise the Unix system call over the user's routine, without
complaint or advisory. In the larger context of all the surrounding
code, all us experts who just as a matter of unconscious habit avoided
naming routines like that, didn't see the problem.
I thought that was broken behavior. Isn't it defined behavior that
the standard libraries are linked after any objects specified in the
ld command? And code isn't used from a library if the symbol already
has a definition from an earlier object file. In fact, I've used that
property more than once to override a function in a library.
BLS