[vlc-devel] [PATCH] Win64: use high-entropy ASLR

Derek Buitenhuis derek.buitenhuis at gmail.com
Mon May 23 11:38:56 CEST 2016


On 5/23/2016 9:16 AM, Jean-Baptiste Kempf wrote:
> ---
>  configure.ac | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 87d7c6b..326af67 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -269,6 +269,7 @@ case "${host_os}" in
>                  HAVE_WIN64="1"
>                  WINDOWS_ARCH="x64"
>                  PROGRAMFILES="PROGRAMFILES64"
> +                LDFLAGS="${LDFLAGS} -Wl,--high-entropy-va"

It may perhaps make sense to set the image base to >4GB, since this
is Win64? e.g.:

    -Wl,--image-base,0x140000000

This is, in fact, what lld does by default, but not binutils (which
has bad defaults all around). IIRC, the rationale is 'even more
entropy when using HEASLR anyway'.

Of course, I don't know if this will affect VLC somehow unexpectedly,
but I can't imagine VLC has any code that would blow up.

- Derek


More information about the vlc-devel mailing list