On Friday, Miley Cyrus and Linda Perry performed Hands of Love from the movie Freeheld on Ellen DeGeneres' daytime talk show.

Freeheld, which opened nationwide earlier this month, is the Hollywood adaptation of the documentary short film of the same name based on the true story of a lesbian couple facing death while battling a discriminatory government.

Lieutenant Laurel Hester (played by Julianne Moore) fought for the right to leave her Ocean County, New Jersey police pension to her domestic partner, Stacie Andree (Ellen Page), as she faced a diagnosis of terminal lung cancer. Hester's conservative detective partner Dane Wells (Michael Shannon) stepped up to help her in her fight. Steve Carell plays activist Steven Goldstein in the film.

Out singer-songwriter Perry co-wrote Hands of Love with Cyrus and accompanied her at the piano during her performance.

(Related: Julianne Moore, Ellen Page: Freeheld reflects change on marriage equality.)