Well, well, well.
Turns out SDL wasn't being linked in at all. Apparently the `sdl-config --static-libs` option was being passed at the wrong place in the linker line for linux:. argh! No error or anything. It just didn't show up in the resultant ELF. No symbols, no -lpthread errors, no nothin'! Gah. I was able to fix this though, and was able to get the thing to actually acknowlege the existence of the `sdl-config --static-libs` argument.
My troubles didn't end there, though. Oh no. Of course, unliked dynamically linked stuff, static libs can't bring along their own dependencies. So, for instance, the libSDL that ships with Debian sid is compiled against aalib. Which is cool, but sdl-config --static-libs doesn't mention it. Yay for a crapload of "could not resolve symbol" errors. So, I had to pass `aalibconfig --static-libs` manually. Which means a dep that the end user's libSDL may or may not require is hardwired to the um build system. And the same thing for libgpm.a, which my Debian copy of libSDL requires, is not even included in the Debian gpm packages. Ugly, ugly, ugly.
So, of course, the magic bullet that solves all this crap is: link dynamically.
Unfortunately, tt mode in UML cannot be statically linked. Users will be obliged to use SKAS mode to use the SDL Framebuffer. Period. Either that or some crazy hacker finds out a way of making tt mode work with a dynamic kernel, but I doubt it.
SKAS mode is cleaner, faster, and more 'lifelike' to a real linux box (memory spaces are arranged much more like that of the host) than tt mode UML is. It is completely superior. Only drawback is the host kernel must have a patch which is not yet standard issue.
I set my UM source tree's .config to SKAS mode (and changed the sdl-config line to --libs rather than --static-libs) and it compiled cleanly! no errors! not so much as a warning. I wasn't really able to test my new image since my host doesn't have SKAS support in my host kernel though. The image seems to start OK though, up until the part where it tries to load init (and of course can't because it can't allocate the new address space). If my memory serves me correctly, it got past the part where -lpthread crashed my tt kernels back when I last tried this project. But we shall see when I load a SKAS kernel on my laptop tomorrow night...
Night all!
hm, I'm probably going to see Gothica tomorrow with a friend of mine. I guess I'll see if it is as freaky as the movie posters indicate it is... Although, what's the bet it is just americanised holywood crap? :P