emaste added a comment. I tested this patch against lld head and confirm it resolves the issue via my reproducer. I also backported it to lld 5.0.1 (the version in FreeBSD HEAD) , rebuilt, and confirm that sbrk() is functional. https://reviews.llvm.org/D41037