Commit ccaaf1f1 authored by Dave Cheney's avatar Dave Cheney

misc/cgo/testcshared, misc/cgo/testshared: fix clang warnings and errors

Fix several warnings generated on the linux-amd64-clang builder
and make it clear to clang that -znow is a linker only flag.

Tested with

    env CC=clang-3.5 ./all.bash
    env CC=gcc-4.8 ./all.bash

Change-Id: I5ca7366ba8bf6221a36d25a2157dda4b4f3e16fa
Reviewed-on: https://go-review.googlesource.com/9523Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 42bb59a3
......@@ -5,6 +5,10 @@
#include <stdint.h>
#include <stdio.h>
extern int8_t DidInitRun(void);
extern int8_t DidMainRun(void);
extern int32_t FromPkg(void);
// Tests libgo.so to export the following functions.
// int8_t DidInitRun();
// int8_t DidMainRun();
......
......@@ -946,7 +946,7 @@ func hostlink() {
// We force all symbol resolution to be done at program startup
// because lazy PLT resolution can use large amounts of stack at
// times we cannot allow it to do so.
argv = append(argv, "-znow")
argv = append(argv, "-Wl,-znow")
}
argv = append(argv, "-o")
......
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