Schlumberger Ltd. (NYSE: SLB) reported a smaller net loss compared with the year-ago quarter when it took a $2.57 billion charge.

Net loss attributable to the company narrowed to $74 million, or 5 cents per share, in the second quarter ended June 30 from $2.16 billion, or $1.56 per share, a year earlier.

Excluding items, the company earned 35 cents per share. The latest quarter included a charge of $510 million.

Revenue rose 4.2% to $7.46 billion. Schlumberger is benefiting from strong North American shale drilling that has helped offset weak international markets.