* TSX ends down 3.01 points, or 0.02 percent, at 12,385.70 * Index gained 0.7 percent for the week * RIM plunges as investors fear new fee structure * Six of 10 index sectors stronger; materials, energy rise By Alastair Sharp TORONTO, Dec 21 (Reuters) - Canada's main stock index ended little changed on Friday as gold miners gained on safe-haven buying amid U.S. budget uncertainty, while BlackBerry maker Research In Motion Ltd plunged more than 20 percent. The index's materials sector, which includes miners, rose 0.4 percent. Even though the price of gold was near its lowest level in four months, the gold-mining sub-sector added 0.9 percent as investors fretted over stalled U.S. budget talks that could throw Canada's largest trading partner back into recession. "As our tiptoes are over the (U.S.) fiscal cliff and we're looking over the abyss, the markets are upset obviously, and this is sort of putting a damper on the stocks," said John Ing, president of Maison Placements Canada. "But we've had a mixed reaction in Canada, mainly because the resources have been much better, like gold for example, which is hedging into the uncertainty (around the budget talks)," he said, noting gold miners had been under pressure for the last two weeks. Miner Barrick Gold Corp edged up 0.2 percent to C$33.29. Centerra Gold Inc jumped more than 3 percent to C$9.10. Gold miners are playing catch-up after underperforming throughout the year and could rise further in 2013, said Gavin Graham, president at Graham Investment Strategy. Shares of RIM dropped 22.2 percent to C$10.86 on fears that a new fee structure for its high-margin services segment could put pressure on the business that has set the company apart from its competitors. The Toronto Stock Exchange's S&P/TSX composite index fell 3.01 points, or 0.02 percent, to end at 12,385.70. It gained 0.7 percent for the week. Efforts to avoid the looming U.S. "fiscal cliff" were thrown into disarray on Friday with finger-pointing lawmakers fleeing Washington for Christmas vacations even as the year-end deadline for action edged ever closer. Graham said that until a deal is reached in the U.S. budget talks, investors will avoid economically sensitive Canadian stocks and those most closely tied to the U.S. economy: auto parts manufacturers, forestry companies and resource stocks generally. "The resource sectors in Canada, which is half of the index, is going to be adversely affected, correctly or not," he said. "Chinese demand is likely to pick up somewhat now with the new leadership there but people will be focused on the U.S. given that it is still by far the most important export market for Canada."