Hi David,
Thanks for the report. It's good to hear that recent a GNU ld still
works reasonably well on IRIX 6.5. It's many years since I last had
access to an IRIX box and tried this myself. But there were quite
a few problems that needed to fixed around the 2.16 release, and I was
worried that might be true again now.
"David E. Cross" <crossd@cs.rpi.edu> writes:
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:
I think __rld_obj_head is a bit different. IIUC, it's defined in crt1.o,
so is present in effectively all executable links. (Please correct me
if I'm wrong on that. Like I say, it's been a long time.)
The add_symbol hack for _rld_new_interface is gross. It looks like
it should only trigger for DSO inputs though. If you have a regular
.o that references _rld_new_interface, it should get processed in the
normal way.