AARCH64 text start address: why so low?

Andrew Pinski pinskia@gmail.com
Tue Jan 21 03:50:00 GMT 2014


On Mon, Jan 20, 2014 at 7:46 PM, Matt Thomas <matt@3am-software.com> wrote:
>
> As I was looking at the aarch64 text start address for Linux, I
> wondered why it defaulted to 4MB (well within the first 4GB) instead
> of (like alpha, mips64 elf, sparc64, hppa64, etc.) defaulting to a
> starting address at or above 4GB.

Because that is the default one for all elf files.   x86_64 is the
same as aarch64 here.

>
> Given there is a minimum of 39 address bits (512GB) of address space,
> skipping first 4 GB shouldn't be a problem.

I think it matters due to how the different code models work.  The
default code model is small which means fit in the lower 4 GB.  This
is just like x86_64's code models.

Thanks,
Andrew Pinski

>
> The reason for putting the text start above 4GB is to easily find
> address truncation errors (loading a 32-bit pointer will quickly
> cause a SEGV).



More information about the Binutils mailing list