Hello,

Sergey Bugaev, le jeu. 20 avril 2023 16:08:45 +0300, a ecrit:
> Is that actually configurable somewhere (at gcc/binutils build time, I
> mean)?

It's probably in the link script, somewhere in
/usr/lib/*/ldscripts/elf*x86_64*

> I'm thinking we will want to map the lower 4GB of address space
> inaccessible like dyld does, and not just one page, to catch pointer
> truncation in addition to nullptr dereferences.

That sounds useful indeed.

> But that would need gcc/ld to know to not use low addresses for their
> needs.

It seems that binutils' ld/emulparams/ there are already some per-OS
files: elf_x86_64_cloudabi.sh elf_x86_64_fbsd.sh elf_x86_64_haiku.sh
elf_x86_64_sol2.sh

One can probably create a gnu file that overrides 

TEXT_START_ADDR=0x400000

BTW, which dynamic linker path do we have set for x86_64-gnu?

Samuel

Reply via email to