__attribute__((used))
With these changes, the userland builds correctly with Clang's ThinLTO enabled.