On Sat, Aug 13, 2011 at 03:49:13PM -0700, Alex Nelson wrote:
I noticed while I was producing the patch that I had to have the filetime_to_8601 in xml/hivexml.c due to a linking error. I would've liked to have the function in lib/hivex.c, but I hit a strange linking error when I had the function and its prototype placed as in the patch below. It's strange because the extern doesn't appear to be in a strange place, and there is no static restriction on the function definition, so the function seems to me like it should behave like any of the other API functions. Could it be a linking eror against an old library?
When the libhivex.so library is built, we whitelist the symbols that it exports. This is to prevent unintentional exports of symbols. In any case, you can't have filetime_to_8601 in hivex.c. It's solely required by hivexml, so it should be there. It isn't namespaced properly. Because it's not listed in the generator, no bindings would be made for it in other languages, and for the same reason the generator doesn't add it to the whitelist. Also <hivex.h> is the public API of the hivex library. One of the consumers happens to be hivexml, but there are many others. This file isn't a dumping ground for random symbols and #includes that are only needed by hivexml. So, NACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/