By contrast, the Plan 9 C compiler does use the header when linking. Header files contain a prama statement with library name, removing the need for linker flags.
Also recommended is "Racing the Beam" from MIT Press [1]. It is a terrific tour of Atari 2600 software development by examining several different games, including another Howard Scott Warshaw cart, Yar's Revenge.
https://www.freepascal.org