[Top][All Lists]

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

Re: [Gcl-devel] hppa porterbox access

From: Camm Maguire
Subject: Re: [Gcl-devel] hppa porterbox access
Date: Mon, 24 Mar 2014 12:56:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Greetings!  One more gcl linker anomaly on hppa.  ld writes internal
hidden local function symbols, e.g. __moddi3 for modular arithmetic,
into the executable and silently rewrites % to call it, even though it
is not visible to the link unit using ordinary semantics, i.e. __moddi3
is neither a global nor weak symbol.  The st_info field in the elf sym
data structure has binding type STB_LOCAL and symbol type STT_FUNC.
There are of course many many other such local functions which gcl would
like to know that subsequent compiled code could never reference, and
which therefore it will eliminate from its internal symbol table.  So I
need some method of making only these specially inserted hppa symbols
global or equivalent.  A dirty but working hack is 

#define FIX_LOCAL_SYM(st1,sym) {if (ELF_ST_BIND(sym->st_info)==STB_LOCAL && 
ELF_ST_TYPE(sym->st_info)==STT_FUNC && *(st1+sym->st_name)=='_') 

Can you provide any insight here on what is the 'right' thing to do?

Take care,
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]