DALLAS — Exxon Mobil Corp.’s CEO had a good year in 2011, receiving compensation valued at $25.2 million. Shareholders had a good year too, and on Wednesday gave their approval to the oil giant’s executive pay program.

Investors at Exxon’s annual meeting cast about 78 percent of their shares in favor of the compensation-setting system, ignoring critics who said executive pay was too high.

Shareholders also voted against resolutions that were critical of a natural gas drilling technique that critics call fracking, and of the company’s efforts on reducing greenhouse gas emissions. Similar resolutions have been defeated at previous Exxon meetings.

Chairman and CEO Rex W. Tillerson’s combination of salary, stock awards and other compensation made him the 16th highest paid executive among publicly traded U.S. companies last year.

Rising oil prices helped boost Exxon’s net income by 35 percent to $41 billion in 2011, the company’s best year since 2008. The stock rose 16 percent.

Shareholder consultant ISS Proxy Advisory Services recommended that investors vote against Exxon’s executive compensation, which it called excessive. ISS said Exxon failed to tie CEO pay to specific financial goals, “resulting in higher-than-justified rewards.”

Another shareholder-advisory firm, Glass, Lewis & Co., said Exxon paid top officers more than many other large companies and allowed the board too much discretion in setting compensation. That “has left shareholders in the dark, unable to see a direct link between pay and performance.”

Still, Glass Lewis said Exxon’s pay policies have improved slightly, and it recommended voting for the executive compensation.