public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: "BGB" <cr88192@hotmail.com>
To: "Boehm, Hans" <hans.boehm@hp.com>,
		"Andreas Krebbel" <krebbel@linux.vnet.ibm.com>,
		"Andrew Haley" <aph@redhat.com>
Cc: <gcc-patches@gcc.gnu.org>, 	<java@gcc.gnu.org>, 	<gc@linux.hpl.hp.com>
Subject: Re: libgcj missing symbol __data_start
Date: Wed, 26 Aug 2009 18:25:00 -0000	[thread overview]
Message-ID: <BLU0-SMTP52B3F5E4B11845F4E05891E4F70@phx.gbl> (raw)
In-Reply-To: <238A96A773B3934685A7269CC8A8D042577AC94298@GVW0436EXB.americas.hpqcorp.net>


----- Original Message ----- 
From: "Boehm, Hans" <hans.boehm@hp.com>
To: "Andreas Krebbel" <krebbel@linux.vnet.ibm.com>; "Andrew Haley" 
<aph@redhat.com>
Cc: <gcc-patches@gcc.gnu.org>; <java@gcc.gnu.org>; <gc@linux.hpl.hp.com>
Sent: Wednesday, August 26, 2009 10:41 AM
Subject: RE: libgcj missing symbol __data_start


> [Adding the gc mailing list, since this still applies to current gc 
> versions.]

<snip>

<--

Unfortunately, I don't think this is the right solution.  If I understand 
correctly, DATASTART will end up as zero, which will cause the collector to 
start tracing at location zero, which seems unlikely to work, if the value 
is needed.  I suspect the value isn't actually used when dl_iterate_phdr is 
available and the application is dynamically linked, but still ...

Another popular option on other architectures is to define 
SEARCH_FOR_DATA_START instead of defining DATASTART to have a specific 
value.  This creates a weak reference to __data_start.  If that ends up 
being zero, the collector will walk the address space backwards starting at 
__end until an access faults.  It will assume that that's the beginning of 
the main data segment.  That might make debugging a bit harder because of 
the extra SIGSEGV at startup, but I still think it's a much better solution, 
assuming it actually works.  If it doesn't, this at least needs a 
conspicuous FIXME comment, since it's pretty clearly doing the wrong thing. 
In any case, I think this should also go in the upstream source.

Hans

-->


although not directly related, I will note that for my GC on Windows, I 
ended up switching to a strategy of using the ToolHelp library to iterate 
over the loaded modules and find their used address ranges...

it also makes the GC work more reliably as well...

I am not sure if something similar can be done on Linux (I have not looked 
into this).


  reply	other threads:[~2009-08-26 18:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-25 14:21 Andreas Krebbel
2009-08-25 16:43 ` Andrew Haley
2009-08-26 16:32   ` Andreas Krebbel
2009-08-26 17:42     ` Boehm, Hans
2009-08-26 18:25       ` BGB [this message]
2009-09-01 15:33 ` Andrew Haley
2009-09-02 12:00   ` Andreas Krebbel
2009-09-16 10:32   ` Andrew Haley

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=BLU0-SMTP52B3F5E4B11845F4E05891E4F70@phx.gbl \
    --to=cr88192@hotmail.com \
    --cc=aph@redhat.com \
    --cc=gc@linux.hpl.hp.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hans.boehm@hp.com \
    --cc=java@gcc.gnu.org \
    --cc=krebbel@linux.vnet.ibm.com \
    /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).