Commit 47ec6e23 authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/ld: only pass -rdynamic to host linker on ELF target

Fixes #5150.

R=golang-dev, franciscossouza
CC=golang-dev
https://golang.org/cl/8120043
parent 1b0d04b8
......@@ -31,6 +31,7 @@
#include "l.h"
#include "lib.h"
#include "../ld/elf.h"
#include "../../pkg/runtime/stack.h"
#include <ar.h>
......@@ -640,8 +641,8 @@ hostlink(void)
argv[argc++] = smprint("-Wl,-rpath,%s", rpath);
// Force global symbols to be exported for dlopen, etc.
// NOTE: May not work on OS X or Windows. We'll see.
argv[argc++] = "-rdynamic";
if(iself)
argv[argc++] = "-rdynamic";
// already wrote main object file
// copy host objects to temporary directory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment