Create and write library to libbuf. The library consists of: !<arch>\n header 1st Linker Member Header 2nd Linker Member Header Longnames Member object modules...
Add object module or library to the library. Examine the buffer to see which it is. If the buffer is NULL, use module_name as the file name and load the file.
Set the library file name based on the output directory and the filename. Add default library file name extension.