From 76c8fd674435a652c75a96c85abbf26f1f221876 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 30 Jan 2019 01:06:12 -0500 Subject: Batch merge --- rts/RtsFlags.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'rts/RtsFlags.c') diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index ff9635ab24..37eafa5c55 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -236,6 +236,7 @@ void initRtsFlagsDefaults(void) RtsFlags.MiscFlags.generate_dump_file = false; RtsFlags.MiscFlags.machineReadable = false; RtsFlags.MiscFlags.internalCounters = false; + RtsFlags.MiscFlags.linkerAlwaysPic = DEFAULT_LINKER_ALWAYS_PIC; RtsFlags.MiscFlags.linkerMemBase = 0; #if defined(THREADED_RTS) @@ -457,6 +458,11 @@ usage_text[] = { " -e Maximum number of outstanding local sparks (default: 4096)", #endif #if defined(x86_64_HOST_ARCH) +#if !DEFAULT_LINKER_ALWAYS_PIC +" -xp Assume that all object files were compiled with -fPIC", +" -fexternal-dynamic-refs and load them anywhere in the address", +" space", +#endif " -xm Base address to mmap memory in the GHCi linker", " (hex; must be <80000000)", #endif @@ -1502,6 +1508,11 @@ error = true; break; #if defined(x86_64_HOST_ARCH) + case 'p': /* linkerAlwaysPic */ + OPTION_UNSAFE; + RtsFlags.MiscFlags.linkerAlwaysPic = true; + break; + case 'm': /* linkerMemBase */ OPTION_UNSAFE; if (rts_argv[arg][3] != '\0') { -- cgit v1.2.1