In Skanda Purana,Bramha Khand, Sutji described about how Rameshwara Lingam came into existence to the assembled sages in Nimisharanyam.
How Rameshwar Linga Existed
After killing Ravana, Sri Ram enthroned Vibhishan as the king of Lanka. While returning to Ayodhya he made a brief stop at Gandhamadan mountain. Since the thought of having killed a brahmin (Ravan) kept on tormenting him, he decided to atone for his sins. So, he installed the idol of Rameshwar linga at Rameshwar setu and worshiped it. Rameshwar linga is so sacrosanct that all the holy places, sages and ancestors are believed to exist within the temple premise of Maheshwar linga. Being installed by Sri Ram himself, this particular linga has special significance attached to it.