ld: Avoid overflows in string merging