For a RISC target that doesn't allow memory-indirect addressing, the proper way to represent an access of a symbol found in the GOT is to first load the symbol from the GOT into a register, and then use that register for memory access or call as needed. For proper scheduling and instruction selection, the symbol load source should be represented as what it is, i.e. a MEM. So we have a (MEM (unspec ... UNSPEC_GOT)) . For the purposes of debug output, this should be translated back into the symbol_ref it represents. However, loc_descriptor looks only into the address inside a MEM, it does not process the entire mem with targetm.delegitimize_address. I.e. there is no way to get rid of the MEM if it is not nested in another MEM.
patch is here: http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00267.html
Not sure whether this patch is still needed now that var-tracking already delegitimizes MEMs (and their addresses) too. That said, if you have a testcase where this is still needed, the patch looks reasonable, so you might want to ping it.