Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gccgo: cgo not working on Solaris 10 #27838

Open
amandeepgautam opened this issue Sep 25, 2018 · 5 comments

Comments

@amandeepgautam
Copy link

commented Sep 25, 2018

What version of Go are you using (go version)?

go version go1.10.3 gccgo (GCC) 8.2.1 20180813 solaris/sparc

Does this issue reproduce with the latest release?

Yes. Compiled from source

What operating system and processor architecture are you using (go env)?

GOARCH="sparc"
GOBIN=""
GOCACHE="/export/home/amandeep/.cache/go-build"
GOEXE=""
GOHOSTARCH="sparc"
GOHOSTOS="solaris"
GOOS="solaris"
GOPATH="/opt/go_pkgs"
GORACE=""
GOROOT="/usr/gnu"
GOTMPDIR=""
GOTOOLDIR="/usr/gnu/libexec/gcc/sparc-sun-solaris2.10/8.2.1"
GCCGO="/usr/gnu/bin/gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build699772262=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

Tried to compile a simple program:

package main                                                                   
 
/*                                                                             
#include <stdio.h>                                                             

void testc() {                                                                 
    printf("Hello cgo");
}                                                                              
*/                                                                             
import "C"                                                                     
                                                                               
func main() {                                                                  
    C.testc()                                                                  
}                                                                              

What did you see instead?

Compilation fails with:
./abc.go:13:5: call of non-function C.testc

@gopherbot gopherbot added this to the Gccgo milestone Sep 25, 2018

@amandeepgautam

This comment has been minimized.

Copy link
Author

commented Sep 25, 2018

Including few relevant outputs (as discussed in the thread here):

amandeep@s10ldom2:~$ go build -x abc.go 
WORK=/tmp/go-build355496252
mkdir -p $WORK/b001/
cd $WORK
/usr/gnu/bin/gccgo -fsplit-stack -c -x c - || true
cd /export/home/amandeep
CGO_LDFLAGS='"-g" "-O2"' /usr/gnu/libexec/gcc/sparc-sun-solaris2.10/8.2.1/cgo -objdir $WORK/b001/ -importpath command-line-arguments -gccgo -- -I $WORK/b001/ -g -O2 ./abc.go
# command-line-arguments
./abc.go:13:5: call of non-function C.testc

amandeep@s10ldom2:~$ sudo LD_LIBRARY_PATH=/usr/gnu/lib CGO_LDFLAGS='"-g" "-O2"' /usr/gnu/libexec/gcc/sparc-sun-solaris2.10/8.2.1/cgo -debug-gcc -objdir $WORK/b001/ -importpath command-line-arguments -gccgo -- -I $WORK/b001/ -g -O2 ./abc.go
$ gcc -E -dM -xc -I /b001/ -g -O2 - <<EOF

#line 1 "cgo-builtin-prolog"
#include <stddef.h> /* for ptrdiff_t and size_t below */

/* Define intgo when compiling with GCC.  */
typedef ptrdiff_t intgo;

typedef struct { const char *p; intgo n; } _GoString_;
typedef struct { char *p; intgo n; intgo c; } _GoBytes_;
_GoString_ GoString(char *p);
_GoString_ GoStringN(char *p, int l);
_GoBytes_ GoBytes(void *p, int n);
char *CString(_GoString_);
void *CBytes(_GoBytes_);
void *_CMalloc(size_t);

__attribute__ ((unused))
static size_t _GoStringLen(_GoString_ s) { return s.n; }

__attribute__ ((unused))
static const char *_GoStringPtr(_GoString_ s) { return s.p; }
#line 3 "/export/home/amandeep/abc.go"
 
#include <stdio.h>

void testc() {
    printf("Hello cgo");
}

