On Mon, Jul 09, 2012 at 10:55:12PM +0100, John Rigg wrote:
It was the -lm option. With that added to the LD line
in the makefile
it could find cos, which was the undefined symbol stopping demolition.
Other undefined symbols like malloc, calloc and free didn't bother it
(these could be defined with the -l:libc.so option but it wasn't
necessary).
As a follow up for anyone else confused by these ld options, -lm
makes ld look for libm.so (which is a symlink to libm.so.6, the
system library containing math functions). I could also have used
-lc instead of -l:libc.so.
It's one of those stupidly obvious things I missed when I read the ld
manpage.
John