file details and debug support

This patch contains the file details part and linkmap support. In order to
save space, the linkmap part and file details part are merged into one
implementation. Both use the same pointer, obj->detail.