.gnu.version_r was implemented by me in D21024.
Implementation takes "Number of needed versions" from DT_VERNEEDNUM
dynamic tag entry. Though it would be simpler to take it from sh_info section header field:
https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-94076/index.html