Black Sabbath star Geezer Butler has revealed he wrote a macabre tribute song to bandmate Tony Iommi after the guitarist was diagnosed with cancer at the beginning of 2012.

Iommi has been battling lymphoma throughout the heavy rock group's reunion and when bassist Butler, who writes the bulk of the band's songs, learned of his health crisis he felt inspired to get his thoughts and feelings out in lyrics for a track he tentatively titled Hanging by a Thread.

He tells Revolver magazine, "It (song) was very much about dying, about giving your last breath and passing your spirit on."

But the track didn't make it on the band's comeback album 13.

Butler adds, "We never came up with the finished thing."

The rocker admits he feared the worst for his bandmate - because their pal Ronnie James Dio had lost his cancer battle in 2010.

He tells the magazine, "We didn't know if he (Iommi) was going to recover from it, especially after seeing Ronnie go so fast. Ronnie went right in six months from being diagnosed to dying (sic)."