#line 1 "cgo-generated-wrapper"
EOF
#define __DBL_MIN_EXP__ (-1021)
#define __FLT32X_MAX_EXP__ 1024
#define _SYS_FEATURE_TESTS_H 
#define __UINT_LEAST16_MAX__ 0xffff
#define __ATOMIC_ACQUIRE 2
#define __FLT128_MAX_10_EXP__ 4932
#define __sun_attr___packed__ __attribute__((__packed__))
#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F
#define __GCC_IEC_559_COMPLEX 2
#define __UINT_LEAST8_TYPE__ unsigned char
#define _T_WCHAR_ 
#define __INTMAX_C(c) c ## LL
#define __CHAR_BIT__ 8
#define __UINT8_MAX__ 0xff
#define __sun_attr___VPRINTFLIKE__(__n) __attribute__((__format__(printf, __n, 0)))
#define _FILEDEFED 
#define __WINT_MAX__ 0x7fffffffL
#define __FLT32_MIN_EXP__ (-125)
#define stderr (&__iob[2])
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __SIZE_MAX__ 0xffffffffU
#define __WCHAR_MAX__ 0x7fffffffL
#define _LONG_LONG_ALIGNMENT 8
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __DBL_DENORM_MIN__ ((double)4.94065645841246544176568792868221372e-324L)
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define _OBP 
#define __GCC_IEC_559 2
#define __FLT32X_DECIMAL_DIG__ 17
#define _IOFBF 0000
#define __sun_attr___pure__ __attribute__((__pure__))
#define __FLT_EVAL_METHOD__ 0
#define __unix__ 1
#define __FLT64_DECIMAL_DIG__ 17
#define _XOPEN_VERSION 3
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
#define __SIG_ATOMIC_TYPE__ int
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define L_cuserid 9
#define ___sun_attr_inner(__a) __sun_attr_ ##__a
#define __sun_attr___noreturn__ __attribute__((__noreturn__))
#define __GNUC_PATCHLEVEL__ 1
#define __FLT32_HAS_DENORM__ 1
#define __UINT_FAST8_MAX__ 0xff
#define __has_include(STR) __has_include__(STR)
#define __size_t 
#define __DEC64_MAX_EXP__ 385
#define _WCHAR_T_DEFINED 
#define __INT8_C(c) c
#define __INT_LEAST8_WIDTH__ 8
#define sparc 1
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
#define __sun_attr__(__a) ___sun_attr_inner __a
#define __SHRT_MAX__ 0x7fff
#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L
#define __FLT64X_MAX_10_EXP__ 4932
#define __UINT_LEAST8_MAX__ 0xff
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
#define __UINTMAX_TYPE__ long long unsigned int
#define __DEC32_EPSILON__ 1E-6DF
#define __FLT_EVAL_METHOD_TS_18661_3__ 0
#define __OPTIMIZE__ 1
#define putchar(x) putc((x), stdout)
#define __unix 1
#define __UINT32_MAX__ 0xffffffffU
#define __SIZE_T 
#define __LDBL_MAX_EXP__ 16384
#define __FLT128_MIN_EXP__ (-16381)
#define __WINT_MIN__ (-__WINT_MAX__ - 1)
#define __sun 1
#define __FLT128_MIN_10_EXP__ (-4931)
#define __INT_LEAST16_WIDTH__ 16
#define _SIZE_T_DEFINED_ 
#define __SCHAR_MAX__ 0x7f
#define _LONG_ALIGNMENT 4
#define __FLT128_MANT_DIG__ 113
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define __INT64_C(c) c ## LL
#define _INT_ALIGNMENT 4
#define __DBL_DIG__ 15
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define __FLT64X_MANT_DIG__ 113
#define _SYS_CCOMPILE_H 
#define getchar() getc(stdin)
#define __SIZEOF_INT__ 4
#define __SIZEOF_POINTER__ 4
#define clearerr(p) ((void)((p)->_flag &= ~(_IOERR | _IOEOF)))
#define _DOUBLE_COMPLEX_ALIGNMENT 8
#define __USER_LABEL_PREFIX__ 
#define __FLT64X_EPSILON__ 1.92592994438723585305597794258492732e-34F64x
#define __STDC_HOSTED__ 1
#define __LDBL_HAS_INFINITY__ 1
#define _BSD_SIZE_T_DEFINED_ 
#define __FLT32_DIG__ 6
#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
#define __SHRT_WIDTH__ 16
#define TMP_MAX 17576
#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
#define __STDC_UTF_16__ 1
#define __DEC32_MAX__ 9.999999E96DF
#define _WCHAR_T_ 
#define __FLT64X_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F64x
#define _STDDEF_H 
#define __FLT32X_HAS_INFINITY__ 1
#define __INT32_MAX__ 0x7fffffff
#define __INT_WIDTH__ 32
#define __SIZEOF_LONG__ 4
#define _IONBF 0004
#define __UINT16_C(c) c
#define __PTRDIFF_WIDTH__ 32
#define __DECIMAL_DIG__ 36
#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
#define __INTMAX_WIDTH__ 64
#define _LARGEFILE_SOURCE 1
#define __has_include_next(STR) __has_include_next__(STR)
#define __FLT64X_MIN_10_EXP__ (-4931)
#define __LDBL_HAS_QUIET_NAN__ 1
#define __FLT64_MANT_DIG__ 53
#define __va_ptr_base void
#define L_tmpnam 25
#define ___int_wchar_t_h 
#define _T_PTRDIFF 
#define __GNUC__ 8
#define __sun_attr___KVPRINTFLIKE__(__n) __attribute__((__format__(cmn_err, __n, 0)))
#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
#define L_ctermid 9
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 16
#define SEEK_CUR 1
#define __BIGGEST_ALIGNMENT__ 8
#define __FLT64_MAX_10_EXP__ 308
#define __sun_attr___KPRINTFLIKE__(__n) __attribute__((__format__(cmn_err, __n, (__n)+1)))
#define __va_void(expr) ((void)expr)
#define _STDIO_H 
#define __DBL_MAX__ ((double)1.79769313486231570814527423731704357e+308L)
#define __INT_FAST32_MAX__ 0x7fffffff
#define __DBL_HAS_INFINITY__ 1
#define stdin (&__iob[0])
#define __SVR4 1
#define __DEC32_MIN_EXP__ (-94)
#define __INTPTR_WIDTH__ 32
#define _LONG_LONG_HTOL 
#define __FLT32X_HAS_DENORM__ 1
#define __INT_FAST16_TYPE__ int
#define _SIZE_T_DEFINED 
#define _SUNOS_VTOC_8 
#define _WCHAR_T_DEFINED_ 
#define _NFILE 20
#define __LDBL_HAS_DENORM__ 1
#define _STDIO_IMPL_H 
#define __va_alist_type int
#define __FLT128_HAS_INFINITY__ 1
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __INT_LEAST32_MAX__ 0x7fffffff
#define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT
#define __DEC32_MIN__ 1E-95DF
#define __DBL_MAX_EXP__ 1024
#define __WCHAR_WIDTH__ 32
#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
#define __DEC128_EPSILON__ 1E-33DL
#define __PTRDIFF_MAX__ 0x7fffffff
#define _STDIO_TAG_H 
#define _PTRDIFF_T_DECLARED 
#define __FLT32_HAS_QUIET_NAN__ 1
#define _T_WCHAR 
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __SIZEOF_SIZE_T__ 4
#define _WCHAR_T 
#define __KVPRINTFLIKE(__n) __sun_attr__((__KVPRINTFLIKE__(__n)))
#define __sparc__ 1
#define __FLT64X_MIN_EXP__ (-16381)
#define __SIZEOF_WINT_T__ 4
#define __LONG_LONG_WIDTH__ 64
#define _GCC_WCHAR_T 
#define __FLT32_MAX_EXP__ 128
#define _PTRDIFF_T 
#define __GXX_ABI_VERSION 1013
#define __sun_attr___PRINTFLIKE__(__n) __attribute__((__format__(printf, __n, (__n)+1)))
#define __FLT_MIN_EXP__ (-125)
#define __PTRDIFF_T 
#define __FLT64X_HAS_QUIET_NAN__ 1
#define __INT_FAST64_TYPE__ long long int
#define _LONGLONG_TYPE 
#define __FILE_TAG __FILE
#define ferror(p) ((p)->_flag & _IOERR)
#define _ANSI_STDDEF_H 
#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
#define __DBL_MIN__ ((double)2.22507385850720138309023271733240406e-308L)
#define _ALIGNMENT_REQUIRED 1
#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
#define _ISO_STDIO_ISO_H 
#define __FLT64_MIN_EXP__ (-1021)
#define _RESTRICT_KYWD restrict
#define _SYS_ISA_DEFS_H 
#define __FLT64_MIN_10_EXP__ (-307)
#define _IOREAD 0001
#define __FLT64X_DECIMAL_DIG__ 36
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__ 
#define __UINT16_MAX__ 0xffff
#define _LONG_DOUBLE_ALIGNMENT 8
#define __DBL_HAS_DENORM__ 1
#define _IOMYBUF 0010
#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
#define __UINT8_TYPE__ unsigned char
#define __sparcv8 1
#define __sun_attr___const__ __attribute__((__const__))
#define __FLT_MANT_DIG__ 24
#define __LDBL_DECIMAL_DIG__ 36
#define __VERSION__ "8.2.1 20180813"
#define __UINT64_C(c) c ## ULL
#define _PTRDIFF_T_ 
#define __INT_WCHAR_T_H 
#define _BIT_FIELDS_HTOL 
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define _NO_FDISK_PRESENT 
#define _T_PTRDIFF_ 
#define __FLT128_MAX_EXP__ 16384
#define __FLT32_MANT_DIG__ 24
#define _SYS_SIZE_T_H 
#define _OFF_T 
#define __FLOAT_WORD_ORDER__ __ORDER_BIG_ENDIAN__
#define __SIZE_T__ 
#define _CHAR_ALIGNMENT 1
#define __FLT128_HAS_DENORM__ 1
#define __sparc 1
#define __FLT128_DIG__ 33
#define __SCHAR_WIDTH__ 8
#define __INT32_C(c) c
#define __DEC64_EPSILON__ 1E-15DD
#define __ORDER_PDP_ENDIAN__ 3412
#define __DEC128_MIN_EXP__ (-6142)
#define __FLT32_MAX_10_EXP__ 38
#define sun 1
#define __INT_FAST32_TYPE__ int
#define __UINT_LEAST16_TYPE__ short unsigned int
#define __FLT64X_HAS_INFINITY__ 1
#define unix 1
#define __INT16_MAX__ 0x7fff
#define _BSD_SIZE_T_ 
#define __SIZE_TYPE__ unsigned int
#define __UINT64_MAX__ 0xffffffffffffffffULL
#define _SIZE_T_DECLARED 
#define _ISO_STDIO_C99_H 
#define _FLOAT_ALIGNMENT 4
#define __FLT64X_DIG__ 33
#define __INT8_TYPE__ char
#define _IORW 0200
#define __ELF__ 1
#define _FLOAT_COMPLEX_ALIGNMENT 4
#define __FLT_RADIX__ 2
#define __INT_LEAST16_TYPE__ short int
#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L
#define __UINTMAX_C(c) c ## ULL
#define __SIG_ATOMIC_MAX__ 0x7fffffff
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define _BOOL_ALIGNMENT 1
#define __SIZEOF_PTRDIFF_T__ 4
#define SEEK_SET 0
#define _HAVE_TEM_FIRMWARE 
#define _SYS_VA_LIST_H 
#define _STDC_C99 
#define __FLT32X_MANT_DIG__ 53
#define _SIZE_T_ 
#define __FLT32X_MIN_EXP__ (-1021)
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define _WCHAR_T_H 
#define __INT_FAST16_MAX__ 0x7fffffff
#define __FLT64_DIG__ 15
#define __UINT_FAST32_MAX__ 0xffffffffU
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __FLT_HAS_QUIET_NAN__ 1
#define _MAX_ALIGNMENT 8
#define __FLT_MAX_10_EXP__ 38
#define _POINTER_ALIGNMENT 4
#define __LONG_MAX__ 0x7fffffffL
#define __WCHAR_T__ 
#define __FLT64X_HAS_DENORM__ 1
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __FLT_HAS_INFINITY__ 1
#define _BSD_PTRDIFF_T_ 
#define _ILP32 
#define __UINT_FAST16_TYPE__ unsigned int
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __INT_FAST32_WIDTH__ 32
#define NULL ((void *)0)
#define __CHAR16_TYPE__ short unsigned int
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __SIZE_WIDTH__ 32
#define __INT_LEAST16_MAX__ 0x7fff
#define __DEC64_MANT_DIG__ 16
#define __INT64_MAX__ 0x7fffffffffffffffLL
#define __UINT_LEAST32_MAX__ 0xffffffffU
#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __SIG_ATOMIC_WIDTH__ 32
#define __INT_LEAST64_TYPE__ long long int
#define __INT16_TYPE__ short int
#define __INT_LEAST8_TYPE__ char
#define __STDC_VERSION__ 201710L
#define __DEC32_MAX_EXP__ 97
#define _BIG_ENDIAN 
#define __INT_FAST8_MAX__ 0x7f
#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
#define __INTPTR_MAX__ 0x7fffffff
#define __FLT64_HAS_QUIET_NAN__ 1
#define _IOLBF 0100
#define __FLT32_MIN_10_EXP__ (-37)
#define __FLT32X_DIG__ 15
#define __LDBL_MANT_DIG__ 113
#define __DBL_HAS_QUIET_NAN__ 1
#define __FLT64_HAS_INFINITY__ 1
#define __FLT64X_MAX__ 1.18973149535723176508575932662800702e+4932F64x
#define __GNUC_VA_LIST 
#define _GCC_MAX_ALIGN_T 
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define _DOUBLE_ALIGNMENT 8
#define _SHORT_ALIGNMENT 2
#define FILENAME_MAX 1024
#define __VPRINTFLIKE(__n) __sun_attr__((__VPRINTFLIKE__(__n)))
#define __INTPTR_TYPE__ int
#define __UINT16_TYPE__ short unsigned int
#define __WCHAR_TYPE__ long int
#define __SIZEOF_FLOAT__ 4
#define __UINTPTR_MAX__ 0xffffffffU
#define getc(p) (--(p)->_cnt < 0 ? __filbuf(p) : (int)*(p)->_ptr++)
#define __INT_FAST64_WIDTH__ 64
#define __DEC64_MIN_EXP__ (-382)
#define putc(x,p) (--(p)->_cnt < 0 ? __flsbuf((x), (p)) : (int)(*(p)->_ptr++ = (unsigned char) (x)))
#define __FLT32_DECIMAL_DIG__ 9
#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 255
#define BUFSIZ 1024
#define __FLT_DIG__ 6
#define __FLT32_HAS_INFINITY__ 1
#define __FLT64X_MAX_EXP__ 16384
#define _IEEE_754 
#define _WCHAR_T_DECLARED 
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __INT_MAX__ 0x7fffffff
#define _DTRACE_VERSION 1
#define _T_SIZE_ 
#define feof(p) ((p)->_flag & _IOEOF)
#define __INT64_TYPE__ long long int
#define __FLT_MAX_EXP__ 128
#define __DBL_MANT_DIG__ 53
#define ___int_size_t_h 
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define _IOWRT 0002
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ long int
#define __UINT_LEAST32_TYPE__ unsigned int
#define __SIZEOF_SHORT__ 2
#define __LDBL_MIN_EXP__ (-16381)
#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
#define stdout (&__iob[1])
#define __WINT_WIDTH__ 32
#define EOF (-1)
#define __INT_LEAST8_MAX__ 0x7f
#define __KPRINTFLIKE(__n) __sun_attr__((__KPRINTFLIKE__(__n)))
#define __FLT32X_MAX_10_EXP__ 308
#define _CHAR_IS_SIGNED 
#define __LDBL_MAX_10_EXP__ 4932
#define __ATOMIC_RELAXED 0
#define __DBL_EPSILON__ ((double)2.22044604925031308084726333618164062e-16L)
#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
#define _SIZET_ 
#define __UINT8_C(c) c
#define __FLT64_MAX_EXP__ 1024
#define _LONG_DOUBLE_COMPLEX_ALIGNMENT 8
#define __INT_LEAST32_TYPE__ int
#define __wchar_t__ 
#define __sun__ 1
#define SEEK_END 2
#define __SIZEOF_WCHAR_T__ 4
#define __UINT64_TYPE__ long long unsigned int
#define _LARGEFILE64_SOURCE 1
#define _STDDEF_H_ 
#define __FLT128_HAS_QUIET_NAN__ 1
#define __INT_FAST8_TYPE__ char
#define _IOEOF 0020
#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
#define __GNUC_STDC_INLINE__ 1
#define P_tmpdir "/var/tmp/"
#define __FLT64_HAS_DENORM__ 1
#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
#define __DBL_DECIMAL_DIG__ 17
#define __STDC_UTF_32__ 1
#define _IOERR 0040
#define __INT_FAST8_WIDTH__ 8
#define __DEC_EVAL_METHOD__ 2
#define _SIZE_T 
#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
#define FOPEN_MAX _NFILE
#define __PRINTFLIKE(__n) __sun_attr__((__PRINTFLIKE__(__n)))
#define _STACK_GROWS_DOWNWARD 
#define _FILE_OFFSET_BITS 32
#define __svr4__ 1
#define _GCC_SIZE_T 
#define __ORDER_BIG_ENDIAN__ 4321
#define __UINT32_C(c) c ## U
#define __INTMAX_MAX__ 0x7fffffffffffffffLL
#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
#define __size_t__ 
#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
#define __INT8_MAX__ 0x7f
#define __LONG_WIDTH__ 32
#define __UINT_FAST32_TYPE__ unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F
#define __NORETURN __sun_attr__((__noreturn__))
#define __INT32_TYPE__ int
#define _DMA_USES_VIRTADDR 
#define __SIZEOF_DOUBLE__ 8
#define __FLT_MIN_10_EXP__ (-37)
#define _ISO_CPP_14882_1998 
#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
#define __INT_LEAST32_WIDTH__ 32
#define __INTMAX_TYPE__ long long int
#define __DEC128_MAX_EXP__ 6145
#define _T_SIZE 
#define _ISO_C_9899_1999 
#define __FLT32X_HAS_QUIET_NAN__ 1
#define __ATOMIC_CONSUME 1
#define __GNUC_MINOR__ 2
#define __INT_FAST16_WIDTH__ 32
#define __UINTMAX_MAX__ 0xffffffffffffffffULL
#define __DEC32_MANT_DIG__ 7
#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
#define __INT16_C(c) c
#define __PTRDIFF_TYPE__ int
#define __CONST __sun_attr__((__const__))
#define __GNUC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#define __ATOMIC_SEQ_CST 5
#define __UINT32_TYPE__ unsigned int
#define __FLT32X_MIN_10_EXP__ (-307)
#define __UINTPTR_TYPE__ unsigned int
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-4931)
#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
#define __SIZEOF_LONG_LONG__ 8
#define _GCC_PTRDIFF_T 
#define _SBFSIZ 8
#define __FLT128_DECIMAL_DIG__ 36
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
#define __LDBL_DIG__ 33
#define __FLT_DECIMAL_DIG__ 9
#define __UINT_FAST16_MAX__ 0xffffffffU
#define ___int_ptrdiff_t_h 
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __PURE __sun_attr__((__pure__))
#define __INT_LEAST64_WIDTH__ 64
#define __UINT_FAST8_TYPE__ unsigned char
#define __ATOMIC_ACQ_REL 4
#define __WCHAR_T 
#define __ATOMIC_RELEASE 3
$ gcc -w -Wno-error -o/b001//_cgo_.o -gdwarf-2 -c -xc -I /b001/ -g - <<EOF

#line 1 "cgo-builtin-prolog"
#include <stddef.h> /* for ptrdiff_t and size_t below */

/* Define intgo when compiling with GCC.  */
typedef ptrdiff_t intgo;

typedef struct { const char *p; intgo n; } _GoString_;
typedef struct { char *p; intgo n; intgo c; } _GoBytes_;
_GoString_ GoString(char *p);
_GoString_ GoStringN(char *p, int l);
_GoBytes_ GoBytes(void *p, int n);
char *CString(_GoString_);
void *CBytes(_GoBytes_);
void *_CMalloc(size_t);

__attribute__ ((unused))
static size_t _GoStringLen(_GoString_ s) { return s.n; }

__attribute__ ((unused))
static const char *_GoStringPtr(_GoString_ s) { return s.p; }
#line 3 "/export/home/amandeep/abc.go"
 
#include <stdio.h>

void testc() {
    printf("Hello cgo");
}

#line 1 "cgo-generated-wrapper"
#line 1 "not-declared"
void __cgo_f_1_1(void) { __typeof__(testc) *__cgo_undefined__1; }
#line 1 "not-type"
void __cgo_f_1_2(void) { testc *__cgo_undefined__2; }
#line 1 "not-int-const"
void __cgo_f_1_3(void) { enum { __cgo_undefined__3 = (testc)*1 }; }
#line 1 "not-num-const"
void __cgo_f_1_4(void) { static const double __cgo_undefined__4 = (testc); }
#line 1 "not-str-lit"
void __cgo_f_1_5(void) { static const char __cgo_undefined__5[] = (testc); }
#line 1 "completed"
int __cgo__1 = __cgo__2;
EOF
not-type: In function '__cgo_f_1_2':
not-type:1:33: error: '__cgo_undefined__2' undeclared (first use in this function); did you mean '__cgo_f_1_2'?
not-type:1:33: note: each undeclared identifier is reported only once for each function it appears in
not-int-const: In function '__cgo_f_1_3':
not-int-const:1:61: error: invalid operands to binary * (have 'void (*)()' and 'int')
not-num-const: In function '__cgo_f_1_4':
not-num-const:1:67: error: incompatible types when initializing type 'double' using type 'void (*)()'
not-str-lit: In function '__cgo_f_1_5':
not-str-lit:1:67: error: invalid initializer
completed: At top level:
completed:1:16: error: '__cgo__2' undeclared here (not in a function); did you mean '__cgo__1'?
completed:1:16: error: initializer element is not constant
$ gcc -w -Wno-error -o/b001//_cgo_.o -gdwarf-2 -c -xc -I /b001/ -g -O2 - <<EOF

