Deutsch   English   Français   Italiano  
<v3v8if$246mj$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: BGB <cr88192@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: C23 thoughts and opinions
Date: Fri, 7 Jun 2024 10:20:39 -0500
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <v3v8if$246mj$1@dont-email.me>
References: <v2l828$18v7f$1@dont-email.me> <v39v87$1n7bk$1@dont-email.me>
 <20240530170836.00005fa0@yahoo.com> <v3a3k5$1ntrn$1@dont-email.me>
 <20240530180345.00003d9f@yahoo.com> <v3chc4$27uij$1@dont-email.me>
 <20240531161937.000063af@yahoo.com> <20240531162811.00006719@yahoo.com>
 <20240531164835.00007128@yahoo.com> <v3cldt$28n91$2@dont-email.me>
 <20240531173437.00003bee@yahoo.com> <v3d3ct$2b5sl$1@dont-email.me>
 <v3d97c$2c6ea$1@dont-email.me> <22r6O.5934$xPJ1.2590@fx09.iad>
 <v3t6nu$1liet$1@dont-email.me> <n%p8O.18236$4yw6.2551@fx41.iad>
 <v3u773$1utgj$1@dont-email.me> <v3uifb$20mfv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 07 Jun 2024 17:21:51 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="bcd181c8a8249ff7c60382eea8a36cf2";
	logging-data="2235091"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+4LygUttTJ4wP6pcd9wGjRUu2DUA8FAIo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:8wYVgH2+hC6yUp7cZJCohKHFzP8=
Content-Language: en-US
In-Reply-To: <v3uifb$20mfv$1@dont-email.me>
Bytes: 2847

On 6/7/2024 4:04 AM, Lawrence D'Oliveiro wrote:
> On Fri, 7 Jun 2024 00:51:22 -0500, BGB wrote:
> 
>> Generally, using ELF32 on 64-bit targets isn't a thing...
> 
> It might have been, if Intel’s promotion of an “X32” ABI (keeping
> addresses at 32 bits, but using the extra instructions for the increased
> register set) for AMD64 had taken off. Even the Linux kernel supported it,
> at one point. But nobody seemed to care.

Not like X32, but like:
Use 32-bit members in the ELF files, but 64-bit relocs and addresses for 
the program itself.


Arguably, if you don't need the program image itself to be larger than 
4GB, you don't need 64-bit addresses to things within the ELF metadata.

Or, basically, they could have gone the route that PE/COFF had went, and 
had more compact metadata.

We have 24 byte symbols and relocs, because:
   8b: Address of Symbol/Reloc
   8b: Type + Symbol Index
   8b: Addend or String-Table Address


In PE/COFF, they typically use "RVA's" (relative virtual address), which 
are always 32-bits even if the program itself is 64-bit. Would be an 
issue if one wanted a PE/COFF image where the combined section sizes 
exceeded 4GB, but this isn't really a thing at present...


But, alas...