A library module is linked as a whole unless it has been compiled with the GHC -split-objs
option. However this makes compilation slower, so it is not the default. From GHC documentation:
However, assembling all the sections separately is expensive, so this is slower than compiling normally. We use this feature for building GHC's libraries (warning: don't use it unless you know what you're doing!).