The linker includes everything contained in a file whether it is used or not.
it depends by the toolchain. SierraC does it, gcc&binutils do not since they try to optimize so they removed unused code.
this is the reason why for the Not-Yaroze BSP contained in the OpenBIOS of Playstation1 we had to create a dummy module in order to fool the compiler not to remove symbols that you are not using in the BSP whose code was burned in the ROM (yep, we replaced the EPROM with a flash)
Concerning applications ... well once the toolchain got stabilized there was no problem, and it was also easy to build the file and serially upload it to the console into the ram.
The Japanese version of the Playstation1 has a serial port as well as a port that exposes a window to the CPU's addresses. It was useful for developing a RAM-emulator in order to speed-up the uploads.
Unfortunately, then Sony decided to remove both the ports
Anyway, the build-up of the application was not tricky, you just needed to link the application with the crt0, lib_BSP (which only contains symbols pointing entities defined in the ROM) and libc (might use BSP entity, or new primitives defined in the libc itself) and you were ready to play.
Creating the BSP was a completely different matter because it required a trick. In fact the BSP was contained in the ROM, physically 512Kbyte, mainly written in assembly, with an attached BSP written in C. Assembly has no problem, but the C stuff contains a collection of functions and global variables, and the problem *is* that none or just a few of the functions are invoked by something, and the "main()" was just a empty function to fool the linker, therefore mips1le-softfloat-2.95.1 (yeah, v2.95 .. 10 years ago) was tempted to produce an empty module.
At the first attempt, we had more than 200 functions defined in our C sources and, once compiled and linked, we get an empty binary X___X
Digging deeper, we found the workaround-trick: we filled the main-function which a list of function calls and global variables initialization, so the linker was happy and didn't remove them.
Without this trick, the linker had thought they were "useless" references because never called at compile time.