Due to a problem in the Quartus® Prime Pro Edition Software version 23.3 and later, using the command elf2hex in the Nios® V console to request address span greater than 1 GB is not supported. It results in an error stating Exception in thread "main" java.lang.NegativeArraySizeException.
Nios® V Software Developer Handbook will be updated to include that 1GB is the maximum address span that elf2hex can support.
A warning is scheduled to be added in a future release of the Quartus® Prime Pro Edition Software.