#line 1 "cgo-builtin-prolog"
#include <stddef.h> /* for ptrdiff_t and size_t below */

/* Define intgo when compiling with GCC.  */
typedef ptrdiff_t intgo;

typedef struct { const char *p; intgo n; } _GoString_;
typedef struct { char *p; intgo n; intgo c; } _GoBytes_;
_GoString_ GoString(char *p);
_GoString_ GoStringN(char *p, int l);
_GoBytes_ GoBytes(void *p, int n);
char *CString(_GoString_);
void *CBytes(_GoBytes_);
void *_CMalloc(size_t);

__attribute__ ((unused))
static size_t _GoStringLen(_GoString_ s) { return s.n; }

__attribute__ ((unused))
static const char *_GoStringPtr(_GoString_ s) { return s.p; }
#line 3 "/export/home/amandeep/abc.go"
 
#include <stdio.h>

void testc() {
    printf("Hello cgo");
}

#line 1 "cgo-generated-wrapper"
#line 1 "cgo-dwarf-inference"
__typeof__(testc) *__cgo__0;
long long __cgodebug_ints[] = {
        0,
        1
};
double __cgodebug_floats[] = {
        0,
        1
};
EOF
/export/home/amandeep/abc.go:13:5: call of non-function C.testc
amandeep@s10ldom2:~$ /opt/csw/bin/greadelf --debug --all /b001/_cgo_.o
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           Sparc
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          2036 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           40 (bytes)
  Number of section headers:         20
  Section header string table index: 17

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        00000000 000034 000014 00  AX  0   0  4
  [ 2] .rela.text        RELA            00000000 000c88 000024 0c     18   1  4
  [ 3] .data             PROGBITS        00000000 000048 000020 00  WA  0   0  8
  [ 4] .bss              NOBITS          00000000 000068 000000 00  WA  0   0  1
  [ 5] .rodata.str1.8    PROGBITS        00000000 000068 000010 01 AMS  0   0  8
  [ 6] .debug_frame      PROGBITS        00000000 000078 000020 00      0   0  4
  [ 7] .rela.debug_frame RELA            00000000 000cac 000018 0c     18   6  4
  [ 8] .debug_info       PROGBITS        00000000 000098 000294 00      0   0  1
  [ 9] .rela.debug_info  RELA            00000000 000cc4 00024c 0c     18   8  4
  [10] .debug_abbrev     PROGBITS        00000000 00032c 00011f 00      0   0  1
  [11] .debug_aranges    PROGBITS        00000000 00044b 000020 00      0   0  1
  [12] .rela.debug_arang RELA            00000000 000f10 000018 0c     18  11  4
  [13] .debug_line       PROGBITS        00000000 00046b 000126 00      0   0  1
  [14] .rela.debug_line  RELA            00000000 000f28 00000c 0c     18  13  4
  [15] .debug_str        PROGBITS        00000000 000591 00019b 01  MS  0   0  1
  [16] .comment          PROGBITS        00000000 00072c 00001b 01  MS  0   0  1
  [17] .shstrtab         STRTAB          00000000 000747 0000aa 00      0   0  1
  [18] .symtab           SYMTAB          00000000 000b14 000120 10     19  13  4
  [19] .strtab           STRTAB          00000000 000c34 000053 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

There are no section groups in this file.

There are no program headers in this file.

Relocation section '.rela.text' at offset 0xc88 contains 3 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00000000  00000509 R_SPARC_HI22      00000000   .rodata.str1.8 + 0
00000004  0000050c R_SPARC_LO10      00000000   .rodata.str1.8 + 0
0000000c  00000e07 R_SPARC_WDISP30   00000000   printf + 0

Relocation section '.rela.debug_frame' at offset 0xcac contains 2 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00000014  00000617 R_SPARC_UA32      00000000   .debug_frame + 0
00000018  00000217 R_SPARC_UA32      00000000   .text + 0

Relocation section '.rela.debug_info' at offset 0xcc4 contains 49 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00000006  00000817 R_SPARC_UA32      00000000   .debug_abbrev + 0
0000000c  00000b17 R_SPARC_UA32      00000000   .debug_str + 9d
00000011  00000b17 R_SPARC_UA32      00000000   .debug_str + 159
00000015  00000b17 R_SPARC_UA32      00000000   .debug_str + 10b
00000019  00000217 R_SPARC_UA32      00000000   .text + 0
0000001d  00000217 R_SPARC_UA32      00000000   .text + 14
00000021  00000a17 R_SPARC_UA32      00000000   .debug_line + 0
0000002f  00000b17 R_SPARC_UA32      00000000   .debug_str + e3
00000036  00000b17 R_SPARC_UA32      00000000   .debug_str + 13f
0000003d  00000b17 R_SPARC_UA32      00000000   .debug_str + 121
00000044  00000b17 R_SPARC_UA32      00000000   .debug_str + 14d
0000004b  00000b17 R_SPARC_UA32      00000000   .debug_str + 100
00000056  00000b17 R_SPARC_UA32      00000000   .debug_str + 1f
00000062  00000b17 R_SPARC_UA32      00000000   .debug_str + 1f
0000006f  00000b17 R_SPARC_UA32      00000000   .debug_str + 148
0000007e  00000b17 R_SPARC_UA32      00000000   .debug_str + de
0000008d  00000b17 R_SPARC_UA32      00000000   .debug_str + 181
0000009c  00000b17 R_SPARC_UA32      00000000   .debug_str + 2c
000000ab  00000b17 R_SPARC_UA32      00000000   .debug_str + 105
000000ba  00000b17 R_SPARC_UA32      00000000   .debug_str + 57
000000cc  00000b17 R_SPARC_UA32      00000000   .debug_str + 65
000000de  00000b17 R_SPARC_UA32      00000000   .debug_str + 8b
000000f0  00000b17 R_SPARC_UA32      00000000   .debug_str + 0
00000102  00000b17 R_SPARC_UA32      00000000   .debug_str + 187
00000114  00000b17 R_SPARC_UA32      00000000   .debug_str + f7
0000012f  00000b17 R_SPARC_UA32      00000000   .debug_str + 7d
00000134  00000b17 R_SPARC_UA32      00000000   .debug_str + 39
00000150  00000b17 R_SPARC_UA32      00000000   .debug_str + 26
00000169  00000b17 R_SPARC_UA32      00000000   .debug_str + 194
00000177  00000b17 R_SPARC_UA32      00000000   .debug_str + 3e
00000190  00000b17 R_SPARC_UA32      00000000   .debug_str + 4c
0000019e  00000b17 R_SPARC_UA32      00000000   .debug_str + 178
000001b2  00000b17 R_SPARC_UA32      00000000   .debug_str + f0
000001c1  00000b17 R_SPARC_UA32      00000000   .debug_str + 76
000001d0  00000b17 R_SPARC_UA32      00000000   .debug_str + 32
000001df  00000b17 R_SPARC_UA32      00000000   .debug_str + 45
000001f5  00000b17 R_SPARC_UA32      00000000   .debug_str + 136
00000203  00001117 R_SPARC_UA32      00000004   __cgo__0 + 0
0000021e  00000b17 R_SPARC_UA32      00000000   .debug_str + ce
0000022c  00001017 R_SPARC_UA32      00000010   __cgodebug_ints + 0
00000243  00000b17 R_SPARC_UA32      00000000   .debug_str + 96
00000248  00000b17 R_SPARC_UA32      00000000   .debug_str + d
00000256  00000f17 R_SPARC_UA32      00000000   __cgodebug_floats + 0
0000025c  00000b17 R_SPARC_UA32      00000000   .debug_str + 70
00000263  00000217 R_SPARC_UA32      00000000   .text + 0
00000267  00000217 R_SPARC_UA32      00000000   .text + 14
00000274  00000217 R_SPARC_UA32      00000000   .text + 14
00000288  00000b17 R_SPARC_UA32      00000000   .debug_str + 12f
0000028c  00000b17 R_SPARC_UA32      00000000   .debug_str + 12f

Relocation section '.rela.debug_aranges' at offset 0xf10 contains 2 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00000006  00000717 R_SPARC_UA32      00000000   .debug_info + 0
00000010  00000217 R_SPARC_UA32      00000000   .text + 0

Relocation section '.rela.debug_line' at offset 0xf28 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00000119  00000217 R_SPARC_UA32      00000000   .text + 0

The decoding of unwind sections for machine type Sparc is not currently supported.

Symbol table '.symtab' contains 18 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 00000000     0 FILE    LOCAL  DEFAULT  ABS cgo-gcc-input-177020270.c
     2: 00000000     0 SECTION LOCAL  DEFAULT    1 
     3: 00000000     0 SECTION LOCAL  DEFAULT    3 
     4: 00000000     0 SECTION LOCAL  DEFAULT    4 
     5: 00000000     0 SECTION LOCAL  DEFAULT    5 
     6: 00000000     0 SECTION LOCAL  DEFAULT    6 
     7: 00000000     0 SECTION LOCAL  DEFAULT    8 
     8: 00000000     0 SECTION LOCAL  DEFAULT   10 
     9: 00000000     0 SECTION LOCAL  DEFAULT   11 
    10: 00000000     0 SECTION LOCAL  DEFAULT   13 
    11: 00000000     0 SECTION LOCAL  DEFAULT   15 
    12: 00000000     0 SECTION LOCAL  DEFAULT   16 
    13: 00000000    20 FUNC    GLOBAL DEFAULT    1 testc
    14: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND printf
    15: 00000000    16 OBJECT  GLOBAL DEFAULT    3 __cgodebug_floats
    16: 00000010    16 OBJECT  GLOBAL DEFAULT    3 __cgodebug_ints
    17: 00000004     4 OBJECT  GLOBAL DEFAULT  COM __cgo__0

No version information found in this file.
Contents of the .debug_frame section:

00000000 0000000c ffffffff CIE
  Version:               1
  Augmentation:          ""
  Code alignment factor: 1
  Data alignment factor: -4
  Return address column: 15

  DW_CFA_def_cfa: r14 ofs 0

00000010 0000000c 00000000 FDE cie=00000000 pc=00000000..00000014

