A C++ header gets included in multiple files. That means that any definition in the header will thus get compiled into multiple translation units. During linking, the generated code gets de-duplicated.

See armlink - Elimination of common groups or sections