Re: 32-bit ABI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 24 Apr 2004, Stanislaw Skowronek wrote:

> why do we attempt to compile the kernel with 32-bit GAS abi and 64-bit GCC
> abi? Is it because the module loader is broken and supports only 32-bit
> ELFs? Then what about machines which load their kernels at weird 64-bit
> addresses, like 0xa800000020004000 (Octane)?

1. Backward compatibility.  Old versions of gas/ld were buggy or
non-functional (depending on the version used) when using the (n)64 ABI.  
Search the mailing list archives -- I'm pretty sure anything since
2.13.2.1 should be safe, though.

2. Using the o32 ABI makes the binary smaller due to 32-bit pointers.  If
used without care, it can lead to pointer crops, though.  Anyway, some
people say it's important for them, despite the associated hassle.

> I have changed it to 64-bit abi in my Octane kernel, because it won't even
> compile otherwise. I've got gcc 3.3.2, gas 2.14.

 I know.  I build using (n)64 consistently for two years successfully --
it's OK even with gcc 2.95.x.  Making a choice between the ABIs for gas
user-selectable is on my to-do list for some time.  For now I think `make
gas-abi=64 ...' is probably the easiest workaround, though you'll need to
objcopy the resulting image to a 32-bit ELF file manually if your firmware
or loader cannot cope with 64-bit ELF binaries.  Well, I don't like the
automatic copy anyway -- it wastes too much disk space in the long run;
perhaps as a compromise it should be user-selectable, too (ditto about
SREC).

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@xxxxxxxxxxxxx, PGP key available        +


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux