https://sourceware.org/bugzilla/show_bug.cgi?id=22791
--- Comment #9 from Rafael Ávila de Espíndola <rafael.espindola at gmail dot
com> ---
(In reply to Cary Coutant from comment #8)
> (In reply to Rafael Ávila de Espíndola from comment #5)
> > (In reply to Cary Coutant from comment #4)
> > > This would be fine if we knew for a fact that the relocation is on a call
> > > instruction. The problem is that R_X86_64_PC32 isn't always a call
> > > instruction.
> >
> > It still works. The library will see the address of the got entry.
>
> Which won't necessarily be the "official" PLT entry. Function point
> comparison may break.
Not sure what you mean by "official". The testcase I uploaded computes address
of an external function foo with
movslq bar(%rip), %rax
leaq bar(%rip), %rdi
addq %rax, %rdi
...
.data
.p2align 3
bar:
.long foo - .
and in a shared library foo is defined as
void foo(void *bar) {
printf("%p %p\n", bar, foo);
}
I always get the same value printed twice.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils