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-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils