Symantec Corp. is learning the hard way that rapid turnover in the executive ranks can be expensive.

The world’s largest developer of security software has churned through four chief executive officers in the past five years as it adapts to an industry that’s vastly different from the antivirus-software business it helped pioneer.

As a result, Symantec has spent at least $127 million on exit packages for departing senior managers and replacement awards for new ones --- about equal to the combined reported pay given to the CEOs of rivals Palo Alto Networks Inc. and FireEye Inc. over that span, data compiled by Bloomberg show.

Symantec shareholders still managed to thrive throughout the management upheaval, starting with the ouster of CEO Enrique Salem in July 2012.

The stock has since returned 223 percent, including reinvested dividends, compared with the 137 percent advance for the 68-company S&P 500 Information Technology Index.

Last year, the firm cut 10 percent of its workforce, sold its data-storage business and bought security firm Blue Coat Systems for $4.65 billion.

Blue Coat CEO Greg Clark, Chief Financial Officer Nicholas Noviello and Chief Operating Officer Michael Fey kept their roles at the combined company.

Symantec replaced equity awards worth at least $62.9 million that the three executives were granted before the deal was completed, according to a July 25 regulatory filing.

Most of the awards are tied to performance measures, such as adjusted operating income, and the number of shares to be paid out can increase if targets are exceeded.

“Symantec’s executive compensation model is performance-based and aligns with shareholder interests by ensuring our management team is focused on delivering outstanding performance and generating shareholder value,” the Mountain View, California-based firm said in an emailed statement. “The company has designed the elements of its executive compensation to ensure that the appropriate incentives were in place to drive strong performance through this period of significant change.”

Robbins, Chaffin

After they were ousted in 2012 for poor company performance, Salem and two other senior managers, Executive Vice President William Robbins and Group President Janice Chaffin, collected a combined $14.4 million in exit payments.

Salem’s successor, Stephen Bennett, was fired after less than two years as the market for personal computers slumped, sales fell and several other executives left the company.

Bennett got a $24.3 million exit package.

In 2014, Michael Brown took charge and oversaw the sale of Symantec’s Veritas data-storage unit, a transaction his predecessors deemed too complex to carry out.

Brown, who was replaced by Blue Coat’s Clark last August, and Thomas Seifert, who left his job as CFO in November, collected golden parachutes worth $17 million and $8.16 million, respectively.