public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dominik Vogt <vogt@linux.vnet.ibm.com>
To: Ian Lance Taylor <iant@golang.org>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	       "gofrontend-dev@googlegroups.com"
	<gofrontend-dev@googlegroups.com>
Subject: Re: [gofrontend-dev] [PATCH 5/9] Gccgo port to s390[x] -- part I
Date: Tue, 07 Oct 2014 10:45:00 -0000	[thread overview]
Message-ID: <20141007104517.GA2739@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAKOQZ8whD8k-uhMD3q8i+-5bfC_S2RMP98CrUTtD+sVEHACznQ@mail.gmail.com>

On Mon, Oct 06, 2014 at 07:29:33AM -0700, Ian Lance Taylor wrote:
> On Mon, Oct 6, 2014 at 12:42 AM, Dominik Vogt <vogt@linux.vnet.ibm.com> wrote:
> > On s390[x] the symbol value of a section symbol is definitely not
> > zero.
> 
> Is true even in an object file?

No.

> I agree that in an executable a
> section symbol will have a non-zero value, but that case doesn't arise
> since an executable won't have (non-dynamic) relocations.  But I'm
> quite surprised that hear that the section symbol would be non-zero in
> an object file.

I spent a day looking at that issue again, and while it's true
that section symbols don't necessarily have a zero value, that is
not the problem here.  The problem is about how cgo determines the
names of functions(?) from an object file.  On s390 we need to do
an indirect lookup of (non-section-)symbols to find the names, and
the symbol value is not zero.

The only points in that patch are that on one hand - as far as I
know - the Abi does not guarantee that section symbols are either
zero or not relocated, even if that may be the case in reality.
And on the other hand, if that code is ever modified to handle
non-section symbols, it's not obvious that you not only need to
remove the test for the symbol type but also modify the
calculations below.  So, apply the patch or drop it as you like,
but in any case, at least a comment in the code would improve
maintainability.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany

  reply	other threads:[~2014-10-07 10:45 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09 12:44 [PATCH 0/9] " Dominik Vogt
2014-09-09 12:48 ` [PATCH 1/9] " Dominik Vogt
2014-09-09 12:49 ` [PATCH 2/9] " Dominik Vogt
2014-10-09 18:56   ` [gofrontend-dev] " Ian Lance Taylor
2014-09-09 12:51 ` [PATCH 3/9] " Dominik Vogt
2014-10-03 18:28   ` [gofrontend-dev] " Ian Lance Taylor
2014-09-09 12:53 ` [PATCH 4/9] " Dominik Vogt
2014-10-04  1:19   ` [gofrontend-dev] " Ian Lance Taylor
2014-10-06  6:52     ` Dominik Vogt
2014-09-09 12:56 ` [PATCH 5/9] " Dominik Vogt
2014-10-04  1:26   ` [gofrontend-dev] " Ian Lance Taylor
2014-10-06  7:42     ` Dominik Vogt
2014-10-06 14:29       ` Ian Lance Taylor
2014-10-07 10:45         ` Dominik Vogt [this message]
2014-10-09 20:07           ` Ian Lance Taylor
2014-09-09 12:58 ` [PATCH 6/9] " Dominik Vogt
2014-10-16 22:59   ` [gofrontend-dev] " Ian Lance Taylor
2014-09-09 13:02 ` [PATCH 7/9] " Dominik Vogt
2014-10-16 23:46   ` [gofrontend-dev] " Ian Lance Taylor
2014-10-28 14:40     ` Dominik Vogt
2014-10-28 17:37       ` Ian Taylor
2014-10-29  9:05         ` Dominik Vogt
2014-10-29 16:43   ` Andreas Schwab
2014-10-29 16:43     ` [gofrontend-dev] " Ian Taylor
2014-10-29 17:05       ` Andreas Schwab
2014-10-29 17:50         ` Ian Taylor
2014-10-30  7:50           ` Dominik Vogt
2014-10-30 15:05             ` Ian Taylor
2014-10-31  9:30               ` Dominik Vogt
2014-10-31 16:50                 ` Ian Taylor
2014-10-30 21:57             ` Joseph S. Myers
2014-09-09 13:04 ` [PATCH 8/9] " Dominik Vogt
2014-10-17  0:03   ` [gofrontend-dev] " Ian Lance Taylor
2014-10-29  9:13     ` Dominik Vogt
2014-10-29 15:22       ` Ian Taylor
2014-09-09 13:06 ` [PATCH 9/9] " Dominik Vogt
2014-10-17  0:07   ` [gofrontend-dev] " Ian Lance Taylor
2014-10-17  0:45 ` [gofrontend-dev] [PATCH 0/9] " Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141007104517.GA2739@linux.vnet.ibm.com \
    --to=vogt@linux.vnet.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gofrontend-dev@googlegroups.com \
    --cc=iant@golang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).