This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
binutils 2.20.1 on irix 6.5.22 _rld_new_interface question
- From: "David E. Cross" <crossd at cs dot rpi dot edu>
- To: binutils at sourceware dot org
- Date: Fri, 5 Nov 2010 13:39:32 -0400 (EDT)
- Subject: binutils 2.20.1 on irix 6.5.22 _rld_new_interface question
Running binutils 2.20.1 on irix 6.5.22 with great success, moreso then
native Irix ld in fact.
However I have come across one bug that I am scratching my head over how
to fix.
Irix has no "dladdr" funtion, instead they tell you to call
_rld_new_interface with certain parameters and it will do the same things.
The problem is that _rld_new_interface is a special symbol that is within
the runtime linker and not in any library.
There is some special handling in bfd/elfxx-mips.c for this already, that
ammounts to basically ignoring the symble. This works fine for the 99% of
applications that don't acually use the symbol (and allows things to link
with libc).. However for programs that DO use it, a undef symbol needs to
be inserted into the symbol table as a placeholder. Like _I THINK_
is done with __rld_obj_head. I have tried duplicating the part of the
code that adds __rld_obj_head without success; (modifiying it to set
BSF_FUNCTION and ST_FUNC).. I am obviously just stabbing in the dark here
and I hope someone could help me out.. I have some symbol tables listed
below:
Symbols from /lib32/libc.so.1:
[Index] Value Size Type Bind Other Shndx Name
[6243] | 0| 0|FUNC |GLOB |DEFAULT |UNDEF |_rld_new_interface
dso_dlfcn (when linked with Irix ld)
[46] | 268438512| 0|FUNC |GLOB |DEFAULT |UNDEF |_rld_new_interface
dso_dlfcn.o (when compiled with Irix cc)
[6] | 0| 0|FUNC |GLOB |DEFAULT |UNDEF |_rld_new_interface
dso_dlfcn.o (when compiled with gcc)
[11] | 0| 0|OBJT |GLOB |DEFAULT |UNDEF |_rld_new_interface
The 'OBJT' type is slightly disturbing, but it matches other functions, so
I won't worry too much there. :)
Ideas, suggestions?
--
David E. Cross