bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 5/5] add setting gs/fsbase


From: Samuel Thibault
Subject: Re: [PATCH 5/5] add setting gs/fsbase
Date: Thu, 20 Apr 2023 23:01:43 +0200
User-agent: NeoMutt/20170609 (1.8.3)

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

[Prev in Thread] Current Thread [Next in Thread]