Contents of the .debug_info section:

  Compilation Unit @ offset 0x0:
   Length:        0x290 (32-bit)
   Version:       2
   Abbrev Offset: 0x0
   Pointer Size:  4
 <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <c>   DW_AT_producer    : (indirect string, offset: 0x9d): GNU C17 8.2.1 20180813 -mcpu=v9 -gdwarf-2 -g -O2 
    <10>   DW_AT_language    : 12       (ANSI C99)
    <11>   DW_AT_name        : (indirect string, offset: 0x159): /tmp/cgo-gcc-input-177020270.c 
    <15>   DW_AT_comp_dir    : (indirect string, offset: 0x10b): /export/home/amandeep  
    <19>   DW_AT_low_pc      : 0x0      
    <1d>   DW_AT_high_pc     : 0x14     
    <21>   DW_AT_stmt_list   : 0x0      
 <1><25>: Abbrev Number: 2 (DW_TAG_base_type)
    <26>   DW_AT_byte_size   : 4        
    <27>   DW_AT_encoding    : 5        (signed)
    <28>   DW_AT_name        : int      
 <1><2c>: Abbrev Number: 3 (DW_TAG_base_type)
    <2d>   DW_AT_byte_size   : 4        
    <2e>   DW_AT_encoding    : 7        (unsigned)
    <2f>   DW_AT_name        : (indirect string, offset: 0xe3): unsigned int    
 <1><33>: Abbrev Number: 3 (DW_TAG_base_type)
    <34>   DW_AT_byte_size   : 4        
    <35>   DW_AT_encoding    : 5        (signed)
    <36>   DW_AT_name        : (indirect string, offset: 0x13f): long int       
 <1><3a>: Abbrev Number: 3 (DW_TAG_base_type)
    <3b>   DW_AT_byte_size   : 8        
    <3c>   DW_AT_encoding    : 5        (signed)
    <3d>   DW_AT_name        : (indirect string, offset: 0x121): long long int  
 <1><41>: Abbrev Number: 3 (DW_TAG_base_type)
    <42>   DW_AT_byte_size   : 16       
    <43>   DW_AT_encoding    : 4        (float)
    <44>   DW_AT_name        : (indirect string, offset: 0x14d): long double    
 <1><48>: Abbrev Number: 3 (DW_TAG_base_type)
    <49>   DW_AT_byte_size   : 1        
    <4a>   DW_AT_encoding    : 6        (signed char)
    <4b>   DW_AT_name        : (indirect string, offset: 0x100): char   
 <1><4f>: Abbrev Number: 4 (DW_TAG_pointer_type)
    <50>   DW_AT_byte_size   : 4        
    <51>   DW_AT_type        : <0x48>   
 <1><55>: Abbrev Number: 5 (DW_TAG_typedef)
    <56>   DW_AT_name        : (indirect string, offset: 0x1f): __FILE  
    <5a>   DW_AT_decl_file   : 3        
    <5b>   DW_AT_decl_line   : 21       
    <5c>   DW_AT_decl_column : 27       
    <5d>   DW_AT_type        : <0x61>   
 <1><61>: Abbrev Number: 6 (DW_TAG_structure_type)
    <62>   DW_AT_name        : (indirect string, offset: 0x1f): __FILE  
    <66>   DW_AT_byte_size   : 16       
    <67>   DW_AT_decl_file   : 2        
    <68>   DW_AT_decl_line   : 29       
    <69>   DW_AT_decl_column : 8        
    <6a>   DW_AT_sibling     : <0x126>  
 <2><6e>: Abbrev Number: 7 (DW_TAG_member)
    <6f>   DW_AT_name        : (indirect string, offset: 0x148): _cnt   
    <73>   DW_AT_decl_file   : 2        
    <74>   DW_AT_decl_line   : 35       
    <75>   DW_AT_decl_column : 7        
    <76>   DW_AT_type        : <0x25>   
    <7a>   DW_AT_data_member_location: 2 byte block: 23 0       (DW_OP_plus_uconst: 0)
 <2><7d>: Abbrev Number: 7 (DW_TAG_member)
    <7e>   DW_AT_name        : (indirect string, offset: 0xde): _ptr    
    <82>   DW_AT_decl_file   : 2        
    <83>   DW_AT_decl_line   : 36       
    <84>   DW_AT_decl_column : 17       
    <85>   DW_AT_type        : <0x126>  
    <89>   DW_AT_data_member_location: 2 byte block: 23 4       (DW_OP_plus_uconst: 4)
 <2><8c>: Abbrev Number: 7 (DW_TAG_member)
    <8d>   DW_AT_name        : (indirect string, offset: 0x181): _base  
    <91>   DW_AT_decl_file   : 2        
    <92>   DW_AT_decl_line   : 38       
    <93>   DW_AT_decl_column : 17       
    <94>   DW_AT_type        : <0x126>  
    <98>   DW_AT_data_member_location: 2 byte block: 23 8       (DW_OP_plus_uconst: 8)
 <2><9b>: Abbrev Number: 7 (DW_TAG_member)
    <9c>   DW_AT_name        : (indirect string, offset: 0x2c): _flag   
    <a0>   DW_AT_decl_file   : 2        
    <a1>   DW_AT_decl_line   : 39       
    <a2>   DW_AT_decl_column : 16       
    <a3>   DW_AT_type        : <0x12c>  
    <a7>   DW_AT_data_member_location: 2 byte block: 23 c       (DW_OP_plus_uconst: 12)
 <2><aa>: Abbrev Number: 7 (DW_TAG_member)
    <ab>   DW_AT_name        : (indirect string, offset: 0x105): _file  
    <af>   DW_AT_decl_file   : 2        
    <b0>   DW_AT_decl_line   : 40       
    <b1>   DW_AT_decl_column : 16       
    <b2>   DW_AT_type        : <0x12c>  
    <b6>   DW_AT_data_member_location: 2 byte block: 23 d       (DW_OP_plus_uconst: 13)
 <2><b9>: Abbrev Number: 8 (DW_TAG_member)
    <ba>   DW_AT_name        : (indirect string, offset: 0x57): __orientation   
    <be>   DW_AT_decl_file   : 2        
    <bf>   DW_AT_decl_line   : 42       
    <c0>   DW_AT_decl_column : 11       
    <c1>   DW_AT_type        : <0x2c>   
    <c5>   DW_AT_byte_size   : 4        
    <c6>   DW_AT_bit_size    : 2        
    <c7>   DW_AT_bit_offset  : 16       
    <c8>   DW_AT_data_member_location: 2 byte block: 23 c       (DW_OP_plus_uconst: 12)
 <2><cb>: Abbrev Number: 8 (DW_TAG_member)
    <cc>   DW_AT_name        : (indirect string, offset: 0x65): __ionolock      
    <d0>   DW_AT_decl_file   : 2        
    <d1>   DW_AT_decl_line   : 43       
    <d2>   DW_AT_decl_column : 11       
    <d3>   DW_AT_type        : <0x2c>   
    <d7>   DW_AT_byte_size   : 4        
    <d8>   DW_AT_bit_size    : 1        
    <d9>   DW_AT_bit_offset  : 18       
    <da>   DW_AT_data_member_location: 2 byte block: 23 c       (DW_OP_plus_uconst: 12)
 <2><dd>: Abbrev Number: 8 (DW_TAG_member)
    <de>   DW_AT_name        : (indirect string, offset: 0x8b): __seekable      
    <e2>   DW_AT_decl_file   : 2        
    <e3>   DW_AT_decl_line   : 44       
    <e4>   DW_AT_decl_column : 11       
    <e5>   DW_AT_type        : <0x2c>   
    <e9>   DW_AT_byte_size   : 4        
    <ea>   DW_AT_bit_size    : 1        
    <eb>   DW_AT_bit_offset  : 19       
    <ec>   DW_AT_data_member_location: 2 byte block: 23 c       (DW_OP_plus_uconst: 12)
 <2><ef>: Abbrev Number: 8 (DW_TAG_member)
    <f0>   DW_AT_name        : (indirect string, offset: 0x0): __extendedfd     
    <f4>   DW_AT_decl_file   : 2        
    <f5>   DW_AT_decl_line   : 45       
    <f6>   DW_AT_decl_column : 11       
    <f7>   DW_AT_type        : <0x2c>   
    <fb>   DW_AT_byte_size   : 4        
    <fc>   DW_AT_bit_size    : 1        
    <fd>   DW_AT_bit_offset  : 20       
    <fe>   DW_AT_data_member_location: 2 byte block: 23 c       (DW_OP_plus_uconst: 12)
 <2><101>: Abbrev Number: 8 (DW_TAG_member)
    <102>   DW_AT_name        : (indirect string, offset: 0x187): __xf_nocheck  
    <106>   DW_AT_decl_file   : 2       
    <107>   DW_AT_decl_line   : 46      
    <108>   DW_AT_decl_column : 11      
    <109>   DW_AT_type        : <0x2c>  
    <10d>   DW_AT_byte_size   : 4       
    <10e>   DW_AT_bit_size    : 1       
    <10f>   DW_AT_bit_offset  : 21      
    <110>   DW_AT_data_member_location: 2 byte block: 23 c      (DW_OP_plus_uconst: 12)
 <2><113>: Abbrev Number: 8 (DW_TAG_member)
    <114>   DW_AT_name        : (indirect string, offset: 0xf7): __filler       
    <118>   DW_AT_decl_file   : 2       
    <119>   DW_AT_decl_line   : 47      
    <11a>   DW_AT_decl_column : 11      
    <11b>   DW_AT_type        : <0x2c>  
    <11f>   DW_AT_byte_size   : 4       
    <120>   DW_AT_bit_size    : 10      
    <121>   DW_AT_bit_offset  : 22      
    <122>   DW_AT_data_member_location: 2 byte block: 23 c      (DW_OP_plus_uconst: 12)
 <2><125>: Abbrev Number: 0
 <1><126>: Abbrev Number: 4 (DW_TAG_pointer_type)
    <127>   DW_AT_byte_size   : 4       
    <128>   DW_AT_type        : <0x12c> 
 <1><12c>: Abbrev Number: 3 (DW_TAG_base_type)
    <12d>   DW_AT_byte_size   : 1       
    <12e>   DW_AT_encoding    : 8       (unsigned char)
    <12f>   DW_AT_name        : (indirect string, offset: 0x7d): unsigned char  
 <1><133>: Abbrev Number: 5 (DW_TAG_typedef)
    <134>   DW_AT_name        : (indirect string, offset: 0x39): FILE   
    <138>   DW_AT_decl_file   : 4       
    <139>   DW_AT_decl_line   : 83      
    <13a>   DW_AT_decl_column : 16      
    <13b>   DW_AT_type        : <0x55>  
 <1><13f>: Abbrev Number: 9 (DW_TAG_array_type)
    <140>   DW_AT_type        : <0x55>  
    <144>   DW_AT_sibling     : <0x14f> 
 <2><148>: Abbrev Number: 10 (DW_TAG_subrange_type)
    <149>   DW_AT_type        : <0x2c>  
    <14d>   DW_AT_upper_bound : 19      
 <2><14e>: Abbrev Number: 0
 <1><14f>: Abbrev Number: 11 (DW_TAG_variable)
    <150>   DW_AT_name        : (indirect string, offset: 0x26): __iob  
    <154>   DW_AT_decl_file   : 4       
    <155>   DW_AT_decl_line   : 155     
    <156>   DW_AT_decl_column : 15      
    <157>   DW_AT_type        : <0x13f> 
    <15b>   DW_AT_external    : 1       
    <15c>   DW_AT_declaration : 1       
 <1><15d>: Abbrev Number: 9 (DW_TAG_array_type)
    <15e>   DW_AT_type        : <0x12c> 
    <162>   DW_AT_sibling     : <0x168> 
 <2><166>: Abbrev Number: 12 (DW_TAG_subrange_type)
 <2><167>: Abbrev Number: 0
 <1><168>: Abbrev Number: 11 (DW_TAG_variable)
    <169>   DW_AT_name        : (indirect string, offset: 0x194): _sibuf        
    <16d>   DW_AT_decl_file   : 5       
    <16e>   DW_AT_decl_line   : 208     
    <16f>   DW_AT_decl_column : 23      
    <170>   DW_AT_type        : <0x15d> 
    <174>   DW_AT_external    : 1       
    <175>   DW_AT_declaration : 1       
 <1><176>: Abbrev Number: 11 (DW_TAG_variable)
    <177>   DW_AT_name        : (indirect string, offset: 0x3e): _sobuf 
    <17b>   DW_AT_decl_file   : 5       
    <17c>   DW_AT_decl_line   : 208     
    <17d>   DW_AT_decl_column : 33      
    <17e>   DW_AT_type        : <0x15d> 
    <182>   DW_AT_external    : 1       
    <183>   DW_AT_declaration : 1       
 <1><184>: Abbrev Number: 9 (DW_TAG_array_type)
    <185>   DW_AT_type        : <0x126> 
    <189>   DW_AT_sibling     : <0x18f> 
 <2><18d>: Abbrev Number: 12 (DW_TAG_subrange_type)
 <2><18e>: Abbrev Number: 0
 <1><18f>: Abbrev Number: 11 (DW_TAG_variable)
    <190>   DW_AT_name        : (indirect string, offset: 0x4c): _bufendtab     
    <194>   DW_AT_decl_file   : 5       
    <195>   DW_AT_decl_line   : 240     
    <196>   DW_AT_decl_column : 23      
    <197>   DW_AT_type        : <0x184> 
    <19b>   DW_AT_external    : 1       
    <19c>   DW_AT_declaration : 1       
 <1><19d>: Abbrev Number: 11 (DW_TAG_variable)
    <19e>   DW_AT_name        : (indirect string, offset: 0x178): _lastbuf      
    <1a2>   DW_AT_decl_file   : 5       
    <1a3>   DW_AT_decl_line   : 241     
    <1a4>   DW_AT_decl_column : 15      
    <1a5>   DW_AT_type        : <0x1ab> 
    <1a9>   DW_AT_external    : 1       
    <1aa>   DW_AT_declaration : 1       
 <1><1ab>: Abbrev Number: 4 (DW_TAG_pointer_type)
    <1ac>   DW_AT_byte_size   : 4       
    <1ad>   DW_AT_type        : <0x133> 
 <1><1b1>: Abbrev Number: 13 (DW_TAG_variable)
    <1b2>   DW_AT_name        : (indirect string, offset: 0xf0): optarg 
    <1b6>   DW_AT_decl_file   : 5       
    <1b7>   DW_AT_decl_line   : 320     
    <1b9>   DW_AT_decl_column : 14      
    <1ba>   DW_AT_type        : <0x4f>  
    <1be>   DW_AT_external    : 1       
    <1bf>   DW_AT_declaration : 1       
 <1><1c0>: Abbrev Number: 13 (DW_TAG_variable)
    <1c1>   DW_AT_name        : (indirect string, offset: 0x76): optind 
    <1c5>   DW_AT_decl_file   : 5       
    <1c6>   DW_AT_decl_line   : 321     
    <1c8>   DW_AT_decl_column : 12      
    <1c9>   DW_AT_type        : <0x25>  
    <1cd>   DW_AT_external    : 1       
    <1ce>   DW_AT_declaration : 1       
 <1><1cf>: Abbrev Number: 13 (DW_TAG_variable)
    <1d0>   DW_AT_name        : (indirect string, offset: 0x32): opterr 
    <1d4>   DW_AT_decl_file   : 5       
    <1d5>   DW_AT_decl_line   : 321     
    <1d7>   DW_AT_decl_column : 20      
    <1d8>   DW_AT_type        : <0x25>  
    <1dc>   DW_AT_external    : 1       
    <1dd>   DW_AT_declaration : 1       
 <1><1de>: Abbrev Number: 13 (DW_TAG_variable)
    <1df>   DW_AT_name        : (indirect string, offset: 0x45): optopt 
    <1e3>   DW_AT_decl_file   : 5       
    <1e4>   DW_AT_decl_line   : 321     
    <1e6>   DW_AT_decl_column : 28      
    <1e7>   DW_AT_type        : <0x25>  
    <1eb>   DW_AT_external    : 1       
    <1ec>   DW_AT_declaration : 1       
 <1><1ed>: Abbrev Number: 14 (DW_TAG_subroutine_type)
    <1ee>   DW_AT_sibling     : <0x1f4> 
 <2><1f2>: Abbrev Number: 15 (DW_TAG_unspecified_parameters)
 <2><1f3>: Abbrev Number: 0
 <1><1f4>: Abbrev Number: 16 (DW_TAG_variable)
    <1f5>   DW_AT_name        : (indirect string, offset: 0x136): __cgo__0      
    <1f9>   DW_AT_decl_file   : 6       
    <1fa>   DW_AT_decl_line   : 1       
    <1fb>   DW_AT_decl_column : 20      
    <1fc>   DW_AT_type        : <0x207> 
    <200>   DW_AT_external    : 1       
    <201>   DW_AT_location    : 5 byte block: 3 0 0 0 4         (DW_OP_addr: 4)
 <1><207>: Abbrev Number: 4 (DW_TAG_pointer_type)
    <208>   DW_AT_byte_size   : 4       
    <209>   DW_AT_type        : <0x1ed> 
 <1><20d>: Abbrev Number: 9 (DW_TAG_array_type)
    <20e>   DW_AT_type        : <0x3a>  
    <212>   DW_AT_sibling     : <0x21d> 
 <2><216>: Abbrev Number: 10 (DW_TAG_subrange_type)
    <217>   DW_AT_type        : <0x2c>  
    <21b>   DW_AT_upper_bound : 1       
 <2><21c>: Abbrev Number: 0
 <1><21d>: Abbrev Number: 16 (DW_TAG_variable)
    <21e>   DW_AT_name        : (indirect string, offset: 0xce): __cgodebug_ints        
    <222>   DW_AT_decl_file   : 6       
    <223>   DW_AT_decl_line   : 2       
    <224>   DW_AT_decl_column : 11      
    <225>   DW_AT_type        : <0x20d> 
    <229>   DW_AT_external    : 1       
    <22a>   DW_AT_location    : 5 byte block: 3 0 0 0 10        (DW_OP_addr: 10)
 <1><230>: Abbrev Number: 9 (DW_TAG_array_type)
    <231>   DW_AT_type        : <0x240> 
    <235>   DW_AT_sibling     : <0x240> 
 <2><239>: Abbrev Number: 10 (DW_TAG_subrange_type)
    <23a>   DW_AT_type        : <0x2c>  
    <23e>   DW_AT_upper_bound : 1       
 <2><23f>: Abbrev Number: 0
 <1><240>: Abbrev Number: 3 (DW_TAG_base_type)
    <241>   DW_AT_byte_size   : 8       
    <242>   DW_AT_encoding    : 4       (float)
    <243>   DW_AT_name        : (indirect string, offset: 0x96): double 
 <1><247>: Abbrev Number: 16 (DW_TAG_variable)
    <248>   DW_AT_name        : (indirect string, offset: 0xd): __cgodebug_floats       
    <24c>   DW_AT_decl_file   : 6       
    <24d>   DW_AT_decl_line   : 6       
    <24e>   DW_AT_decl_column : 8       
    <24f>   DW_AT_type        : <0x230> 
    <253>   DW_AT_external    : 1       
    <254>   DW_AT_location    : 5 byte block: 3 0 0 0 0         (DW_OP_addr: 0)
 <1><25a>: Abbrev Number: 17 (DW_TAG_subprogram)
    <25b>   DW_AT_external    : 1       
    <25c>   DW_AT_name        : (indirect string, offset: 0x70): testc  
    <260>   DW_AT_decl_file   : 1       
    <261>   DW_AT_decl_line   : 6       
    <262>   DW_AT_decl_column : 6       
    <263>   DW_AT_low_pc      : 0x0     
    <267>   DW_AT_high_pc     : 0x14    
    <26b>   DW_AT_frame_base  : 2 byte block: 7e 0      (DW_OP_breg14 (r14): 0)
    <26e>   DW_AT_GNU_all_call_sites: 1 
    <26f>   DW_AT_sibling     : <0x285> 
 <2><273>: Abbrev Number: 18 (DW_TAG_GNU_call_site)
    <274>   DW_AT_low_pc      : 0x14    
    <278>   DW_AT_GNU_tail_call: 1      
    <279>   DW_AT_abstract_origin: <0x285>      
 <3><27d>: Abbrev Number: 19 (DW_TAG_GNU_call_site_parameter)
    <27e>   DW_AT_location    : 1 byte block: 58        (DW_OP_reg8 (r8))
    <280>   DW_AT_GNU_call_site_value: 2 byte block: 78 0       (DW_OP_breg8 (r8): 0)
 <3><283>: Abbrev Number: 0
 <2><284>: Abbrev Number: 0
 <1><285>: Abbrev Number: 20 (DW_TAG_subprogram)
    <286>   DW_AT_external    : 1       
    <287>   DW_AT_declaration : 1       
    <288>   DW_AT_MIPS_linkage_name: (indirect string, offset: 0x12f): printf   
    <28c>   DW_AT_name        : (indirect string, offset: 0x12f): printf        
    <290>   DW_AT_decl_file   : 4       
    <291>   DW_AT_decl_line   : 215     
    <292>   DW_AT_decl_column : 12      
 <1><293>: Abbrev Number: 0

Contents of the .debug_abbrev section:

  Number TAG (0x0)
   1      DW_TAG_compile_unit    [has children]
    DW_AT_producer     DW_FORM_strp
    DW_AT_language     DW_FORM_data1
    DW_AT_name         DW_FORM_strp
    DW_AT_comp_dir     DW_FORM_strp
    DW_AT_low_pc       DW_FORM_addr
    DW_AT_high_pc      DW_FORM_addr
    DW_AT_stmt_list    DW_FORM_data4
    DW_AT value: 0     DW_FORM value: 0
   2      DW_TAG_base_type    [no children]
    DW_AT_byte_size    DW_FORM_data1
    DW_AT_encoding     DW_FORM_data1
    DW_AT_name         DW_FORM_string
    DW_AT value: 0     DW_FORM value: 0
   3      DW_TAG_base_type    [no children]
    DW_AT_byte_size    DW_FORM_data1
    DW_AT_encoding     DW_FORM_data1
    DW_AT_name         DW_FORM_strp
    DW_AT value: 0     DW_FORM value: 0
   4      DW_TAG_pointer_type    [no children]
    DW_AT_byte_size    DW_FORM_data1
    DW_AT_type         DW_FORM_ref4
    DW_AT value: 0     DW_FORM value: 0
   5      DW_TAG_typedef    [no children]
    DW_AT_name         DW_FORM_strp
    DW_AT_decl_file    DW_FORM_data1
    DW_AT_decl_line    DW_FORM_data1
    DW_AT_decl_column  DW_FORM_data1
    DW_AT_type         DW_FORM_ref4
    DW_AT value: 0     DW_FORM value: 0
   6      DW_TAG_structure_type    [has children]
    DW_AT_name         DW_FORM_strp
    DW_AT_byte_size    DW_FORM_data1
    DW_AT_decl_file    DW_FORM_data1
    DW_AT_decl_line    DW_FORM_data1
    DW_AT_decl_column  DW_FORM_data1
    DW_AT_sibling      DW_FORM_ref4
    DW_AT value: 0     DW_FORM value: 0
   7      DW_TAG_member    [no children]
    DW_AT_name         DW_FORM_strp
    DW_AT_decl_file    DW_FORM_data1
    DW_AT_decl_line    DW_FORM_data1
    DW_AT_decl_column  DW_FORM_data1
    DW_AT_type         DW_FORM_ref4
    DW_AT_data_member_location DW_FORM_block1
    DW_AT value: 0     DW_FORM value: 0
   8      DW_TAG_member    [no children]
    DW_AT_name         DW_FORM_strp
    DW_AT_decl_file    DW_FORM_data1
    DW_AT_decl_line    DW_FORM_data1
    DW_AT_decl_column  DW_FORM_data1
    DW_AT_type         DW_FORM_ref4
    DW_AT_byte_size    DW_FORM_data1
    DW_AT_bit_size     DW_FORM_data1
    DW_AT_bit_offset   DW_FORM_data1
    DW_AT_data_member_location DW_FORM_block1
    DW_AT value: 0     DW_FORM value: 0
   9      DW_TAG_array_type    [has children]
    DW_AT_type         DW_FORM_ref4
    DW_AT_sibling      DW_FORM_ref4
    DW_AT value: 0     DW_FORM value: 0
   10      DW_TAG_subrange_type    [no children]
    DW_AT_type         DW_FORM_ref4
    DW_AT_upper_bound  DW_FORM_data1
    DW_AT value: 0     DW_FORM value: 0
   11      DW_TAG_variable    [no children]
    DW_AT_name         DW_FORM_strp
    DW_AT_decl_file    DW_FORM_data1
    DW_AT_decl_line    DW_FORM_data1
    DW_AT_decl_column  DW_FORM_data1
    DW_AT_type         DW_FORM_ref4
    DW_AT_external     DW_FORM_flag
    DW_AT_declaration  DW_FORM_flag
    DW_AT value: 0     DW_FORM value: 0
   12      DW_TAG_subrange_type    [no children]
    DW_AT value: 0     DW_FORM value: 0
   13      DW_TAG_variable    [no children]
    DW_AT_name         DW_FORM_strp
    DW_AT_decl_file    DW_FORM_data1
    DW_AT_decl_line    DW_FORM_data2
    DW_AT_decl_column  DW_FORM_data1
    DW_AT_type         DW_FORM_ref4
    DW_AT_external     DW_FORM_flag
    DW_AT_declaration  DW_FORM_flag
    DW_AT value: 0     DW_FORM value: 0
   14      DW_TAG_subroutine_type    [has children]
    DW_AT_sibling      DW_FORM_ref4
    DW_AT value: 0     DW_FORM value: 0
   15      DW_TAG_unspecified_parameters    [no children]
    DW_AT value: 0     DW_FORM value: 0
   16      DW_TAG_variable    [no children]
    DW_AT_name         DW_FORM_strp
    DW_AT_decl_file    DW_FORM_data1
    DW_AT_decl_line    DW_FORM_data1
    DW_AT_decl_column  DW_FORM_data1
    DW_AT_type         DW_FORM_ref4
    DW_AT_external     DW_FORM_flag
    DW_AT_location     DW_FORM_block1
    DW_AT value: 0     DW_FORM value: 0
   17      DW_TAG_subprogram    [has children]
    DW_AT_external     DW_FORM_flag
    DW_AT_name         DW_FORM_strp
    DW_AT_decl_file    DW_FORM_data1
    DW_AT_decl_line    DW_FORM_data1
    DW_AT_decl_column  DW_FORM_data1
    DW_AT_low_pc       DW_FORM_addr
    DW_AT_high_pc      DW_FORM_addr
    DW_AT_frame_base   DW_FORM_block1
    DW_AT_GNU_all_call_sites DW_FORM_flag
    DW_AT_sibling      DW_FORM_ref4
    DW_AT value: 0     DW_FORM value: 0
   18      DW_TAG_GNU_call_site    [has children]
    DW_AT_low_pc       DW_FORM_addr
    DW_AT_GNU_tail_call DW_FORM_flag
    DW_AT_abstract_origin DW_FORM_ref4
    DW_AT value: 0     DW_FORM value: 0
   19      DW_TAG_GNU_call_site_parameter    [no children]
    DW_AT_location     DW_FORM_block1
    DW_AT_GNU_call_site_value DW_FORM_block1
    DW_AT value: 0     DW_FORM value: 0
   20      DW_TAG_subprogram    [no children]
    DW_AT_external     DW_FORM_flag
    DW_AT_declaration  DW_FORM_flag
    DW_AT_MIPS_linkage_name DW_FORM_strp
    DW_AT_name         DW_FORM_strp
    DW_AT_decl_file    DW_FORM_data1
    DW_AT_decl_line    DW_FORM_data1
    DW_AT_decl_column  DW_FORM_data1
    DW_AT value: 0     DW_FORM value: 0

