"They are old swords, very old swords of the High Elves of the West, my kin. They were made in Gondolin for the Goblin-wars. They must have come from a dragon's hoard or goblin plunder, for dragons and goblins destroyed that city many ages ago. This, Thorin, the runes name Orcrist, the Goblin-cleaver in the ancient tongue of Gondolin; it was a famous blade. This, Gandalf, was Glamdring, Foe-hammer that the king of Gondolin once wore. Keep them well!"
"Whence did the trolls get them, I wonder?" said Thorin looking at his sword with new interest.
"I could not say," said Elrond, "but one may guess that your trolls had plundered other plunderers, or come on the remnants of old robberies in some hold in the mountains of the North. I have heard that there are still forgotten treasures of old to be found in the deserted caverns of the mines of Moria, since the dwarf and goblin war."
Thorin pondered these words. "I will keep this sword in honour," he said. "May it soon cleave goblins once again!"
From "A Short Rest," The Hobbit