This paper proposes optimized precoders for dual-functional radar and communication (RadCom) systems to maximize the sum-rate (SR) while satisfying radar target detection and user data rate constraints towards 6G networks. For this purpose, a RadCom precoder scheme that exploits radar interference is utilized with massive multiple-input-multiple-output (MIMO) orthogonal frequency-division multiplexing (OFDM) systems. Firstly, the communication capacity and radar detection performance metrics are analytically derived. Then, optimum precoders that utilize these analytical expressions are designed via convex optimization to maximize the SR with modest computational complexity. The analytical results are also verified by simulations. The results show that the optimized precoder can substantially enhance the SR compared to the benchmark methods.