pc32 -> plt32 conversion and related questions
H.J. Lu
hjl.tools@gmail.com
Thu Jun 17 15:34:25 GMT 2021
On Thu, Jun 17, 2021 at 8:30 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 17.06.2021 17:23, H.J. Lu wrote:
> > On Thu, Jun 17, 2021 at 8:16 AM Jan Beulich <jbeulich@suse.com> wrote:
> >> On 17.06.2021 17:13, H.J. Lu wrote:
> >>> On Tue, Jun 15, 2021 at 6:42 AM Jan Beulich <jbeulich@suse.com> wrote:
> >>>> And then, still in this same context, I did also notice that the
> >>>> linker complains about e.g. PC32 relocs when building a shared
> >>>> library even when that's a x32 one (suggesting to rebuild with
> >>>> -fPIC). 32-bit relocations can't overflow in that ABI, so wouldn't
> >>>> such errors better be suppressed there?
> >>>
> >>> It can overflow in x32 since x32 is totally implemented on software
> >>> and there is no address wraparound.
> >>
> >> But that is to be dealt with by the dynamic linker, isn't it? The
> >> static linker should assume everything fits in the 2Gb window.
> >
> > What can the dynamic linker do? We are talking about shared
> > libraries here. The distance between a shared library and
> > another shared library/executable can be > 2GB.
>
> In x32? That would be a bug in the dynamic loader, wouldn't it?
>
Why? x32 can use the full 4GB address space.
--
H.J.
More information about the Binutils
mailing list