What's commonly done to deal with the exponential output of cheap reflective phototransistor distance sensors?

Are circuits used to improve linearity or do they just deal with it in software?
NOT the fancy parallax ones (image below) or ToF ones, but the ones which entirely depend on reflected light intensity (above).

Thanks again