The version of the poem about Eärendil the Mariner as published in The Fellowship of the Ring wasn't actually the final version of the poem that Tolkien would have intended to be published. There were six versions/revisions of the poem, and the last three texts were mislaid, leaving only the third version available to be published. Which explains a lot of the weird structure that you might notice in the published version.
By the time the three most recent revisions were found, Tolkien himself had forgotten all about them and puzzled over when they had been written. Christopher Tolkien has more or less sorted it out, and has put together the final form of the Eärendillinwë as it should have been published. I think it's a lot better than the one you see in Fellowship, so it's a pity that it's too big an edit to fix in later editions.
Anyway, here it is:
Eärendil was a mariner
That tarried in Arvernien:
he built a boat of timber felled
in Nimbrethil to journey in.
Her sails he wove of silver fair,
with silver were her banners sewn;
her prow was fashioned like the swans,
that white upon the Falas roam.
His coat that came from ancient kings
of chainéd rings was forged of old;
his shining shield all wounds defied
with runes entwined of dwarven gold.
His bow was made of dragon-horn,
his arrows shorn of ebony,
of triple steel his habergeon;
his scabbard of chalcedony;
his sword was like a flame in sheath,
with gems was wreathed his helmet tall,
an eagle-plume upon his crest,
upon his breast an emerald.
Beneath the Moon and under star
he wandered far from northern strands,
bewildered on enchanted ways
beyond the days of mortal lands.
From gnashing of the Narrow Ice
where shadow lies on frozen hills,
from nether heats and burning waste
he turned in haste, and roving still
on starless waters far astray
at last he came to Night of Naught,
and passed, and never sight he saw
of shining shore nor light he sought.
The winds of fear came driving him,
and blindly in the foam he fled
from west to east and errandless,
unheralded he homeward sped.
In might the Fëanorians
that swore the unforgotten oath
brought war into Arvenien
with burning and with broken troth;
and Elwing from her fastness dim
then cast her in the waters wide,
but like a mew was swiftly borne,
uplifted o'er the roaring tide.
Through hopeless night she came to him,
and flame was in the darkness lit,
more bright than light of diamond
the fire upon her carcanet.
The Silmaril she bound on him,
and crowned him with the living light,
and dauntless then with burning brow
he turned his prow at middle-night.
Beyond the world, beyond the Sea,
then strong and free a storm arose,
a wind of power in Tarmenel;
by paths that seldom mortal goes
from Middle-earth on mighty breath
as flying wraith across the grey
and long-forsaken seas distressed
from East to West he passed away.
Through Evernight he back was borne
on black and roaring waves that ran
o'er leagues unlit and foundered shores
that drowned before the Days began,
until he heard on strands of pearl
when ends the world the music long,
where ever foaming billows roll
the yellow gold and jewels wan.
He saw the Mountain silent rise
where twilight lies upon the knees
of Valinor, and Eldamar
beheld afar beyond the seas.
A wanderer escaped from night
to haven white he came at last,
to Elvenhome the green and fair
where keen the air, where pale as glass
beneath the Hill of Ilmarin
a-glimmer in a valley sheer
the lamplit towers of Tirion
are mirrored on the Shadowmere.
He tarried there from errantry,
and melodies they taught to him,
and sages old him marvels told,
and harps of gold they brought to him.
They clothed him then in elven-white,
and seven lights before him sent,
as through the Calacirian
to hidden land forlorn he went.
He came unto the timeless halls
where shining fall the countless years,
and endless reigns the Elder King
forever king on mountain sheer;
And words unheard were spoken then
of folk of Men and Elven-kin,
beyond the world were visions showed
forbid to those that dwell therein.
A ship then new they built for him
of mithril and of elvenglass
with crystal kee; no shaven oar
nor sail she bore, on silver mast
the Silmaril as lantern light
and banner bright with living flame
of fire unstained by Elbereth
herself was set, who thither came
and wings immortal made for him,
and laid on him undying doom,
to sail the shoreless skies and come
behind the Sun and light of Moon.
From Evereven's lofty hills
where softly silver fountains fall
his wings him bore, a wandering light,
beyond the mighty Mountain Wall.
From a World's End then he turned away
and yearned again to find afar
his home through shadows journeying,
and burning as an island star
on high above the mists he came,
a distant flame before the Sun,
a wonder ere the waking dawn
where grey the Norland waters run.
And over Middle-earth he passed
and heard at last the weeping sore
of women and of elven-maids
in Elder Days, in years of yore.
But on him mighty doom was laid,
till Moon should fade, an orbed star
to pass, and tarry never more
on Hither Shores where mortals are;
till end of Days on errand high,
a herald bright that never rests,
to bear his burning lamp afar,
the Flammifer of Westernesse.