fix Issue 13779 - gdb can't find frame base when using ld.gold

- missing relocation addend .debug_info reference to .debug_loc

- also did a tiny refactoring and added commented some code