When compiling for the RWPI relocation model [1], the debug information is wrong for readonly global variables.
Writable global variables are accessed by the static base register (R9 on ARM) in the RWPI relocation model. This is being correctly generated
Readonly global variables are not accessed by the static base register in the RWPI relocation model. This case is incorrectly generating the same debugging information as for writable global variables.
References:
[1] ARM Read-Write Position Independence: https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#read-write-position-independence-rwpi
I think these version specific content are not needed, and could break after the next version is branched?