#warning THIS IS FLAWED...
Must check this again for thread-safetyness. All the lines "Aquire a refernce so that it will not be modified" are probably not necessary!
Maybe get rid of all that code duplication. But OTOH, things are currently more easily readable.
Go fancy and implement O(n/m) avg, O(n) worst Boyer-Moore for find().
linker.cc: Could use local stack allocation ala alloca() or char buf[n] if supported. See GMP for similar implementation.