https://sourceware.org/bugzilla/show_bug.cgi?id=31795
--- Comment #21 from mintsuki <mintsuki at protonmail dot com> --- (In reply to H.J. Lu from comment #20) > It turns out that static PIE with non-zero load address must have ET_EXEC: > > https://sourceware.org/bugzilla/show_bug.cgi?id=31799 > > Otherwise, there is no way for loader to tell if the dynamic section entries > contain the relocated values for the load address or not. Since static PIE > with non-zero load address must have ET_EXEC, PIE with non-zero load address > also should have ET_EXEC. > > BTW, gold doesn't support static PIE and static PIE with non-zero load > address > generated by lld crashes with the fix glibc. At least in the context of making a kernel, gold does generate a static-pie, at least as printed out by the file command, and the output of readelf -a looks similar to ld.bfd's -static -pie generation, even without the -static part. I assume this is because no other dynamic libraries are linked in when using -nostdlib and not specifying any dynamic library explicitly. I do not know what the problem with glibc is, but static-pie kernels loaded by Limine with a non-0 load address (or shared objects with a non-0 load address for that matter) work perfectly fine if relocated (at or above whatever specified non-0 load address). -- You are receiving this mail because: You are on the CC list for the bug.