[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: hppa unexec and static variable initialization

From: Camm Maguire
Subject: [Gcl-devel] Re: hppa unexec and static variable initialization
Date: Wed, 14 Apr 2010 12:22:21 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Greetings, and thank you for your reply!

I traced this down to the old "static function pointer" issue on ia64
and hppa.  There was an instance of a pointer I had neglected to
protect.  Basically, as gcl images are output via unexec, like emacs,
pointer initializations have to remain vaild across multiple
executions.  There is some convention on these two platforms which
stores globally accessible function symbols and entry addresses in a
dynamic area of the executable, i.e. one which moves around from run
to run.  ld.so doesn't know how to relocate my function pointers, so I
have to define static function wrappers and point the pointers there.

Take care,

"Carlos O'Donell" <address@hidden> writes:

> On Mon, Apr 12, 2010 at 2:39 PM, Camm Maguire <address@hidden> wrote:
>> Greetings!
>> In some code reading
>> void* (*gcl_gmp_allocfun)(size_t) = alloc_relblock;
>> void *
>> alloc_relblock(size_t n) {
>> ...
>> }
>> Why is the static initialization failing?
> Could you please provide a full test case e.g. code, commands used in
> link, and versions of the tools?
> Cheers,
> Carlos.

Camm Maguire                                        address@hidden
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]