[DragonFlyBSD - Submit #2854] Support for place independent executables

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Fri Dec 4 07:10:33 PST 2015

Issue #2854 has been updated by shamaz.

File pie2.patch added

I send a new patch with a bit more explanation in comments.

> can you explain why ET_DYN_LOAD_ADDR existed before

I don't know. It's just a hardcoded virtual address to be used instead of p_vaddr field of the first PT_LOAD program header, if the latter is 0. I think, it could be, say, 0x400000 as well as 0x1021000. The old code was brought there from FreeBSD which does not have ASLR, so hardcoded non-random value can be OK for it.

Submit #2854: Support for place independent executables

* Author: shamaz
* Status: New
* Priority: Normal
* Assignee: 
* Category: Kernel
* Target version: 
Hello. If you launch a PIE, the loader will map it in memory to a fixed
position (ET_DYN_LOAD_ADDR). This patch changes this behaviour and makes
the loader respect vm.randomize_map sysctl.

pie.patch (1.98 KB)
pie2.patch (2.18 KB)

You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

More information about the Submit mailing list