This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Wed, Oct 19, 2016 at 3:38 PM, Eric Botcazou <ebotcazou@adacore.com> wrote: > > linking any Go program on SPARC/Solaris with the GNU assembler and the Sun > linker yields a warning: > > ld: warning: relocation error: R_SPARC_UA32: file > /sydney.a/users/botcazou/gcc-head/sparc-sun- > solaris2.10/./libgo/libgobegin.a(libgobegin_a-go-main.o): symbol > runtime_startup_random_data: external symbolic relocation against non- > allocatable section .debug_info; cannot be processed at runtime: relocation > ignored > > It's because (almost) every C file in runtime/ includes runtime.h, which has > these lines: > > byte* runtime_startup_random_data; > uint32 runtime_startup_random_data_len; > void runtime_get_random_data(byte**, int32*); > > which cause (almost) every object file to have the first 2 as common symbols > and this runs afoul of some limitation of the Sun linker. Now there seem to > be no other references to these 3 objects in the libgo directory and removing > them doesn't seem to change the behavior of the Go compiler so the attached > patch does just that. > > Tested on x86_64-suse-linux and SPARC/Solaris, OK for mainline? > > > 2016-10-19 Eric Botcazou <ebotcazou@adacore.com> > > * runtime/runtime.h (runtime_startup_random_data): Delete. > (runtime_startup_random_data_len): Likewise. > (runtime_get_random_data): Likewise. Sorry, I missed this. Committed to mainline. Ian
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |