cgo is just using the debug information generated by the C compiler.
It expects to see debug info for the type "char". For example, if I
compile this C file
#include <stdio.h>
char* callC() {
return "Calling C code!";
}
with clang on my system and run "readelf --debug" on the resulting
object file, I see
<1><48>: Abbrev Number: 4 (DW_TAG_base_type)
<49> DW_AT_name : (indirect string, offset: 0x4c): char
<4d> DW_AT_encoding : 6 (signed char)
<4e> DW_AT_byte_size : 1
cgo will use this to define the type "C.char".
This is independent of whether char is signed or unsigned. Given that
your code uses "char", it surprises me that there is no named entry
for it in the debug info.
Ian