Make LDS independent from linking