Contents of the .debug_aranges section:

  Length:                   28
  Version:                  2
  Offset into .debug_info:  0x0
  Pointer Size:             4
  Segment Size:             0

    Address    Length
    00000000 00000014 
    00000000 00000000 

Raw dump of debug contents of section .debug_line:

  Offset:                      0x0
  Length:                      290
  DWARF Version:               2
  Prologue Length:             266
  Minimum Instruction Length:  4
  Initial value of 'is_stmt':  1
  Line Base:                   -5
  Line Range:                  14
  Opcode Base:                 13

 Opcodes:
  Opcode 1 has 0 args
  Opcode 2 has 1 args
  Opcode 3 has 1 args
  Opcode 4 has 1 args
  Opcode 5 has 1 args
  Opcode 6 has 0 args
  Opcode 7 has 0 args
  Opcode 8 has 0 args
  Opcode 9 has 1 args
  Opcode 10 has 0 args
  Opcode 11 has 0 args
  Opcode 12 has 1 args

 The Directory Table (offset 0x1b):
  1     /export/home/amandeep
  2     /usr/include
  3     /usr/gnu/lib/gcc/sparc-sun-solaris2.10/8.2.1/include-fixed/iso
  4     /usr/gnu/lib/gcc/sparc-sun-solaris2.10/8.2.1/include-fixed

 The File Name Table (offset 0xb9):
  Entry Dir     Time    Size    Name
  1     1       0       0       abc.go
  2     2       0       0       stdio_impl.h
  3     2       0       0       stdio_tag.h
  4     3       0       0       stdio_iso.h
  5     4       0       0       stdio.h
  6     0       0       0       cgo-dwarf-inference

 Line Number Statements:
  [0x00000114]  Set column to 14
  [0x00000116]  Extended opcode 2: set Address to 0x0
  [0x0000011d]  Special opcode 10: advance Address by 0 to 0x0 and Line by 5 to 6
  [0x0000011e]  Set column to 5
  [0x00000120]  Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 7
  [0x00000121]  Advance PC by 20 to 0x14
  [0x00000123]  Extended opcode 1: End of Sequence


Contents of the .debug_str section:

  0x00000000 5f5f6578 74656e64 65646664 005f5f63 __extendedfd.__c
  0x00000010 676f6465 6275675f 666c6f61 7473005f godebug_floats._
  0x00000020 5f46494c 45005f5f 696f6200 5f666c61 _FILE.__iob._fla
  0x00000030 67006f70 74657272 0046494c 45005f73 g.opterr.FILE._s
  0x00000040 6f627566 006f7074 6f707400 5f627566 obuf.optopt._buf
  0x00000050 656e6474 6162005f 5f6f7269 656e7461 endtab.__orienta
  0x00000060 74696f6e 005f5f69 6f6e6f6c 6f636b00 tion.__ionolock.
  0x00000070 74657374 63006f70 74696e64 00756e73 testc.optind.uns
  0x00000080 69676e65 64206368 6172005f 5f736565 igned char.__see
  0x00000090 6b61626c 6500646f 75626c65 00474e55 kable.double.GNU
  0x000000a0 20433137 20382e32 2e312032 30313830  C17 8.2.1 20180
  0x000000b0 38313320 2d6d6370 753d7639 202d6764 813 -mcpu=v9 -gd
  0x000000c0 77617266 2d32202d 67202d4f 32005f5f warf-2 -g -O2.__
  0x000000d0 63676f64 65627567 5f696e74 73005f70 cgodebug_ints._p
  0x000000e0 74720075 6e736967 6e656420 696e7400 tr.unsigned int.
  0x000000f0 6f707461 7267005f 5f66696c 6c657200 optarg.__filler.
  0x00000100 63686172 005f6669 6c65002f 6578706f char._file./expo
  0x00000110 72742f68 6f6d652f 616d616e 64656570 rt/home/amandeep
  0x00000120 006c6f6e 67206c6f 6e672069 6e740070 .long long int.p
  0x00000130 72696e74 66005f5f 63676f5f 5f30006c rintf.__cgo__0.l
  0x00000140 6f6e6720 696e7400 5f636e74 006c6f6e ong int._cnt.lon
  0x00000150 6720646f 75626c65 002f746d 702f6367 g double./tmp/cg
  0x00000160 6f2d6763 632d696e 7075742d 31373730 o-gcc-input-1770
  0x00000170 32303237 302e6300 5f6c6173 74627566 20270.c._lastbuf
  0x00000180 005f6261 7365005f 5f78665f 6e6f6368 ._base.__xf_noch
  0x00000190 65636b00 5f736962 756600            eck._sibuf.
@tklauser

This comment has been minimized.

Copy link
Member

commented Sep 25, 2018

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2018

From the mailing list, this is 32-bit SPARC, and the problem may be that there is no applyRelocationsSPARC method on the *File type in the debug/elf package. There is a applyRelocationsSPARC64 but there is no 32-bit implementation.

@amandeepgautam

This comment has been minimized.

Copy link
Author

commented Sep 26, 2018

Hi @ianlancetaylor, I just looked at the source and found that the implementation exists: https://github.com/golang/gofrontend/blob/7b25b4dff4778fc4d6b5d6e10594814146b3e5dd/libgo/go/debug/elf/file.go#L1073

Am I missing something?

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Sep 26, 2018

I'm sorry, you're quite right. I was looking in the gc sources, but you are using gccgo. The function is there in gccgo.

I'm not sure what is happening here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.