[PATCH] D25560: [ELF] Emit relocation for GOT entry even if it is an absolute symbol

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 14:02:19 PDT 2016


Interesting, but what would you say on this:
https://lists.gnu.org/archive/html/bug-binutils/2006-06/msg00110.html

четверг, 27 октября 2016 г. пользователь Rafael Espíndola написал:

> On 27 October 2016 at 10:44, Eugene Leviant <evgeny.leviant at gmail.com>
> wrote:
> > The problem is that such kind of bugs very quickly become "features" :)
> > Here is the real use case:
> >
> > 1) There is an undefined 'MySym' symbol in a shared library, which has
> GOT entry
> > 2) You link this shared library using this script:
> >
> > SECTIONS {
> >    /* .... */
> >    PROVIDE_HIDDEN(MySym = .);
> >    /* ... */
> > }
> >
> > After library is loaded MySym will have incorrect value, because it is
> > actually an absolute symbol.
>
> I guess the error in here is that MySym should not actually be
> absolute, which I guess is also the underlying problem in pr30406.
>
> > I think every GOT entry should be relocated, shouldn't it?
>
> Not if it should contain an absolute value.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161028/96e52472/attachment.html>


More information about the llvm-commits mailing list