Bug: fix #2422

It turns out that _end is an undocumented global symbol, maybe in the C++
standard library which has a value of 0.

Declaring it as static is enough to avoid the problem.