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)=='_') 
sym->st_info|=1<<4;}

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

Take care,
-- 
Camm Maguire                                        [email protected]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

_______________________________________________
Gcl-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gcl-devel

Reply via email to