This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gofrontend-dev] [PATCH 5/9] Gccgo port to s390[x] -- part I
- From: Ian Lance Taylor <iant at golang dot org>
- To: vogt at linux dot vnet dot ibm dot com, gcc-patches <gcc-patches at gcc dot gnu dot org>, "gofrontend-dev at googlegroups dot com" <gofrontend-dev at googlegroups dot com>
- Date: Fri, 3 Oct 2014 18:25:55 -0700
- Subject: Re: [gofrontend-dev] [PATCH 5/9] Gccgo port to s390[x] -- part I
- Authentication-results: sourceware.org; auth=none
- References: <20140909124446 dot GA25290 at linux dot vnet dot ibm dot com> <20140909125610 dot GF25290 at linux dot vnet dot ibm dot com>
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