There was a discussion a while ago which I missed, as usual, about whether Frodo loved Sam as much as Sam loved Frodo.
The book is full of evidence of how much Sam loves Frodo. He declares it outright in an internal monologue when they are in Mordor;
'Frodo's face was peaceful, the marks of fear and care had left it; but it looked old, old and beautiful, as if the chiselling of the shaping years was now revealed in many fine lines that had before been hidden, though the identity of the face was not changed. Not that Sam Gamgee put it that way to himself. He shook his head, as if finding words useless and murmured; 'I love him. He's like that, and sometimes it shines through, somehow. But I love him, whether or no'
What is in Sam loyalty and devotion at the start deepens until in Mordor it becomes something almost beyond love, self-sacrificing, single-minded, all-consuming. But when Gandalf lays the quest on Frodo, Sam is not in his mind. It is only at the wizard's prompting that Sam is taken along. In Rivendell too Sam scrambles aboard, rather than is taken along by Frodo because he cannot do without him, even though Sam has watched at his side when he was sick, showing how his devotion is only getting greater. Then at Amon Hen Frodo almost cruelly casts Sam off to go on alone.
It seems this is a one-sided affair, and at one time I thought that Frodo had a cool, somewhat reserved character, unable to show love in the same generous, impulsive, all-or-nothing way Sam does.
But the fact is Frodo's freedom to show love, like much of his freedom, has been taken away from him. When he assumes the responsibility to destroy the Ring he is taken over by it. His life, his loves and hopes and ambitions, are all crushed and squeezed into a corner to make room for the business of the Ring. And he feels, too, that he is dangerous to his friends; he bears the Ring, and it could destroy them.
Far from failing to love Sam, Frodo's apparent distancing is an attempt to spare the person he loves most in the world, after Bilbo. When Frodo hauls a wet, hurt Sam into the boat at Amon Hen he tells him it is death for Sam to come with him; 'And I could not have borne that.'
Throughout the book Frodo is aware of Sam's great love, but his own ability to reciprocate it is hampered by being increasingly absorbed and drained by the Ring. In Mordor, Frodo asks Sam what happened after he was attacked by Shelob. Sam tells him the whole story, of how he thought Frodo was dead, grieved, arranged his body, took the Ring and went on. Frodo, knowing only too well what Sam had suffered, can't speak. He just takes Sam's hand and presses it. At that stage, it is almost a relationship of pure mind, so well does each love and understand the other.
It could be said Sam does infinitely more for Frodo than Frodo does for Sam. But when they at last get back to the Shire, Frodo pays it all back. He never tells Sam he is suffering; he knows it would ruin Sam's happiness and despite suffering more because he suffers alone, he keeps it a secret from Sam. This sacrifice is Frodo's last, and greatest, act of love for Sam, he allows him to have a life, for one of them at least to be 'whole'. Only at the very end does he tell Sam, and then it is too late for a heartbroken Sam to do anything about it, except accompany his master to the Sea and bid him a sad farewell.