Ian Lance Taylor <i...@google.com> writes: > Following up on my earlier patch, this patch implements the > reflect.MakeFunc function for 386. > > Tom Tromey pointed out to me that the libffi closure support can > probably be used for this. I was not aware of that support. It > supports a lot more processors, and I should probably start using it. > The approach I am using does have a couple of advantages: it's more > efficient, and it doesn't require any type of writable executable > memory. I can get away with that because indirect calls in Go always > pass a closure value. So even when and if I do change to using libffi, > I might still keep this code for amd64 and 386.
Unfortunately, this patch (and undoubtedly the corresponding amd64 one) break Solaris/x86 libgo bootstrap with native as: Assembler: "/var/tmp//cctly9hk.s", line 8 : Illegal mnemonic Near line: " .cfi_startproc" "/var/tmp//cctly9hk.s", line 8 : Syntax error Near line: " .cfi_startproc" "/var/tmp//cctly9hk.s", line 21 : Illegal mnemonic Near line: " .cfi_def_cfa_offset 8" "/var/tmp//cctly9hk.s", line 21 : Syntax error Near line: " .cfi_def_cfa_offset 8" "/var/tmp//cctly9hk.s", line 22 : Illegal mnemonic Near line: " .cfi_offset %ebp, -8" "/var/tmp//cctly9hk.s", line 22 : Syntax error Near line: " .cfi_offset %ebp, -8" "/var/tmp//cctly9hk.s", line 24 : Illegal mnemonic Near line: " .cfi_def_cfa_register %ebp" "/var/tmp//cctly9hk.s", line 24 : Syntax error Near line: " .cfi_def_cfa_register %ebp" "/var/tmp//cctly9hk.s", line 27 : Illegal mnemonic Near line: " .cfi_offset %ebx, -12" "/var/tmp//cctly9hk.s", line 27 : Syntax error Near line: " .cfi_offset %ebx, -12" "/var/tmp//cctly9hk.s", line 45 : Illegal mnemonic Near line: " .cfi_restore %ebx" "/var/tmp//cctly9hk.s", line 45 : Syntax error Near line: " .cfi_restore %ebx" "/var/tmp//cctly9hk.s", line 47 : Illegal mnemonic Near line: " .cfi_restore %ebp" "/var/tmp//cctly9hk.s", line 47 : Syntax error Near line: " .cfi_restore %ebp" "/var/tmp//cctly9hk.s", line 48 : Illegal mnemonic Near line: " .cfi_def_cfa %esp, 4" "/var/tmp//cctly9hk.s", line 48 : Syntax error Near line: " .cfi_def_cfa %esp, 4" "/var/tmp//cctly9hk.s", line 50 : Illegal mnemonic Near line: " .cfi_endproc" "/var/tmp//cctly9hk.s", line 50 : Syntax error Near line: " .cfi_endproc" "/var/tmp//cctly9hk.s", line 52 : Invalid section attribute "/var/tmp//cctly9hk.s", line 52 : Syntax error Near line: " .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat" "/var/tmp//cctly9hk.s", line 57 : Illegal mnemonic Near line: " .cfi_startproc" "/var/tmp//cctly9hk.s", line 57 : Syntax error Near line: " .cfi_startproc" "/var/tmp//cctly9hk.s", line 60 : Illegal mnemonic Near line: " .cfi_endproc" "/var/tmp//cctly9hk.s", line 60 : Syntax error Near line: " .cfi_endproc" "/var/tmp//cctly9hk.s", line 62 : Syntax error Near line: " .section .note.GNU-stack,"",@progbits" "/var/tmp//cctly9hk.s", line 63 : Syntax error Near line: " .section .note.GNU-split-stack,"",@progbits" "/var/tmp//cctly9hk.s", line 64 : Syntax error Near line: " .section .note.GNU-no-split-stack,"",@progbits" make[4]: *** [reflect/makefunc.lo] Error 1 AFAICS, this is just the .cfi_* directives and empty section flags. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University