When the linker doesn't have this feature, add -mno-relax to CFLAGS
on RISC-V.
Define the feature for ld.bfd, but not lld. When lld gains relaxation
support in a newer version, we can enable it for those versions of lld
in bsd.linker.mk.
Differential D22659
Add a new "riscv-relaxations" linker feature. jhb on Dec 3 2019, 10:30 PM. Authored by Tags None Referenced Files
Details
When the linker doesn't have this feature, add -mno-relax to CFLAGS Define the feature for ld.bfd, but not lld. When lld gains relaxation
Diff Detail
Event Timeline
Comment Actions There isn't really a precedent for arch-specific linker features, but I don't think it's an issue. Do you know how long it might be before we see support for relaxations in lld? If it's not long, could we not just check for lld directly instead of using a linker feature? Comment Actions I don't know of anyone actively working on it, so it could well be a while, but equally someone could turn up tomorrow out of nowhere with a patch. I also don't know how amenable LLD is to linker relaxation, as the data structures may not like the idea that input sections can change in size (and instructions can move within them, with their associated relocations, as a result). But I suspect it's unlikely to be happening within a year. |