On Tue, Sep 9, 2014 at 5:56 AM, Dominik Vogt <v...@linux.vnet.ibm.com> wrote: > This optional cleanup patch fixes some sloppy programming in the > x86 libgo/go/debug/elf library that had given me a very hard time > to debug and fix when porting the code to s390[x]. See commit > comment for details. > > ChangeLog > 2014-09-05 Dominik Vogt <v...@linux.vnet.ibm.com> > > * libgo/go/debug/elf/file.go (applyRelocationsAMD64): > Fix the calculation of some relocations; do not assume that the symbol > value is always zero.
The code checks that it is using only STT_SECTION symbols. An STT_SECTION symbol in an object file can be reasonably expected to have a value of zero. Since in practice this only applies to debug sections, I doubt it would work at all if the STT_SECTION symbol had a non-zero value and that value were added in. So I'm not convinced that this patch is necessary. I'm sorry that the code gave you a hard time, but as far as I can see it's not sloppy and it's not wrong. Ian