Cane of Somaria

Link to the Past
This cane creates blocks of pure magic. They can be pushed on or thrown at an enemy, or used to hold down trip switches. Once a block has hit an enemy five times, or if the cane is used again while there is a block in the room, the block shatters, and the resulting fragments can damage enemies or activate switches.

In Turtle Rock, the cane comes into its own. When used on a question mark pad, a platform is created, which allows Link to traverse certain tracks in the dungeon.

The cane is the dungeon treasure in the Misery Mire.

Oracle of Ages
The cane has much the same use here, but the blocks do not shatter, they just disappear. They also vanish when struck by the sword. The blocks can also be used to block the progress of enemies, or to determine if there is a pit or a pathway.

It is the dungeon treasure in the Crown Dungeon.