From: "Arsen Arsenović" <arsen@gentoo.org>
To: Bruno Haible <bruno@clisp.org>
Cc: Paul Eggert <eggert@cs.ucla.edu>,
"Andreas K. Huettel" <dilfridge@gentoo.org>,
Wookey <wookey@wookware.org>, Khem Raj <raj.khem@gmail.com>,
libc-alpha@sourceware.org, binutils@sourceware.org,
gcc@gcc.gnu.org, config-patches@gnu.org,
distributions@lists.linux.dev, devel@lists.fedoraproject.org,
glaubitz@debian.org, maskray@google.com,
dickey@invisible-island.net, toolchain@gentoo.org
Subject: Re: Proposed CHOST change for the 64bit time_t transition
Date: Sat, 07 Sep 2024 13:52:49 +0200 [thread overview]
Message-ID: <8634mbhe9a.fsf@gentoo.org> (raw)
In-Reply-To: <2203672.bO1fEbeGnv@nimes> (Bruno Haible's message of "Sat, 07 Sep 2024 02:24:06 +0200")
[-- Attachment #1: Type: text/plain, Size: 1902 bytes --]
Bruno Haible <bruno@clisp.org> writes:
> Arsen Arsenović wrote:
>> An alternative that I pondered was to teach the linker about some notion
>> of "compatibility strings" that it would compare and reject if
>> different, plus teaching the compiler how to emit those, plus teaching
>> glibc to tell the compiler to emit those.. We could have key-value
>> pairs in some section. For each key K, we could have the linker check
>> that, for each (shared or otherwise) object either does not contain K or
>> contains K with the same value as all the other ones, and produce an
>> error otherwise. On the resulting object, the KV pairs would be the
>> union of all KV pairs of all constituent objects.
>
> This sounds much like the arm eabi attributes: If a .s file does not
> start with
> .eabi_attribute 20, 1
> .eabi_attribute 21, 1
> .eabi_attribute 23, 3
> .eabi_attribute 24, 1
> .eabi_attribute 25, 1
> .eabi_attribute 26, 2
> .eabi_attribute 30, 2
> .eabi_attribute 34, 0
> .eabi_attribute 18, 4
> the resulting .o file cannot be linked with other .o files on the system.
>
> Is it a hassle even for packages that don't use time_t of off_t (such as
> GNU libffcall or libffi).
>
> Yes, it would be useful to have a way to have the linker warn if a binary
> that depends on 32-bit time_t and a binary that depends on 64-bit time_t
> get linked together. But PLEASE implement this in a way that is a no-op
> when time_t is not used by either of the two binaries.
I mentioned that a missing pair should not preclude linking. This is
because what I imagined is somehow attaching this tag to the typedef for
time_t, or such, so if the typedef is not used, no such tag is emitted.
I'm not sure how feasible that is, I, of course, don't have a full
implementation.
--
Arsen Arsenović
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]
next prev parent reply other threads:[~2024-09-07 11:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 15:48 Proposed CHOST change for the 64bit time_t transition Andreas K. Huettel
2024-09-05 0:32 ` Oskari Pirhonen
2024-09-05 2:06 ` Wookey
2024-09-05 3:10 ` Khem Raj
2024-09-05 13:50 ` Andreas K. Huettel
2024-09-05 15:39 ` Paul Eggert
2024-09-05 16:33 ` Todd Vierling
2024-09-05 16:59 ` Andreas K. Huettel
2024-09-05 17:03 ` Andreas K. Huettel
2024-09-05 18:20 ` Paul Eggert
2024-09-05 21:54 ` Andreas K. Huettel
2024-09-06 16:06 ` Arsen Arsenović
2024-09-07 0:24 ` Bruno Haible
2024-09-07 11:52 ` Arsen Arsenović [this message]
2024-09-07 0:16 ` Bruno Haible
2024-09-08 14:08 ` Arsen Arsenović
2024-09-08 23:42 ` Jacob Bachmeyer
2024-09-09 23:08 ` Arsen Arsenović
2024-09-10 10:16 ` Andreas K. Huettel
2024-09-10 14:11 ` Todd Vierling
2024-09-10 16:23 ` Florian Weimer
2024-09-05 16:39 ` Khem Raj
2024-09-05 13:49 ` Andreas K. Huettel
2024-09-07 12:32 ` Michał Górny
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=8634mbhe9a.fsf@gentoo.org \
--to=arsen@gentoo.org \
--cc=binutils@sourceware.org \
--cc=bruno@clisp.org \
--cc=config-patches@gnu.org \
--cc=devel@lists.fedoraproject.org \
--cc=dickey@invisible-island.net \
--cc=dilfridge@gentoo.org \
--cc=distributions@lists.linux.dev \
--cc=eggert@cs.ucla.edu \
--cc=gcc@gcc.gnu.org \
--cc=glaubitz@debian.org \
--cc=libc-alpha@sourceware.org \
--cc=maskray@google.com \
--cc=raj.khem@gmail.com \
--cc=toolchain@gentoo.org \
--cc=wookey@wookware.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