aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-02-28 01:01:46 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-02-28 01:01:46 +0000
commitb0cf10e423144652be05382cc89670bd366cb65b (patch)
tree7045b7e6073bc50d5d84ac5a57decfa3061cfa8f /libgo
parentd0cdfae5ed74f7c79fd702b1d8b484f97dce041d (diff)
downloadgcc-b0cf10e423144652be05382cc89670bd366cb65b.zip
gcc-b0cf10e423144652be05382cc89670bd366cb65b.tar.gz
gcc-b0cf10e423144652be05382cc89670bd366cb65b.tar.bz2
libgo: fix go_export extraction on Darwin
On Darwin, the section name is prefixed with the segment name, __GNU_GO. Reviewed-on: https://go-review.googlesource.com/c/151097 From-SVN: r269271
Diffstat (limited to 'libgo')
-rw-r--r--libgo/Makefile.am8
-rw-r--r--libgo/Makefile.in4
2 files changed, 10 insertions, 2 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index aeaa203..1201cf5 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -13,6 +13,12 @@ if LIBGO_IS_RTEMS
subdirs = testsuite
endif
+if LIBGO_IS_DARWIN
+GO_EXPORT_SECTION_NAME = __GNU_GO.__go_export
+else
+GO_EXPORT_SECTION_NAME = .go_export
+endif
+
SUBDIRS = ${subdirs}
gcc_version := $(shell $(GOC) -dumpversion)
@@ -818,7 +824,7 @@ BUILDGOX = \
if test ! -f $$f; then \
f="$(basename $(<D)/.libs/$(<F)).o"; \
fi; \
- $(OBJCOPY) -j .go_export $$f $@.tmp; \
+ $(OBJCOPY) -j $(GO_EXPORT_SECTION_NAME) $$f $@.tmp; \
$(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'`
GOTESTFLAGS =
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 7f39891..346683b 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -529,6 +529,8 @@ top_srcdir = @top_srcdir@
# Go support.
SUFFIXES = .c .go .gox .o .obj .lo .a
@LIBGO_IS_RTEMS_TRUE@subdirs = testsuite
+@LIBGO_IS_DARWIN_FALSE@GO_EXPORT_SECTION_NAME = .go_export
+@LIBGO_IS_DARWIN_TRUE@GO_EXPORT_SECTION_NAME = __GNU_GO.__go_export
SUBDIRS = ${subdirs}
gcc_version := $(shell $(GOC) -dumpversion)
MAINT_CHARSET = latin1
@@ -1001,7 +1003,7 @@ BUILDGOX = \
if test ! -f $$f; then \
f="$(basename $(<D)/.libs/$(<F)).o"; \
fi; \
- $(OBJCOPY) -j .go_export $$f $@.tmp; \
+ $(OBJCOPY) -j $(GO_EXPORT_SECTION_NAME) $$f $@.tmp; \
$(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'`
GOTESTFLAGS =