From: Thorsten Glaser <tg@debian.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Arnd Bergmann <arnd@arndb.de>,
linux-m68k <linux-m68k@vger.kernel.org>,
debian-68k <debian-68k@lists.debian.org>,
James Le Cuirot <chewi@aura-online.co.uk>,
Sam James <sam@gentoo.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: Plan needed for switching m68k to 32-bit alignment
Date: Sat, 26 Oct 2024 01:42:01 +0200 (CEST) [thread overview]
Message-ID: <78d35395-2ef6-e55e-31f8-69cff5e47cdf@debian.org> (raw)
In-Reply-To: <874j4z253e.fsf@igel.home>
On Sat, 26 Oct 2024, Andreas Schwab wrote:
>Already basic things like struct stat64 will break.
OK. Then, flag day, I guess.
How do we model this in Debian. Rename libc to libc6.1 and
conflict with libc6 to force no coïnstallability, rename the
architecture from m68k to… something else, or…?
But then, this does give the kernel side a chance to clean
it up, even to model it like a completely new ILP32 port with
no historical things to account for. And no kernel then needs
to support both at the same time. (Or the new syscall ABI
could use something different than trap #0, if that is even
possible.)
How do we model this on the ELF side? (How do ARM and MIPS
distinguish between their different same-bitness ABIs there?)
Or do we just keep everything and old programs will just fail
on their first syscall? (Another point in favour of not using
the same trap.) Less toolchain changes. This also impacts how
distros can handle this. From what mgorny writes Gentoo also
doesn’t like rebootstrap-everything flag days with no simple
upgradability, but it looks like this can’t be avoided with
justifiable effort… unless the new ABI uses a different trap,
the kernel supports both at the same time, and ELF mechanisms
*and* paths (e.g. Multi-Arch) are used to distinguish them,
so they can coëxist in the same system. (Although different
M-A path would (I think) mean different Debian architecture,
so it’d not be a clean upgrade either; crossgrades do work in
theory these days, but only if the package versions are
exactly identical, so this is very much not going to happen
for m68k.)
So I think we need a rebootstrap with requiring users to
reinstall (and then need no coexistence within the same
running system).
Can we cheat and just not change the dpkg arch, GNU triplet,
ELF headers etc. and just make sure that old syscalls won’t
continue to work? (Or, some could even continue to work.)
The danger of this is that if someone has an old .a lying
around and links to it, they can get misbehaviour *if* it
is affected by the ABI change.
Otherwise, I think we at least need something ELFy that
binutils will refuse to link with older ELFs and go from
there.
Looking at binutils… ARM has special code like:
/* Cannot mix APCS26 and APCS32 code. */
if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
return FALSE;
/* Cannot mix float APCS and non-float APCS code. */
if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT))
return FALSE;
But m68k doesn’t, so old binutils would link against new
objects if we just add something like EF_* there. Again,
the question is how much we can “cheat” for a low-user-
count arch vs. how correct we want to do this. I’m not
sure allocating a new EM_* distinct from EM_68K would be
globally welcomed. (On that note, there’s EM_COLDFIRE, but
Linux/coldfire never took off, did it?) No EI_OSABI use,
either. So, besides new EM_*, I can’t think of a way that
old binutils won’t mix objects (and old kernels won’t try
to execute new binaries), unless making things fail at the
first syscall is an option, but getting one will mean more
delays and more to change.
So many ways…
bye,
//mirabilos
--
„Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.“
-- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: “[…]uhr.gz is a reason to install mksh on every system.”)
next prev parent reply other threads:[~2024-10-25 23:42 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 6:48 Plan needed for switching m68k to 32-bit alignment John Paul Adrian Glaubitz
2024-10-25 9:06 ` Finn Thain
2024-10-25 9:18 ` John Paul Adrian Glaubitz
2024-10-26 7:31 ` Finn Thain
2024-10-26 22:04 ` Thorsten Glaser
2024-10-27 2:49 ` Finn Thain
2024-10-27 3:08 ` Thorsten Glaser
2024-10-27 3:47 ` Finn Thain
2024-10-27 4:23 ` Thorsten Glaser
2024-10-27 6:16 ` Finn Thain
2024-10-27 13:15 ` Arnd Bergmann
2024-10-28 3:07 ` Thorsten Glaser
2024-10-28 4:51 ` Finn Thain
2024-10-28 8:09 ` John Paul Adrian Glaubitz
2024-10-28 8:49 ` Finn Thain
2024-11-13 12:53 ` John Paul Adrian Glaubitz
2024-10-28 8:03 ` John Paul Adrian Glaubitz
2024-10-28 8:44 ` Finn Thain
2024-11-13 12:51 ` John Paul Adrian Glaubitz
2024-10-28 7:58 ` John Paul Adrian Glaubitz
2024-10-28 7:55 ` John Paul Adrian Glaubitz
2024-11-14 16:29 ` Geert Uytterhoeven
2024-11-15 0:24 ` Finn Thain
2024-11-15 1:24 ` Thorsten Glaser
2024-11-15 1:31 ` Thorsten Glaser
2024-10-28 7:53 ` John Paul Adrian Glaubitz
2024-10-28 7:49 ` John Paul Adrian Glaubitz
2024-10-28 7:47 ` John Paul Adrian Glaubitz
2024-10-28 8:40 ` Finn Thain
2024-11-13 12:50 ` John Paul Adrian Glaubitz
2024-11-13 22:01 ` Finn Thain
2024-10-28 7:43 ` John Paul Adrian Glaubitz
2024-10-28 7:40 ` John Paul Adrian Glaubitz
2024-10-28 8:29 ` Finn Thain
2024-11-13 12:47 ` John Paul Adrian Glaubitz
2024-11-13 22:52 ` Finn Thain
2024-10-25 9:55 ` Arnd Bergmann
2024-10-25 10:10 ` John Paul Adrian Glaubitz
2024-10-25 10:50 ` Arnd Bergmann
2024-10-25 15:07 ` Andreas Schwab
2024-10-28 7:24 ` John Paul Adrian Glaubitz
2024-10-25 21:38 ` Thorsten Glaser
2024-10-25 22:24 ` Andreas Schwab
2024-10-25 23:42 ` Thorsten Glaser [this message]
2024-10-27 13:03 ` Greg Ungerer
2024-10-27 12:58 ` Arnd Bergmann
2024-10-28 3:19 ` Thorsten Glaser
2024-10-28 3:54 ` Greg Ungerer
2024-10-28 7:57 ` John Paul Adrian Glaubitz
2024-10-28 7:30 ` John Paul Adrian Glaubitz
2024-10-26 10:46 ` Geert Uytterhoeven
2024-10-28 7:41 ` John Paul Adrian Glaubitz
2024-10-28 7:26 ` John Paul Adrian Glaubitz
2024-11-14 19:46 ` Geert Uytterhoeven
2024-11-14 22:13 ` Thorsten Glaser
2024-11-14 22:37 ` James Le Cuirot
2024-10-28 18:57 ` Michael Schmitz
2024-10-29 3:39 ` Finn Thain
2024-11-13 12:58 ` John Paul Adrian Glaubitz
2024-11-13 23:12 ` Finn Thain
2024-11-13 12:54 ` John Paul Adrian Glaubitz
2024-11-13 18:36 ` Michael Schmitz
2024-11-13 19:55 ` John Paul Adrian Glaubitz
2024-11-13 20:48 ` Stan Johnson
2024-11-13 21:01 ` John Paul Adrian Glaubitz
2024-11-14 18:07 ` Stan Johnson
2024-11-14 19:28 ` Geert Uytterhoeven
2024-11-13 20:49 ` John Paul Adrian Glaubitz
2024-11-13 21:33 ` Thorsten Glaser
2024-11-13 23:34 ` Finn Thain
2024-11-14 19:32 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78d35395-2ef6-e55e-31f8-69cff5e47cdf@debian.org \
--to=tg@debian.org \
--cc=arnd@arndb.de \
--cc=chewi@aura-online.co.uk \
--cc=debian-68k@lists.debian.org \
--cc=geert@linux-m68k.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-m68k@vger.kernel.org \
--cc=sam@gentoo.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).