Special names tha ld needs to recognize for hppa64-hp-hpux11.X
law@redhat.com
law@redhat.com
Mon Feb 11 15:35:00 GMT 2002
"John David Anglin" writes:
> bash-2.05$ gcc -g -static -o main main.c
> bash-2.05$ ./main
> Segmentation fault (core dumped)
>
> The problem is this code in the exitcu.o module:
>
> 8: 2b 60 00 00 addil 0,dp,%r1
> 8: R_PARISC_LTOFF_FPTR21L do_exitcu
> c: 50 3a 00 00 ldd 0(r1),r26
> c: R_PARISC_LTOFF_FPTR14DR do_exitcu
>
> When linked with gnu ld, r26 ends up with actual address of "do_exitcu".
> However, r26 should contain the address of the .opd entry for "do_exitcu".
Hmmm, what is the scope of do_exitcu? global or file-local?
I vaguely recall that the behavior of these are different; specifically
the .dlt entry isn't supposed to point to a .opd entry (since we don't
have .opd entries for static functions).
> I don't fully understand the code in elf64-hppa.c but it seems that
> there is something tricky going on with respect to the values of symbols
> for which there are .opd entries. Does this ring any bells as to
> what's going on?
There is some *major* hair when you take the address of a function,
unfortunately, all the little details aren't fresh in my mind anymore.
You'd have to read the various comments throughout elf64-hppa.c.
jeff
More information about the Binutils
mailing list