The Adventure of Link: Counterattack from the Darkness

 is a gamebook published by Futabasha in their "Futabasha Famicom Game Book Series" on July 17, 1987. It is based on, but expands on its story with new material.

Story
Link wakes up from a bad dream in which Ganon has flooded Hyrule with an evil mist, only to find out that it wasn't just a dream. Zelda is kidnapped and Ganon sends Link back in time several hundred years, which he reasons will allow him to kill Link and prevent his own demise. Ganon tauntingly tells Link to find him in the Great Palace.

Upon arriving in the past, Link seeks out the King of Hyrule and convinces him of his story. The king gives Link the Magical Sword and Magical Shield, along with a map, and sends him to visit three other palaces in order to remove the barrier around the Great Palace. He warns Link that Ganon is surely one step ahead and will have monsters waiting for him at the palaces.

Many battles and encounters follow, including a warrior woman in Rauru Town, the swordsman Error in Saria Town who teaches Link the Thunder Spell, and even various friendly monsters (a Goriya, a Moblin, and an Octorok). Along the way he finds the three Sacred Artifacts which allow access to the Great Palace: the Sacred Candle, Sacred Boots, and Sacred Flute.

Upon arriving at the Great Palace, Ganon summons Dark Link. They fight, but Dark Link escapes into the palace and Link pursues him. After overcoming the challenges of the Palace, he defeats Dark Link with the help of the Sacred Flute. He finds Zelda chained up, but she attacks him. Discovering that she has been possessed by Thunderbird, he plays the flute again to release her from its influence and defeats it. Zelda the First is still in her cursed sleep, but Link tells the king of the past that she will awaken in his era. Link and Zelda then return to their own time thanks to the king's retainers.