[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/23854] 16-bit GOT access is incorrectly optimized
From: |
stsp at users dot sourceforge.net |
Subject: |
[Bug gas/23854] 16-bit GOT access is incorrectly optimized |
Date: |
Mon, 05 Nov 2018 22:13:16 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23854
--- Comment #25 from Stas Sergeev <stsp at users dot sourceforge.net> ---
> What your code did is outside of scope of i386 psABI.
Why not linker tells me so with an error msg?(In reply to H.J. Lu from comment
#24)
> (In reply to Stas Sergeev from comment #23)
> > > What your code did is outside of scope of i386 psABI.
> >
> > Why not linker tells me so with an error msg?
>
> There are many corner cases linker doesn't check.
But in this particular case, when it overwrites the
instructions with something else, it _could_ have checked. :(
I don't think other unchecked corner cases give that
level of breakage and difficulty to debug.
> You have things like
>
> extern void foo (void);
>
> short
> foo_p (void)
> {
> return 0x400 - (int) &foo;
> }
>
> In normal i386 case, &foo is 32 bits, especially with PIE. BTW,
> does your code work without -no-pie using ANY linkers?
You mean, any other than ld, or including ld?
In fact, I added -no-pie just very recently:
https://github.com/stsp/dosemu2/commit/d5eb51320477f32df7deb9161fa728e12bcd06dd
to get the high load address.
Before that, it definitely worked with ld, and
most likely also with gold (but I haven't checked
gold for quite some time).
Note that older ubuntu distros (and likely others)
used no-pie by default. ubuntu defaulted to pie
only in 18.04 or so, which started to give me the
low load address again.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, (continued)
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, hjl.tools at gmail dot com, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, stsp at users dot sourceforge.net, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, hjl.tools at gmail dot com, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, cvs-commit at gcc dot gnu.org, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, stsp at users dot sourceforge.net, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, stsp at users dot sourceforge.net, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, hjl.tools at gmail dot com, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, hjl.tools at gmail dot com, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, stsp at users dot sourceforge.net, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, hjl.tools at gmail dot com, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized,
stsp at users dot sourceforge.net <=
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, stsp at users dot sourceforge.net, 2018/11/05
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, address@hidden, 2018/11/06
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, cvs-commit at gcc dot gnu.org, 2018/11/06
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, hjl.tools at gmail dot com, 2018/11/06
- [Bug gas/23854] 16-bit GOT access is incorrectly optimized, cvs-commit at gcc dot gnu.org, 2018/11/26