Many linkers have a feature where it generates symbols at the start/end of a section. This means that if you define a bunch of statics to be located in a particular ELF section, you can get an array of all these statics:

like, is there some wording in LLVM that says "statics may be bigger than their type says", or is that somehow implicitly understood, or what?

we could probably account for all of that by saying that the size of an extern static is at least what the type says.
however, this still leaves the problem (for the begin-end-style) that taking the difference between two statics is pointer subtraction between pointers from different allocations, which is... a gray area.

and the only problem you might get is that of pointer arithmetic out of bounds

(which is avoided by using two raw pointers)

You can probably fix the Rust code to use &raw, but if it is using &T as *const T to produce the pointers, those pointers have a provenance from the [T; 0] allocation, and doing arithmetic out of bounds looks like UB