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: Dominik Vogt <vogt at linux dot vnet dot ibm dot com>
- To: Ian Lance Taylor <iant at golang dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "gofrontend-dev at googlegroups dot com" <gofrontend-dev at googlegroups dot com>
- Date: Mon, 6 Oct 2014 08:42:30 +0100
- 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> <CAKOQZ8wyFTKUEYkH+zFCvjdKOYFz9zxzpmkJktkgRwgG0gqbxA at mail dot gmail dot com>
- Reply-to: vogt at linux dot vnet dot ibm dot com
On Fri, Oct 03, 2014 at 06:25:55PM -0700, Ian Lance Taylor wrote:
> On Tue, Sep 9, 2014 at 5:56 AM, Dominik Vogt <vogt@linux.vnet.ibm.com> wrote:
> > * 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.
Well, my x86 knowledge is limited, and the patch is neither
required for the s390[x] port nor (at the moment) for x64_64.
On s390[x] the symbol value of a section symbol is definitely not
zero. In the amd64 Abi I cannot see anything that would enforce
that sym.Value is 0 for section symbols, although it seems to be
the case on the tested x86_64 system. In any case, if the patch
is not committed, we should at least add a comment that the symbol
value is omitted from the calculation because it is assumed to be
zero.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany