With the current code if the script has a PHDRS we always obey and try to allocate a header. This can cause Min - HeaderSize to underflow.
It looks like bfd actually prints an error for this case. With this patch we do the same.
Found while looking at pr36515
Allocateheaders -> AllocateHeaders ?
Or may be HasExplicitHeaders would be better.