A .a file is just an archive of other files. Typically those are .o files, to which you already know the answer. They don't have to be though - they don't have to be object code at all in fact - they can literally be any files you like.
A .so file has to be relocatable to work as it has to be able to be loaded at different addresses in different processes depending on what address is available at runtime.