This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gofrontend-dev] [PATCH 5/9] Gccgo port to s390[x] -- part I


On Tue, Sep 9, 2014 at 5:56 AM, Dominik Vogt <vogt@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  <vogt@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]