[Bug target/94391] gcc refers to absolute symbols with R_X86_64_PC32 relocation

yshuiv7 at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Mar 29 23:34:01 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391

Yuxuan Shui <yshuiv7 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #2 from Yuxuan Shui <yshuiv7 at gmail dot com> ---
If you read the reply, you will find out that is not the same bug as this:


> This is an over reduction. The real problem is that we are not tracking
> absoluteness correctly. In the original case vvar_vsyscall_gtod_data
> should not be absolute

> > --- ELF/Relocations.cpp
> > +++ ELF/Relocations.cpp
> > @@ -356,6 +356,10 @@
> >        return true;
> >      if (&Body == ElfSym<ELFT>::MipsGpDisp)
> >        return true;
> > +    // Sometimes code has relocations to absolute symbol defined in linker script.
> > +    // Example is linux kernel. Hence we allow it.
> > +    if (!Body.File)
> > +      return true;

> We should not do this. It would accept broken cases too.


More information about the Gcc-bugs mailing list