The X-ray emission from broad absorption line quasars