This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Special names tha ld needs to recognize for hppa64-hp-hpux11.X
- From: law at redhat dot com
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 11 Feb 2002 16:15:36 -0700
- Subject: Re: Special names tha ld needs to recognize for hppa64-hp-hpux11.X
- Reply-to: law at redhat dot com
"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