The Barbie movie is poised to do big numbers at the box office later this month, and it's got a star-studded soundtrack to boot. While the track listing features plenty of pop and hip-hop stars, there are at least two rockers in the mix: Slash and Wolfgang Van Halen.

The top-hatted Guns N' Roses guitarist lends his talents to "I'm Just Ken," written by Mark Ronson and sung by Ryan Gosling, who also portrays Ken in the movie. You can hear part of the song below.

Ronson revealed Slash's involvement on the track, which Rolling Stone described as a "big '80s-style power ballad," during a brief red carpet interview with Variety. "Slash is my hero," he confessed. "I was, what, [in] seventh grade when Appetite for Destruction came out. He's my all-time hero. I had pictures of Slash all over my walls. So when we were getting near this song being done, I was like, 'It never hurts to ask.' It seems like such a long shot."

His boldness paid off. "I sent him the song and he was like, 'This is a good song,'" Ronson said. "I [didn't] know Slash that well before this, and he was like, 'Cool, I'll play on it.' And he was so cool. He killed it. He plays the solo at the end and the rhythm parts. It's wonderful."

Watch Mark Ronson Discuss Slash's Involvement on 'I'm Just Ken'

Ronson also enthused about Gosling's performance on "I'm Just Ken" and detailed a bit of the songwriting process. "It was like, 'OK, you've got three hours on a Tuesday afternoon. You guys cut the vocals,'" he said. "We hadn't met before, but we went in the studio and just talked a little bit about music. And he just went in and as he started to get warmed up, I was like, 'Oh my God, this guy's gonna murder this song.' ... And of course, he would. He's Ken. Who would understand this song better than him?"

Hear a Snippet of 'I'm Just Ken' From the 'Barbie' Soundtrack

The producer said he worked on the song "for about a year after [Gosling] did the vocals. So when I finally sent him the finished version — with Slash on it and everybody — a couple weeks ago, he was just really psyched and satisfied with it, which is what you want to do when you're making a song for someone."

Van Halen also chimed in on Twitter to say he lent his six-string chops to the song. "My buddy Mark Ronson hit me up earlier this year needing my 'mammoth guitar sound' and I happily obliged," he wrote. "If anyone is curious about specifics, I have a lot of textural stuff throughout the film with two major spots where I do some soloing. One in particular is pretty cool because it's the big song that Ryan Gosling sings and Slash plays on it as well!" He also noted "a specific moment in this song that's only in the movie where l've got this fun solo with some tapping and stuff."

Barbie and its accompanying soundtrack both come out on July 21. The album features Dua Lipa, Nicki Minaj, Ice Spice, Lizzo, Charli XCX, Tame Impala and more.

The Best Rock Movie From Every Year

A look at the greatest biopics, documentaries, concert films and movies with awesome soundtracks.

More From WPDH-WPDA