Aha, I got the problem. I should have added -fuse-ld=gold. The following 
works well. 
go build -o libgotest.so -buildmode=c-shared -compiler=gccgo 
-gccgoflags='-fuse-ld=gold -Wl,--split-stack-adjust-size=0x8000' 
test_mmap.go

Thank you!
On Wednesday, December 23, 2020 at 3:47:50 PM UTC+9 Yonatan Gizachew wrote:

> # command-line-arguments
> /usr/bin/ld: unrecognized option '--split-stack-adjust-size=0x8000'
> /usr/bin/ld: use the --help option for usage information
> collect2: error: ld returned 1 exit status
>
> On Wednesday, December 23, 2020 at 3:38:44 PM UTC+9 Ian Lance Taylor wrote:
>
>> On Tue, Dec 22, 2020 at 10:30 PM Yonatan Gizachew <eme...@gmail.com> 
>> wrote: 
>> > 
>> > I want to pass the '-Wl,--split-stack-adjust-size=0x8000' to the gold 
>> linker as follows: 
>> > 
>> > go build -o libgotest.so -buildmode=c-shared -compiler=gccgo 
>> -gccgoflags='-Wl,--split-stack-adjust-size=0x8000' test_mmap.go 
>> > But there s "unrecognized option" error. Could you please tell me the 
>> correct way of passing these flags? 
>>
>> What you wrote looks about right to me. What is the exact and complete 
>> output? 
>>
>> Ian 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3f9f85fb-eb30-428c-a43a-18d3eef12155n%40googlegroups.com.

Reply via email to