Liste des Groupes | Revenir à cl c |
On 6/7/2024 4:04 AM, Lawrence D'Oliveiro wrote:Correction:On Fri, 7 Jun 2024 00:51:22 -0500, BGB wrote:Not like X32, but like:
>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.
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...
Les messages affichés proviennent d'usenet.