gccgo:在Solaris 10上cgo无法工作

carvr3hs  于 8个月前  发布在  Go
关注(0)|答案(5)|浏览(201)

你使用的Go版本是什么( go version )?

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

这个问题在最新版本中是否会重现?

是的。从源代码编译

你正在使用什么操作系统和处理器架构( go env )?

  1. GOARCH="sparc"
  2. GOBIN=""
  3. GOCACHE="/export/home/amandeep/.cache/go-build"
  4. GOEXE=""
  5. GOHOSTARCH="sparc"
  6. GOHOSTOS="solaris"
  7. GOOS="solaris"
  8. GOPATH="/opt/go_pkgs"
  9. GORACE=""
  10. GOROOT="/usr/gnu"
  11. GOTMPDIR=""
  12. GOTOOLDIR="/usr/gnu/libexec/gcc/sparc-sun-solaris2.10/8.2.1"
  13. GCCGO="/usr/gnu/bin/gccgo"
  14. CC="gcc"
  15. CXX="g++"
  16. CGO_ENABLED="1"
  17. CGO_CFLAGS="-g -O2"
  18. CGO_CPPFLAGS=""
  19. CGO_CXXFLAGS="-g -O2"
  20. CGO_FFLAGS="-g -O2"
  21. CGO_LDFLAGS="-g -O2"
  22. PKG_CONFIG="pkg-config"
  23. GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build699772262=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

你做了什么?

尝试编译一个简单的程序:

  1. package main
  2. /*
  3. #include <stdio.h>
  4. void testc() {
  5. printf("Hello cgo");
  6. }
  7. */
  8. import "C"
  9. func main() {
  10. C.testc()
  11. }

你看到了什么?

编译失败,错误信息为:
./abc.go:13:5: 调用非函数C.testc

wpcxdonn

wpcxdonn1#

包括一些相关的输出(如在此处的线程中讨论的):

  1. amandeep@s10ldom2:~$ go build -x abc.go
  2. WORK=/tmp/go-build355496252
  3. mkdir -p $WORK/b001/
  4. cd $WORK
  5. /usr/gnu/bin/gccgo -fsplit-stack -c -x c - || true
  6. cd /export/home/amandeep
  7. 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
  8. # command-line-arguments
  9. ./abc.go:13:5: call of non-function C.testc
  1. 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
  2. $ gcc -E -dM -xc -I /b001/ -g -O2 - <<EOF
  3. #line 1 "cgo-builtin-prolog"
  4. #include <stddef.h> /* for ptrdiff_t and size_t below */
  5. /* Define intgo when compiling with GCC. */
  6. typedef ptrdiff_t intgo;
  7. typedef struct { const char *p; intgo n; } _GoString_;
  8. typedef struct { char *p; intgo n; intgo c; } _GoBytes_;
  9. _GoString_ GoString(char *p);
  10. _GoString_ GoStringN(char *p, int l);
  11. _GoBytes_ GoBytes(void *p, int n);
  12. char *CString(_GoString_);
  13. void *CBytes(_GoBytes_);
  14. void *_CMalloc(size_t);
  15. __attribute__ ((unused))
  16. static size_t _GoStringLen(_GoString_ s) { return s.n; }
  17. __attribute__ ((unused))
  18. static const char *_GoStringPtr(_GoString_ s) { return s.p; }
  19. #line 3 "/export/home/amandeep/abc.go"
  20. #include <stdio.h>
  21. void testc() {
  22. printf("Hello cgo");
  23. }
  24. #line 1 "cgo-generated-wrapper"
  25. EOF
  26. #define __DBL_MIN_EXP__ (-1021)
  27. #define __FLT32X_MAX_EXP__ 1024
  28. #define _SYS_FEATURE_TESTS_H
  29. #define __UINT_LEAST16_MAX__ 0xffff
  30. #define __ATOMIC_ACQUIRE 2
  31. #define __FLT128_MAX_10_EXP__ 4932
  32. #define __sun_attr___packed__ __attribute__((__packed__))
  33. #define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F
  34. #define __GCC_IEC_559_COMPLEX 2
  35. #define __UINT_LEAST8_TYPE__ unsigned char
  36. #define _T_WCHAR_
  37. #define __INTMAX_C(c) c ## LL
  38. #define __CHAR_BIT__ 8
  39. #define __UINT8_MAX__ 0xff
  40. #define __sun_attr___VPRINTFLIKE__(__n) __attribute__((__format__(printf, __n, 0)))
  41. #define _FILEDEFED
  42. #define __WINT_MAX__ 0x7fffffffL
  43. #define __FLT32_MIN_EXP__ (-125)
  44. #define stderr (&__iob[2])
  45. #define __ORDER_LITTLE_ENDIAN__ 1234
  46. #define __SIZE_MAX__ 0xffffffffU
  47. #define __WCHAR_MAX__ 0x7fffffffL
  48. #define _LONG_LONG_ALIGNMENT 8
  49. #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
  50. #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
  51. #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
  52. #define __DBL_DENORM_MIN__ ((double)4.94065645841246544176568792868221372e-324L)
  53. #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
  54. #define __GCC_ATOMIC_CHAR_LOCK_FREE 2
  55. #define _OBP
  56. #define __GCC_IEC_559 2
  57. #define __FLT32X_DECIMAL_DIG__ 17
  58. #define _IOFBF 0000
  59. #define __sun_attr___pure__ __attribute__((__pure__))
  60. #define __FLT_EVAL_METHOD__ 0
  61. #define __unix__ 1
  62. #define __FLT64_DECIMAL_DIG__ 17
  63. #define _XOPEN_VERSION 3
  64. #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
  65. #define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
  66. #define __SIG_ATOMIC_TYPE__ int
  67. #define __DBL_MIN_10_EXP__ (-307)
  68. #define __FINITE_MATH_ONLY__ 0
  69. #define L_cuserid 9
  70. #define ___sun_attr_inner(__a) __sun_attr_ ##__a
  71. #define __sun_attr___noreturn__ __attribute__((__noreturn__))
  72. #define __GNUC_PATCHLEVEL__ 1
  73. #define __FLT32_HAS_DENORM__ 1
  74. #define __UINT_FAST8_MAX__ 0xff
  75. #define __has_include(STR) __has_include__(STR)
  76. #define __size_t
  77. #define __DEC64_MAX_EXP__ 385
  78. #define _WCHAR_T_DEFINED
  79. #define __INT8_C(c) c
  80. #define __INT_LEAST8_WIDTH__ 8
  81. #define sparc 1
  82. #define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
  83. #define __sun_attr__(__a) ___sun_attr_inner __a
  84. #define __SHRT_MAX__ 0x7fff
  85. #define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L
  86. #define __FLT64X_MAX_10_EXP__ 4932
  87. #define __UINT_LEAST8_MAX__ 0xff
  88. #define __GCC_ATOMIC_BOOL_LOCK_FREE 2
  89. #define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
  90. #define __UINTMAX_TYPE__ long long unsigned int
  91. #define __DEC32_EPSILON__ 1E-6DF
  92. #define __FLT_EVAL_METHOD_TS_18661_3__ 0
  93. #define __OPTIMIZE__ 1
  94. #define putchar(x) putc((x), stdout)
  95. #define __unix 1
  96. #define __UINT32_MAX__ 0xffffffffU
  97. #define __SIZE_T
  98. #define __LDBL_MAX_EXP__ 16384
  99. #define __FLT128_MIN_EXP__ (-16381)
  100. #define __WINT_MIN__ (-__WINT_MAX__ - 1)
  101. #define __sun 1
  102. #define __FLT128_MIN_10_EXP__ (-4931)
  103. #define __INT_LEAST16_WIDTH__ 16
  104. #define _SIZE_T_DEFINED_
  105. #define __SCHAR_MAX__ 0x7f
  106. #define _LONG_ALIGNMENT 4
  107. #define __FLT128_MANT_DIG__ 113
  108. #define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
  109. #define __INT64_C(c) c ## LL
  110. #define _INT_ALIGNMENT 4
  111. #define __DBL_DIG__ 15
  112. #define __GCC_ATOMIC_POINTER_LOCK_FREE 2
  113. #define __FLT64X_MANT_DIG__ 113
  114. #define _SYS_CCOMPILE_H
  115. #define getchar() getc(stdin)
  116. #define __SIZEOF_INT__ 4
  117. #define __SIZEOF_POINTER__ 4
  118. #define clearerr(p) ((void)((p)->_flag &= ~(_IOERR | _IOEOF)))
  119. #define _DOUBLE_COMPLEX_ALIGNMENT 8
  120. #define __USER_LABEL_PREFIX__
  121. #define __FLT64X_EPSILON__ 1.92592994438723585305597794258492732e-34F64x
  122. #define __STDC_HOSTED__ 1
  123. #define __LDBL_HAS_INFINITY__ 1
  124. #define _BSD_SIZE_T_DEFINED_
  125. #define __FLT32_DIG__ 6
  126. #define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
  127. #define __SHRT_WIDTH__ 16
  128. #define TMP_MAX 17576
  129. #define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
  130. #define __STDC_UTF_16__ 1
  131. #define __DEC32_MAX__ 9.999999E96DF
  132. #define _WCHAR_T_
  133. #define __FLT64X_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F64x
  134. #define _STDDEF_H
  135. #define __FLT32X_HAS_INFINITY__ 1
  136. #define __INT32_MAX__ 0x7fffffff
  137. #define __INT_WIDTH__ 32
  138. #define __SIZEOF_LONG__ 4
  139. #define _IONBF 0004
  140. #define __UINT16_C(c) c
  141. #define __PTRDIFF_WIDTH__ 32
  142. #define __DECIMAL_DIG__ 36
  143. #define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
  144. #define __INTMAX_WIDTH__ 64
  145. #define _LARGEFILE_SOURCE 1
  146. #define __has_include_next(STR) __has_include_next__(STR)
  147. #define __FLT64X_MIN_10_EXP__ (-4931)
  148. #define __LDBL_HAS_QUIET_NAN__ 1
  149. #define __FLT64_MANT_DIG__ 53
  150. #define __va_ptr_base void
  151. #define L_tmpnam 25
  152. #define ___int_wchar_t_h
  153. #define _T_PTRDIFF
  154. #define __GNUC__ 8
  155. #define __sun_attr___KVPRINTFLIKE__(__n) __attribute__((__format__(cmn_err, __n, 0)))
  156. #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
  157. #define L_ctermid 9
  158. #define __FLT_HAS_DENORM__ 1
  159. #define __SIZEOF_LONG_DOUBLE__ 16
  160. #define SEEK_CUR 1
  161. #define __BIGGEST_ALIGNMENT__ 8
  162. #define __FLT64_MAX_10_EXP__ 308
  163. #define __sun_attr___KPRINTFLIKE__(__n) __attribute__((__format__(cmn_err, __n, (__n)+1)))
  164. #define __va_void(expr) ((void)expr)
  165. #define _STDIO_H
  166. #define __DBL_MAX__ ((double)1.79769313486231570814527423731704357e+308L)
  167. #define __INT_FAST32_MAX__ 0x7fffffff
  168. #define __DBL_HAS_INFINITY__ 1
  169. #define stdin (&__iob[0])
  170. #define __SVR4 1
  171. #define __DEC32_MIN_EXP__ (-94)
  172. #define __INTPTR_WIDTH__ 32
  173. #define _LONG_LONG_HTOL
  174. #define __FLT32X_HAS_DENORM__ 1
  175. #define __INT_FAST16_TYPE__ int
  176. #define _SIZE_T_DEFINED
  177. #define _SUNOS_VTOC_8
  178. #define _WCHAR_T_DEFINED_
  179. #define _NFILE 20
  180. #define __LDBL_HAS_DENORM__ 1
  181. #define _STDIO_IMPL_H
  182. #define __va_alist_type int
  183. #define __FLT128_HAS_INFINITY__ 1
  184. #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
  185. #define __INT_LEAST32_MAX__ 0x7fffffff
  186. #define _LONG_LONG_ALIGNMENT_32 _LONG_LONG_ALIGNMENT
  187. #define __DEC32_MIN__ 1E-95DF
  188. #define __DBL_MAX_EXP__ 1024
  189. #define __WCHAR_WIDTH__ 32
  190. #define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
  191. #define __DEC128_EPSILON__ 1E-33DL
  192. #define __PTRDIFF_MAX__ 0x7fffffff
  193. #define _STDIO_TAG_H
  194. #define _PTRDIFF_T_DECLARED
  195. #define __FLT32_HAS_QUIET_NAN__ 1
  196. #define _T_WCHAR
  197. #define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
  198. #define __SIZEOF_SIZE_T__ 4
  199. #define _WCHAR_T
  200. #define __KVPRINTFLIKE(__n) __sun_attr__((__KVPRINTFLIKE__(__n)))
  201. #define __sparc__ 1
  202. #define __FLT64X_MIN_EXP__ (-16381)
  203. #define __SIZEOF_WINT_T__ 4
  204. #define __LONG_LONG_WIDTH__ 64
  205. #define _GCC_WCHAR_T
  206. #define __FLT32_MAX_EXP__ 128
  207. #define _PTRDIFF_T
  208. #define __GXX_ABI_VERSION 1013
  209. #define __sun_attr___PRINTFLIKE__(__n) __attribute__((__format__(printf, __n, (__n)+1)))
  210. #define __FLT_MIN_EXP__ (-125)
  211. #define __PTRDIFF_T
  212. #define __FLT64X_HAS_QUIET_NAN__ 1
  213. #define __INT_FAST64_TYPE__ long long int
  214. #define _LONGLONG_TYPE
  215. #define __FILE_TAG __FILE
  216. #define ferror(p) ((p)->_flag & _IOERR)
  217. #define _ANSI_STDDEF_H
  218. #define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
  219. #define __DBL_MIN__ ((double)2.22507385850720138309023271733240406e-308L)
  220. #define _ALIGNMENT_REQUIRED 1
  221. #define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
  222. #define _ISO_STDIO_ISO_H
  223. #define __FLT64_MIN_EXP__ (-1021)
  224. #define _RESTRICT_KYWD restrict
  225. #define _SYS_ISA_DEFS_H
  226. #define __FLT64_MIN_10_EXP__ (-307)
  227. #define _IOREAD 0001
  228. #define __FLT64X_DECIMAL_DIG__ 36
  229. #define __DEC128_MIN__ 1E-6143DL
  230. #define __REGISTER_PREFIX__
  231. #define __UINT16_MAX__ 0xffff
  232. #define _LONG_DOUBLE_ALIGNMENT 8
  233. #define __DBL_HAS_DENORM__ 1
  234. #define _IOMYBUF 0010
  235. #define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
  236. #define __UINT8_TYPE__ unsigned char
  237. #define __sparcv8 1
  238. #define __sun_attr___const__ __attribute__((__const__))
  239. #define __FLT_MANT_DIG__ 24
  240. #define __LDBL_DECIMAL_DIG__ 36
  241. #define __VERSION__ "8.2.1 20180813"
  242. #define __UINT64_C(c) c ## ULL
  243. #define _PTRDIFF_T_
  244. #define __INT_WCHAR_T_H
  245. #define _BIT_FIELDS_HTOL
  246. #define __GCC_ATOMIC_INT_LOCK_FREE 2
  247. #define _NO_FDISK_PRESENT
  248. #define _T_PTRDIFF_
  249. #define __FLT128_MAX_EXP__ 16384
  250. #define __FLT32_MANT_DIG__ 24
  251. #define _SYS_SIZE_T_H
  252. #define _OFF_T
  253. #define __FLOAT_WORD_ORDER__ __ORDER_BIG_ENDIAN__
  254. #define __SIZE_T__
  255. #define _CHAR_ALIGNMENT 1
  256. #define __FLT128_HAS_DENORM__ 1
  257. #define __sparc 1
  258. #define __FLT128_DIG__ 33
  259. #define __SCHAR_WIDTH__ 8
  260. #define __INT32_C(c) c
  261. #define __DEC64_EPSILON__ 1E-15DD
  262. #define __ORDER_PDP_ENDIAN__ 3412
  263. #define __DEC128_MIN_EXP__ (-6142)
  264. #define __FLT32_MAX_10_EXP__ 38
  265. #define sun 1
  266. #define __INT_FAST32_TYPE__ int
  267. #define __UINT_LEAST16_TYPE__ short unsigned int
  268. #define __FLT64X_HAS_INFINITY__ 1
  269. #define unix 1
  270. #define __INT16_MAX__ 0x7fff
  271. #define _BSD_SIZE_T_
  272. #define __SIZE_TYPE__ unsigned int
  273. #define __UINT64_MAX__ 0xffffffffffffffffULL
  274. #define _SIZE_T_DECLARED
  275. #define _ISO_STDIO_C99_H
  276. #define _FLOAT_ALIGNMENT 4
  277. #define __FLT64X_DIG__ 33
  278. #define __INT8_TYPE__ char
  279. #define _IORW 0200
  280. #define __ELF__ 1
  281. #define _FLOAT_COMPLEX_ALIGNMENT 4
  282. #define __FLT_RADIX__ 2
  283. #define __INT_LEAST16_TYPE__ short int
  284. #define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L
  285. #define __UINTMAX_C(c) c ## ULL
  286. #define __SIG_ATOMIC_MAX__ 0x7fffffff
  287. #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
  288. #define _BOOL_ALIGNMENT 1
  289. #define __SIZEOF_PTRDIFF_T__ 4
  290. #define SEEK_SET 0
  291. #define _HAVE_TEM_FIRMWARE
  292. #define _SYS_VA_LIST_H
  293. #define _STDC_C99
  294. #define __FLT32X_MANT_DIG__ 53
  295. #define _SIZE_T_
  296. #define __FLT32X_MIN_EXP__ (-1021)
  297. #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
  298. #define _WCHAR_T_H
  299. #define __INT_FAST16_MAX__ 0x7fffffff
  300. #define __FLT64_DIG__ 15
  301. #define __UINT_FAST32_MAX__ 0xffffffffU
  302. #define __UINT_LEAST64_TYPE__ long long unsigned int
  303. #define __FLT_HAS_QUIET_NAN__ 1
  304. #define _MAX_ALIGNMENT 8
  305. #define __FLT_MAX_10_EXP__ 38
  306. #define _POINTER_ALIGNMENT 4
  307. #define __LONG_MAX__ 0x7fffffffL
  308. #define __WCHAR_T__
  309. #define __FLT64X_HAS_DENORM__ 1
  310. #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
  311. #define __FLT_HAS_INFINITY__ 1
  312. #define _BSD_PTRDIFF_T_
  313. #define _ILP32
  314. #define __UINT_FAST16_TYPE__ unsigned int
  315. #define __DEC64_MAX__ 9.999999999999999E384DD
  316. #define __INT_FAST32_WIDTH__ 32
  317. #define NULL ((void *)0)
  318. #define __CHAR16_TYPE__ short unsigned int
  319. #define __PRAGMA_REDEFINE_EXTNAME 1
  320. #define __SIZE_WIDTH__ 32
  321. #define __INT_LEAST16_MAX__ 0x7fff
  322. #define __DEC64_MANT_DIG__ 16
  323. #define __INT64_MAX__ 0x7fffffffffffffffLL
  324. #define __UINT_LEAST32_MAX__ 0xffffffffU
  325. #define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
  326. #define __GCC_ATOMIC_LONG_LOCK_FREE 2
  327. #define __SIG_ATOMIC_WIDTH__ 32
  328. #define __INT_LEAST64_TYPE__ long long int
  329. #define __INT16_TYPE__ short int
  330. #define __INT_LEAST8_TYPE__ char
  331. #define __STDC_VERSION__ 201710L
  332. #define __DEC32_MAX_EXP__ 97
  333. #define _BIG_ENDIAN
  334. #define __INT_FAST8_MAX__ 0x7f
  335. #define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
  336. #define __INTPTR_MAX__ 0x7fffffff
  337. #define __FLT64_HAS_QUIET_NAN__ 1
  338. #define _IOLBF 0100
  339. #define __FLT32_MIN_10_EXP__ (-37)
  340. #define __FLT32X_DIG__ 15
  341. #define __LDBL_MANT_DIG__ 113
  342. #define __DBL_HAS_QUIET_NAN__ 1
  343. #define __FLT64_HAS_INFINITY__ 1
  344. #define __FLT64X_MAX__ 1.18973149535723176508575932662800702e+4932F64x
  345. #define __GNUC_VA_LIST
  346. #define _GCC_MAX_ALIGN_T
  347. #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
  348. #define _DOUBLE_ALIGNMENT 8
  349. #define _SHORT_ALIGNMENT 2
  350. #define FILENAME_MAX 1024
  351. #define __VPRINTFLIKE(__n) __sun_attr__((__VPRINTFLIKE__(__n)))
  352. #define __INTPTR_TYPE__ int
  353. #define __UINT16_TYPE__ short unsigned int
  354. #define __WCHAR_TYPE__ long int
  355. #define __SIZEOF_FLOAT__ 4
  356. #define __UINTPTR_MAX__ 0xffffffffU
  357. #define getc(p) (--(p)->_cnt < 0 ? __filbuf(p) : (int)*(p)->_ptr++)
  358. #define __INT_FAST64_WIDTH__ 64
  359. #define __DEC64_MIN_EXP__ (-382)
  360. #define putc(x,p) (--(p)->_cnt < 0 ? __flsbuf((x), (p)) : (int)(*(p)->_ptr++ = (unsigned char) (x)))
  361. #define __FLT32_DECIMAL_DIG__ 9
  362. #define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
  363. #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 255
  364. #define BUFSIZ 1024
  365. #define __FLT_DIG__ 6
  366. #define __FLT32_HAS_INFINITY__ 1
  367. #define __FLT64X_MAX_EXP__ 16384
  368. #define _IEEE_754
  369. #define _WCHAR_T_DECLARED
  370. #define __UINT_FAST64_TYPE__ long long unsigned int
  371. #define __INT_MAX__ 0x7fffffff
  372. #define _DTRACE_VERSION 1
  373. #define _T_SIZE_
  374. #define feof(p) ((p)->_flag & _IOEOF)
  375. #define __INT64_TYPE__ long long int
  376. #define __FLT_MAX_EXP__ 128
  377. #define __DBL_MANT_DIG__ 53
  378. #define ___int_size_t_h
  379. #define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
  380. #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
  381. #define _IOWRT 0002
  382. #define __DEC64_MIN__ 1E-383DD
  383. #define __WINT_TYPE__ long int
  384. #define __UINT_LEAST32_TYPE__ unsigned int
  385. #define __SIZEOF_SHORT__ 2
  386. #define __LDBL_MIN_EXP__ (-16381)
  387. #define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
  388. #define stdout (&__iob[1])
  389. #define __WINT_WIDTH__ 32
  390. #define EOF (-1)
  391. #define __INT_LEAST8_MAX__ 0x7f
  392. #define __KPRINTFLIKE(__n) __sun_attr__((__KPRINTFLIKE__(__n)))
  393. #define __FLT32X_MAX_10_EXP__ 308
  394. #define _CHAR_IS_SIGNED
  395. #define __LDBL_MAX_10_EXP__ 4932
  396. #define __ATOMIC_RELAXED 0
  397. #define __DBL_EPSILON__ ((double)2.22044604925031308084726333618164062e-16L)
  398. #define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
  399. #define _SIZET_
  400. #define __UINT8_C(c) c
  401. #define __FLT64_MAX_EXP__ 1024
  402. #define _LONG_DOUBLE_COMPLEX_ALIGNMENT 8
  403. #define __INT_LEAST32_TYPE__ int
  404. #define __wchar_t__
  405. #define __sun__ 1
  406. #define SEEK_END 2
  407. #define __SIZEOF_WCHAR_T__ 4
  408. #define __UINT64_TYPE__ long long unsigned int
  409. #define _LARGEFILE64_SOURCE 1
  410. #define _STDDEF_H_
  411. #define __FLT128_HAS_QUIET_NAN__ 1
  412. #define __INT_FAST8_TYPE__ char
  413. #define _IOEOF 0020
  414. #define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
  415. #define __GNUC_STDC_INLINE__ 1
  416. #define P_tmpdir "/var/tmp/"
  417. #define __FLT64_HAS_DENORM__ 1
  418. #define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
  419. #define __DBL_DECIMAL_DIG__ 17
  420. #define __STDC_UTF_32__ 1
  421. #define _IOERR 0040
  422. #define __INT_FAST8_WIDTH__ 8
  423. #define __DEC_EVAL_METHOD__ 2
  424. #define _SIZE_T
  425. #define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
  426. #define FOPEN_MAX _NFILE
  427. #define __PRINTFLIKE(__n) __sun_attr__((__PRINTFLIKE__(__n)))
  428. #define _STACK_GROWS_DOWNWARD
  429. #define _FILE_OFFSET_BITS 32
  430. #define __svr4__ 1
  431. #define _GCC_SIZE_T
  432. #define __ORDER_BIG_ENDIAN__ 4321
  433. #define __UINT32_C(c) c ## U
  434. #define __INTMAX_MAX__ 0x7fffffffffffffffLL
  435. #define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
  436. #define __size_t__
  437. #define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
  438. #define __INT8_MAX__ 0x7f
  439. #define __LONG_WIDTH__ 32
  440. #define __UINT_FAST32_TYPE__ unsigned int
  441. #define __CHAR32_TYPE__ unsigned int
  442. #define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F
  443. #define __NORETURN __sun_attr__((__noreturn__))
  444. #define __INT32_TYPE__ int
  445. #define _DMA_USES_VIRTADDR
  446. #define __SIZEOF_DOUBLE__ 8
  447. #define __FLT_MIN_10_EXP__ (-37)
  448. #define _ISO_CPP_14882_1998
  449. #define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
  450. #define __INT_LEAST32_WIDTH__ 32
  451. #define __INTMAX_TYPE__ long long int
  452. #define __DEC128_MAX_EXP__ 6145
  453. #define _T_SIZE
  454. #define _ISO_C_9899_1999
  455. #define __FLT32X_HAS_QUIET_NAN__ 1
  456. #define __ATOMIC_CONSUME 1
  457. #define __GNUC_MINOR__ 2
  458. #define __INT_FAST16_WIDTH__ 32
  459. #define __UINTMAX_MAX__ 0xffffffffffffffffULL
  460. #define __DEC32_MANT_DIG__ 7
  461. #define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
  462. #define __DBL_MAX_10_EXP__ 308
  463. #define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
  464. #define __INT16_C(c) c
  465. #define __PTRDIFF_TYPE__ int
  466. #define __CONST __sun_attr__((__const__))
  467. #define __GNUC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
  468. #define __ATOMIC_SEQ_CST 5
  469. #define __UINT32_TYPE__ unsigned int
  470. #define __FLT32X_MIN_10_EXP__ (-307)
  471. #define __UINTPTR_TYPE__ unsigned int
  472. #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
  473. #define __DEC128_MANT_DIG__ 34
  474. #define __LDBL_MIN_10_EXP__ (-4931)
  475. #define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
  476. #define __SIZEOF_LONG_LONG__ 8
  477. #define _GCC_PTRDIFF_T
  478. #define _SBFSIZ 8
  479. #define __FLT128_DECIMAL_DIG__ 36
  480. #define __GCC_ATOMIC_LLONG_LOCK_FREE 2
  481. #define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
  482. #define __LDBL_DIG__ 33
  483. #define __FLT_DECIMAL_DIG__ 9
  484. #define __UINT_FAST16_MAX__ 0xffffffffU
  485. #define ___int_ptrdiff_t_h
  486. #define __GCC_ATOMIC_SHORT_LOCK_FREE 2
  487. #define __PURE __sun_attr__((__pure__))
  488. #define __INT_LEAST64_WIDTH__ 64
  489. #define __UINT_FAST8_TYPE__ unsigned char
  490. #define __ATOMIC_ACQ_REL 4
  491. #define __WCHAR_T
  492. #define __ATOMIC_RELEASE 3
  493. $ gcc -w -Wno-error -o/b001//_cgo_.o -gdwarf-2 -c -xc -I /b001/ -g - <<EOF
  494. #line 1 "cgo-builtin-prolog"
  495. #include <stddef.h> /* for ptrdiff_t and size_t below */
  496. /* Define intgo when compiling with GCC. */
  497. typedef ptrdiff_t intgo;
  498. typedef struct { const char *p; intgo n; } _GoString_;
  499. typedef struct { char *p; intgo n; intgo c; } _GoBytes_;
  500. _GoString_ GoString(char *p);
  501. _GoString_ GoStringN(char *p, int l);
  502. _GoBytes_ GoBytes(void *p, int n);
  503. char *CString(_GoString_);
  504. void *CBytes(_GoBytes_);
  505. void *_CMalloc(size_t);
  506. __attribute__ ((unused))
  507. static size_t _GoStringLen(_GoString_ s) { return s.n; }
  508. __attribute__ ((unused))
  509. static const char *_GoStringPtr(_GoString_ s) { return s.p; }
  510. #line 3 "/export/home/amandeep/abc.go"
  511. #include <stdio.h>
  512. void testc() {
  513. printf("Hello cgo");
  514. }
  515. #line 1 "cgo-generated-wrapper"
  516. #line 1 "not-declared"
  517. void __cgo_f_1_1(void) { __typeof__(testc) *__cgo_undefined__1; }
  518. #line 1 "not-type"
  519. void __cgo_f_1_2(void) { testc *__cgo_undefined__2; }
  520. #line 1 "not-int-const"
  521. void __cgo_f_1_3(void) { enum { __cgo_undefined__3 = (testc)*1 }; }
  522. #line 1 "not-num-const"
  523. void __cgo_f_1_4(void) { static const double __cgo_undefined__4 = (testc); }
  524. #line 1 "not-str-lit"
  525. void __cgo_f_1_5(void) { static const char __cgo_undefined__5[] = (testc); }
  526. #line 1 "completed"
  527. int __cgo__1 = __cgo__2;
  528. EOF
  529. not-type: In function '__cgo_f_1_2':
  530. not-type:1:33: error: '__cgo_undefined__2' undeclared (first use in this function); did you mean '__cgo_f_1_2'?
  531. not-type:1:33: note: each undeclared identifier is reported only once for each function it appears in
  532. not-int-const: In function '__cgo_f_1_3':
  533. not-int-const:1:61: error: invalid operands to binary * (have 'void (*)()' and 'int')
  534. not-num-const: In function '__cgo_f_1_4':
  535. not-num-const:1:67: error: incompatible types when initializing type 'double' using type 'void (*)()'
  536. not-str-lit: In function '__cgo_f_1_5':
  537. not-str-lit:1:67: error: invalid initializer
  538. completed: At top level:
  539. completed:1:16: error: '__cgo__2' undeclared here (not in a function); did you mean '__cgo__1'?
  540. completed:1:16: error: initializer element is not constant
  541. $ gcc -w -Wno-error -o/b001//_cgo_.o -gdwarf-2 -c -xc -I /b001/ -g -O2 - <<EOF
  542. #line 1 "cgo-builtin-prolog"
  543. #include <stddef.h> /* for ptrdiff_t and size_t below */
  544. /* Define intgo when compiling with GCC. */
  545. typedef ptrdiff_t intgo;
  546. typedef struct { const char *p; intgo n; } _GoString_;
  547. typedef struct { char *p; intgo n; intgo c; } _GoBytes_;
  548. _GoString_ GoString(char *p);
  549. _GoString_ GoStringN(char *p, int l);
  550. _GoBytes_ GoBytes(void *p, int n);
  551. char *CString(_GoString_);
  552. void *CBytes(_GoBytes_);
  553. void *_CMalloc(size_t);
  554. __attribute__ ((unused))
  555. static size_t _GoStringLen(_GoString_ s) { return s.n; }
  556. __attribute__ ((unused))
  557. static const char *_GoStringPtr(_GoString_ s) { return s.p; }
  558. #line 3 "/export/home/amandeep/abc.go"
  559. #include <stdio.h>
  560. void testc() {
  561. printf("Hello cgo");
  562. }
  563. #line 1 "cgo-generated-wrapper"
  564. #line 1 "cgo-dwarf-inference"
  565. __typeof__(testc) *__cgo__0;
  566. long long __cgodebug_ints[] = {
  567. 0,
  568. 1
  569. };
  570. double __cgodebug_floats[] = {
  571. 0,
  572. 1
  573. };
  574. EOF
  575. /export/home/amandeep/abc.go:13:5: call of non-function C.testc
  1. amandeep@s10ldom2:~$ /opt/csw/bin/greadelf --debug --all /b001/_cgo_.o
  2. ELF Header:
  3. Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
  4. Class: ELF32
  5. Data: 2's complement, big endian
  6. Version: 1 (current)
  7. OS/ABI: UNIX - System V
  8. ABI Version: 0
  9. Type: REL (Relocatable file)
  10. Machine: Sparc
  11. Version: 0x1
  12. Entry point address: 0x0
  13. Start of program headers: 0 (bytes into file)
  14. Start of section headers: 2036 (bytes into file)
  15. Flags: 0x0
  16. Size of this header: 52 (bytes)
  17. Size of program headers: 0 (bytes)
  18. Number of program headers: 0
  19. Size of section headers: 40 (bytes)
  20. Number of section headers: 20
  21. Section header string table index: 17
  22. Section Headers:
  23. [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
  24. [ 0] NULL 00000000 000000 000000 00 0 0 0
  25. [ 1] .text PROGBITS 00000000 000034 000014 00 AX 0 0 4
  26. [ 2] .rela.text RELA 00000000 000c88 000024 0c 18 1 4
  27. [ 3] .data PROGBITS 00000000 000048 000020 00 WA 0 0 8
  28. [ 4] .bss NOBITS 00000000 000068 000000 00 WA 0 0 1
  29. [ 5] .rodata.str1.8 PROGBITS 00000000 000068 000010 01 AMS 0 0 8
  30. [ 6] .debug_frame PROGBITS 00000000 000078 000020 00 0 0 4
  31. [ 7] .rela.debug_frame RELA 00000000 000cac 000018 0c 18 6 4
  32. [ 8] .debug_info PROGBITS 00000000 000098 000294 00 0 0 1
  33. [ 9] .rela.debug_info RELA 00000000 000cc4 00024c 0c 18 8 4
  34. [10] .debug_abbrev PROGBITS 00000000 00032c 00011f 00 0 0 1
  35. [11] .debug_aranges PROGBITS 00000000 00044b 000020 00 0 0 1
  36. [12] .rela.debug_arang RELA 00000000 000f10 000018 0c 18 11 4
  37. [13] .debug_line PROGBITS 00000000 00046b 000126 00 0 0 1
  38. [14] .rela.debug_line RELA 00000000 000f28 00000c 0c 18 13 4
  39. [15] .debug_str PROGBITS 00000000 000591 00019b 01 MS 0 0 1
  40. [16] .comment PROGBITS 00000000 00072c 00001b 01 MS 0 0 1
  41. [17] .shstrtab STRTAB 00000000 000747 0000aa 00 0 0 1
  42. [18] .symtab SYMTAB 00000000 000b14 000120 10 19 13 4
  43. [19] .strtab STRTAB 00000000 000c34 000053 00 0 0 1
  44. Key to Flags:
  45. W (write), A (alloc), X (execute), M (merge), S (strings)
  46. I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  47. O (extra OS processing required) o (OS specific), p (processor specific)
  48. There are no section groups in this file.
  49. There are no program headers in this file.
  50. Relocation section '.rela.text' at offset 0xc88 contains 3 entries:
  51. Offset Info Type Sym.Value Sym. Name + Addend
  52. 00000000 00000509 R_SPARC_HI22 00000000 .rodata.str1.8 + 0
  53. 00000004 0000050c R_SPARC_LO10 00000000 .rodata.str1.8 + 0
  54. 0000000c 00000e07 R_SPARC_WDISP30 00000000 printf + 0
  55. Relocation section '.rela.debug_frame' at offset 0xcac contains 2 entries:
  56. Offset Info Type Sym.Value Sym. Name + Addend
  57. 00000014 00000617 R_SPARC_UA32 00000000 .debug_frame + 0
  58. 00000018 00000217 R_SPARC_UA32 00000000 .text + 0
  59. Relocation section '.rela.debug_info' at offset 0xcc4 contains 49 entries:
  60. Offset Info Type Sym.Value Sym. Name + Addend
  61. 00000006 00000817 R_SPARC_UA32 00000000 .debug_abbrev + 0
  62. 0000000c 00000b17 R_SPARC_UA32 00000000 .debug_str + 9d
  63. 00000011 00000b17 R_SPARC_UA32 00000000 .debug_str + 159
  64. 00000015 00000b17 R_SPARC_UA32 00000000 .debug_str + 10b
  65. 00000019 00000217 R_SPARC_UA32 00000000 .text + 0
  66. 0000001d 00000217 R_SPARC_UA32 00000000 .text + 14
  67. 00000021 00000a17 R_SPARC_UA32 00000000 .debug_line + 0
  68. 0000002f 00000b17 R_SPARC_UA32 00000000 .debug_str + e3
  69. 00000036 00000b17 R_SPARC_UA32 00000000 .debug_str + 13f
  70. 0000003d 00000b17 R_SPARC_UA32 00000000 .debug_str + 121
  71. 00000044 00000b17 R_SPARC_UA32 00000000 .debug_str + 14d
  72. 0000004b 00000b17 R_SPARC_UA32 00000000 .debug_str + 100
  73. 00000056 00000b17 R_SPARC_UA32 00000000 .debug_str + 1f
  74. 00000062 00000b17 R_SPARC_UA32 00000000 .debug_str + 1f
  75. 0000006f 00000b17 R_SPARC_UA32 00000000 .debug_str + 148
  76. 0000007e 00000b17 R_SPARC_UA32 00000000 .debug_str + de
  77. 0000008d 00000b17 R_SPARC_UA32 00000000 .debug_str + 181
  78. 0000009c 00000b17 R_SPARC_UA32 00000000 .debug_str + 2c
  79. 000000ab 00000b17 R_SPARC_UA32 00000000 .debug_str + 105
  80. 000000ba 00000b17 R_SPARC_UA32 00000000 .debug_str + 57
  81. 000000cc 00000b17 R_SPARC_UA32 00000000 .debug_str + 65
  82. 000000de 00000b17 R_SPARC_UA32 00000000 .debug_str + 8b
  83. 000000f0 00000b17 R_SPARC_UA32 00000000 .debug_str + 0
  84. 00000102 00000b17 R_SPARC_UA32 00000000 .debug_str + 187
  85. 00000114 00000b17 R_SPARC_UA32 00000000 .debug_str + f7
  86. 0000012f 00000b17 R_SPARC_UA32 00000000 .debug_str + 7d
  87. 00000134 00000b17 R_SPARC_UA32 00000000 .debug_str + 39
  88. 00000150 00000b17 R_SPARC_UA32 00000000 .debug_str + 26
  89. 00000169 00000b17 R_SPARC_UA32 00000000 .debug_str + 194
  90. 00000177 00000b17 R_SPARC_UA32 00000000 .debug_str + 3e
  91. 00000190 00000b17 R_SPARC_UA32 00000000 .debug_str + 4c
  92. 0000019e 00000b17 R_SPARC_UA32 00000000 .debug_str + 178
  93. 000001b2 00000b17 R_SPARC_UA32 00000000 .debug_str + f0
  94. 000001c1 00000b17 R_SPARC_UA32 00000000 .debug_str + 76
  95. 000001d0 00000b17 R_SPARC_UA32 00000000 .debug_str + 32
  96. 000001df 00000b17 R_SPARC_UA32 00000000 .debug_str + 45
  97. 000001f5 00000b17 R_SPARC_UA32 00000000 .debug_str + 136
  98. 00000203 00001117 R_SPARC_UA32 00000004 __cgo__0 + 0
  99. 0000021e 00000b17 R_SPARC_UA32 00000000 .debug_str + ce
  100. 0000022c 00001017 R_SPARC_UA32 00000010 __cgodebug_ints + 0
  101. 00000243 00000b17 R_SPARC_UA32 00000000 .debug_str + 96
  102. 00000248 00000b17 R_SPARC_UA32 00000000 .debug_str + d
  103. 00000256 00000f17 R_SPARC_UA32 00000000 __cgodebug_floats + 0
  104. 0000025c 00000b17 R_SPARC_UA32 00000000 .debug_str + 70
  105. 00000263 00000217 R_SPARC_UA32 00000000 .text + 0
  106. 00000267 00000217 R_SPARC_UA32 00000000 .text + 14
  107. 00000274 00000217 R_SPARC_UA32 00000000 .text + 14
  108. 00000288 00000b17 R_SPARC_UA32 00000000 .debug_str + 12f
  109. 0000028c 00000b17 R_SPARC_UA32 00000000 .debug_str + 12f
  110. Relocation section '.rela.debug_aranges' at offset 0xf10 contains 2 entries:
  111. Offset Info Type Sym.Value Sym. Name + Addend
  112. 00000006 00000717 R_SPARC_UA32 00000000 .debug_info + 0
  113. 00000010 00000217 R_SPARC_UA32 00000000 .text + 0
  114. Relocation section '.rela.debug_line' at offset 0xf28 contains 1 entries:
  115. Offset Info Type Sym.Value Sym. Name + Addend
  116. 00000119 00000217 R_SPARC_UA32 00000000 .text + 0
  117. The decoding of unwind sections for machine type Sparc is not currently supported.
  118. Symbol table '.symtab' contains 18 entries:
  119. Num: Value Size Type Bind Vis Ndx Name
  120. 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
  121. 1: 00000000 0 FILE LOCAL DEFAULT ABS cgo-gcc-input-177020270.c
  122. 2: 00000000 0 SECTION LOCAL DEFAULT 1
  123. 3: 00000000 0 SECTION LOCAL DEFAULT 3
  124. 4: 00000000 0 SECTION LOCAL DEFAULT 4
  125. 5: 00000000 0 SECTION LOCAL DEFAULT 5
  126. 6: 00000000 0 SECTION LOCAL DEFAULT 6
  127. 7: 00000000 0 SECTION LOCAL DEFAULT 8
  128. 8: 00000000 0 SECTION LOCAL DEFAULT 10
  129. 9: 00000000 0 SECTION LOCAL DEFAULT 11
  130. 10: 00000000 0 SECTION LOCAL DEFAULT 13
  131. 11: 00000000 0 SECTION LOCAL DEFAULT 15
  132. 12: 00000000 0 SECTION LOCAL DEFAULT 16
  133. 13: 00000000 20 FUNC GLOBAL DEFAULT 1 testc
  134. 14: 00000000 0 NOTYPE GLOBAL DEFAULT UND printf
  135. 15: 00000000 16 OBJECT GLOBAL DEFAULT 3 __cgodebug_floats
  136. 16: 00000010 16 OBJECT GLOBAL DEFAULT 3 __cgodebug_ints
  137. 17: 00000004 4 OBJECT GLOBAL DEFAULT COM __cgo__0
  138. No version information found in this file.
  139. Contents of the .debug_frame section:
  140. 00000000 0000000c ffffffff CIE
  141. Version: 1
  142. Augmentation: ""
  143. Code alignment factor: 1
  144. Data alignment factor: -4
  145. Return address column: 15
  146. DW_CFA_def_cfa: r14 ofs 0
  147. 00000010 0000000c 00000000 FDE cie=00000000 pc=00000000..00000014
  148. Contents of the .debug_info section:
  149. Compilation Unit @ offset 0x0:
  150. Length: 0x290 (32-bit)
  151. Version: 2
  152. Abbrev Offset: 0x0
  153. Pointer Size: 4
  154. <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
  155. <c> DW_AT_producer : (indirect string, offset: 0x9d): GNU C17 8.2.1 20180813 -mcpu=v9 -gdwarf-2 -g -O2
  156. <10> DW_AT_language : 12 (ANSI C99)
  157. <11> DW_AT_name : (indirect string, offset: 0x159): /tmp/cgo-gcc-input-177020270.c
  158. <15> DW_AT_comp_dir : (indirect string, offset: 0x10b): /export/home/amandeep
  159. <19> DW_AT_low_pc : 0x0
  160. <1d> DW_AT_high_pc : 0x14
  161. <21> DW_AT_stmt_list : 0x0
  162. <1><25>: Abbrev Number: 2 (DW_TAG_base_type)
  163. <26> DW_AT_byte_size : 4
  164. <27> DW_AT_encoding : 5 (signed)
  165. <28> DW_AT_name : int
  166. <1><2c>: Abbrev Number: 3 (DW_TAG_base_type)
  167. <2d> DW_AT_byte_size : 4
  168. <2e> DW_AT_encoding : 7 (unsigned)
  169. <2f> DW_AT_name : (indirect string, offset: 0xe3): unsigned int
  170. <1><33>: Abbrev Number: 3 (DW_TAG_base_type)
  171. <34> DW_AT_byte_size : 4
  172. <35> DW_AT_encoding : 5 (signed)
  173. <36> DW_AT_name : (indirect string, offset: 0x13f): long int
  174. <1><3a>: Abbrev Number: 3 (DW_TAG_base_type)
  175. <3b> DW_AT_byte_size : 8
  176. <3c> DW_AT_encoding : 5 (signed)
  177. <3d> DW_AT_name : (indirect string, offset: 0x121): long long int
  178. <1><41>: Abbrev Number: 3 (DW_TAG_base_type)
  179. <42> DW_AT_byte_size : 16
  180. <43> DW_AT_encoding : 4 (float)
  181. <44> DW_AT_name : (indirect string, offset: 0x14d): long double
  182. <1><48>: Abbrev Number: 3 (DW_TAG_base_type)
  183. <49> DW_AT_byte_size : 1
  184. <4a> DW_AT_encoding : 6 (signed char)
  185. <4b> DW_AT_name : (indirect string, offset: 0x100): char
  186. <1><4f>: Abbrev Number: 4 (DW_TAG_pointer_type)
  187. <50> DW_AT_byte_size : 4
  188. <51> DW_AT_type : <0x48>
  189. <1><55>: Abbrev Number: 5 (DW_TAG_typedef)
  190. <56> DW_AT_name : (indirect string, offset: 0x1f): __FILE
  191. <5a> DW_AT_decl_file : 3
  192. <5b> DW_AT_decl_line : 21
  193. <5c> DW_AT_decl_column : 27
  194. <5d> DW_AT_type : <0x61>
  195. <1><61>: Abbrev Number: 6 (DW_TAG_structure_type)
  196. <62> DW_AT_name : (indirect string, offset: 0x1f): __FILE
  197. <66> DW_AT_byte_size : 16
  198. <67> DW_AT_decl_file : 2
  199. <68> DW_AT_decl_line : 29
  200. <69> DW_AT_decl_column : 8
  201. <6a> DW_AT_sibling : <0x126>
  202. <2><6e>: Abbrev Number: 7 (DW_TAG_member)
  203. <6f> DW_AT_name : (indirect string, offset: 0x148): _cnt
  204. <73> DW_AT_decl_file : 2
  205. <74> DW_AT_decl_line : 35
  206. <75> DW_AT_decl_column : 7
  207. <76> DW_AT_type : <0x25>
  208. <7a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0)
  209. <2><7d>: Abbrev Number: 7 (DW_TAG_member)
  210. <7e> DW_AT_name : (indirect string, offset: 0xde): _ptr
  211. <82> DW_AT_decl_file : 2
  212. <83> DW_AT_decl_line : 36
  213. <84> DW_AT_decl_column : 17
  214. <85> DW_AT_type : <0x126>
  215. <89> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4)
  216. <2><8c>: Abbrev Number: 7 (DW_TAG_member)
  217. <8d> DW_AT_name : (indirect string, offset: 0x181): _base
  218. <91> DW_AT_decl_file : 2
  219. <92> DW_AT_decl_line : 38
  220. <93> DW_AT_decl_column : 17
  221. <94> DW_AT_type : <0x126>
  222. <98> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8)
  223. <2><9b>: Abbrev Number: 7 (DW_TAG_member)
  224. <9c> DW_AT_name : (indirect string, offset: 0x2c): _flag
  225. <a0> DW_AT_decl_file : 2
  226. <a1> DW_AT_decl_line : 39
  227. <a2> DW_AT_decl_column : 16
  228. <a3> DW_AT_type : <0x12c>
  229. <a7> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12)
  230. <2><aa>: Abbrev Number: 7 (DW_TAG_member)
  231. <ab> DW_AT_name : (indirect string, offset: 0x105): _file
  232. <af> DW_AT_decl_file : 2
  233. <b0> DW_AT_decl_line : 40
  234. <b1> DW_AT_decl_column : 16
  235. <b2> DW_AT_type : <0x12c>
  236. <b6> DW_AT_data_member_location: 2 byte block: 23 d (DW_OP_plus_uconst: 13)
  237. <2><b9>: Abbrev Number: 8 (DW_TAG_member)
  238. <ba> DW_AT_name : (indirect string, offset: 0x57): __orientation
  239. <be> DW_AT_decl_file : 2
  240. <bf> DW_AT_decl_line : 42
  241. <c0> DW_AT_decl_column : 11
  242. <c1> DW_AT_type : <0x2c>
  243. <c5> DW_AT_byte_size : 4
  244. <c6> DW_AT_bit_size : 2
  245. <c7> DW_AT_bit_offset : 16
  246. <c8> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12)
  247. <2><cb>: Abbrev Number: 8 (DW_TAG_member)
  248. <cc> DW_AT_name : (indirect string, offset: 0x65): __ionolock
  249. <d0> DW_AT_decl_file : 2
  250. <d1> DW_AT_decl_line : 43
  251. <d2> DW_AT_decl_column : 11
  252. <d3> DW_AT_type : <0x2c>
  253. <d7> DW_AT_byte_size : 4
  254. <d8> DW_AT_bit_size : 1
  255. <d9> DW_AT_bit_offset : 18
  256. <da> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12)
  257. <2><dd>: Abbrev Number: 8 (DW_TAG_member)
  258. <de> DW_AT_name : (indirect string, offset: 0x8b): __seekable
  259. <e2> DW_AT_decl_file : 2
  260. <e3> DW_AT_decl_line : 44
  261. <e4> DW_AT_decl_column : 11
  262. <e5> DW_AT_type : <0x2c>
  263. <e9> DW_AT_byte_size : 4
  264. <ea> DW_AT_bit_size : 1
  265. <eb> DW_AT_bit_offset : 19
  266. <ec> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12)
  267. <2><ef>: Abbrev Number: 8 (DW_TAG_member)
  268. <f0> DW_AT_name : (indirect string, offset: 0x0): __extendedfd
  269. <f4> DW_AT_decl_file : 2
  270. <f5> DW_AT_decl_line : 45
  271. <f6> DW_AT_decl_column : 11
  272. <f7> DW_AT_type : <0x2c>
  273. <fb> DW_AT_byte_size : 4
  274. <fc> DW_AT_bit_size : 1
  275. <fd> DW_AT_bit_offset : 20
  276. <fe> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12)
  277. <2><101>: Abbrev Number: 8 (DW_TAG_member)
  278. <102> DW_AT_name : (indirect string, offset: 0x187): __xf_nocheck
  279. <106> DW_AT_decl_file : 2
  280. <107> DW_AT_decl_line : 46
  281. <108> DW_AT_decl_column : 11
  282. <109> DW_AT_type : <0x2c>
  283. <10d> DW_AT_byte_size : 4
  284. <10e> DW_AT_bit_size : 1
  285. <10f> DW_AT_bit_offset : 21
  286. <110> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12)
  287. <2><113>: Abbrev Number: 8 (DW_TAG_member)
  288. <114> DW_AT_name : (indirect string, offset: 0xf7): __filler
  289. <118> DW_AT_decl_file : 2
  290. <119> DW_AT_decl_line : 47
  291. <11a> DW_AT_decl_column : 11
  292. <11b> DW_AT_type : <0x2c>
  293. <11f> DW_AT_byte_size : 4
  294. <120> DW_AT_bit_size : 10
  295. <121> DW_AT_bit_offset : 22
  296. <122> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12)
  297. <2><125>: Abbrev Number: 0
  298. <1><126>: Abbrev Number: 4 (DW_TAG_pointer_type)
  299. <127> DW_AT_byte_size : 4
  300. <128> DW_AT_type : <0x12c>
  301. <1><12c>: Abbrev Number: 3 (DW_TAG_base_type)
  302. <12d> DW_AT_byte_size : 1
  303. <12e> DW_AT_encoding : 8 (unsigned char)
  304. <12f> DW_AT_name : (indirect string, offset: 0x7d): unsigned char
  305. <1><133>: Abbrev Number: 5 (DW_TAG_typedef)
  306. <134> DW_AT_name : (indirect string, offset: 0x39): FILE
  307. <138> DW_AT_decl_file : 4
  308. <139> DW_AT_decl_line : 83
  309. <13a> DW_AT_decl_column : 16
  310. <13b> DW_AT_type : <0x55>
  311. <1><13f>: Abbrev Number: 9 (DW_TAG_array_type)
  312. <140> DW_AT_type : <0x55>
  313. <144> DW_AT_sibling : <0x14f>
  314. <2><148>: Abbrev Number: 10 (DW_TAG_subrange_type)
  315. <149> DW_AT_type : <0x2c>
  316. <14d> DW_AT_upper_bound : 19
  317. <2><14e>: Abbrev Number: 0
  318. <1><14f>: Abbrev Number: 11 (DW_TAG_variable)
  319. <150> DW_AT_name : (indirect string, offset: 0x26): __iob
  320. <154> DW_AT_decl_file : 4
  321. <155> DW_AT_decl_line : 155
  322. <156> DW_AT_decl_column : 15
  323. <157> DW_AT_type : <0x13f>
  324. <15b> DW_AT_external : 1
  325. <15c> DW_AT_declaration : 1
  326. <1><15d>: Abbrev Number: 9 (DW_TAG_array_type)
  327. <15e> DW_AT_type : <0x12c>
  328. <162> DW_AT_sibling : <0x168>
  329. <2><166>: Abbrev Number: 12 (DW_TAG_subrange_type)
  330. <2><167>: Abbrev Number: 0
  331. <1><168>: Abbrev Number: 11 (DW_TAG_variable)
  332. <169> DW_AT_name : (indirect string, offset: 0x194): _sibuf
  333. <16d> DW_AT_decl_file : 5
  334. <16e> DW_AT_decl_line : 208
  335. <16f> DW_AT_decl_column : 23
  336. <170> DW_AT_type : <0x15d>
  337. <174> DW_AT_external : 1
  338. <175> DW_AT_declaration : 1
  339. <1><176>: Abbrev Number: 11 (DW_TAG_variable)
  340. <177> DW_AT_name : (indirect string, offset: 0x3e): _sobuf
  341. <17b> DW_AT_decl_file : 5
  342. <17c> DW_AT_decl_line : 208
  343. <17d> DW_AT_decl_column : 33
  344. <17e> DW_AT_type : <0x15d>
  345. <182> DW_AT_external : 1
  346. <183> DW_AT_declaration : 1
  347. <1><184>: Abbrev Number: 9 (DW_TAG_array_type)
  348. <185> DW_AT_type : <0x126>
  349. <189> DW_AT_sibling : <0x18f>
  350. <2><18d>: Abbrev Number: 12 (DW_TAG_subrange_type)
  351. <2><18e>: Abbrev Number: 0
  352. <1><18f>: Abbrev Number: 11 (DW_TAG_variable)
  353. <190> DW_AT_name : (indirect string, offset: 0x4c): _bufendtab
  354. <194> DW_AT_decl_file : 5
  355. <195> DW_AT_decl_line : 240
  356. <196> DW_AT_decl_column : 23
  357. <197> DW_AT_type : <0x184>
  358. <19b> DW_AT_external : 1
  359. <19c> DW_AT_declaration : 1
  360. <1><19d>: Abbrev Number: 11 (DW_TAG_variable)
  361. <19e> DW_AT_name : (indirect string, offset: 0x178): _lastbuf
  362. <1a2> DW_AT_decl_file : 5
  363. <1a3> DW_AT_decl_line : 241
  364. <1a4> DW_AT_decl_column : 15
  365. <1a5> DW_AT_type : <0x1ab>
  366. <1a9> DW_AT_external : 1
  367. <1aa> DW_AT_declaration : 1
  368. <1><1ab>: Abbrev Number: 4 (DW_TAG_pointer_type)
  369. <1ac> DW_AT_byte_size : 4
  370. <1ad> DW_AT_type : <0x133>
  371. <1><1b1>: Abbrev Number: 13 (DW_TAG_variable)
  372. <1b2> DW_AT_name : (indirect string, offset: 0xf0): optarg
  373. <1b6> DW_AT_decl_file : 5
  374. <1b7> DW_AT_decl_line : 320
  375. <1b9> DW_AT_decl_column : 14
  376. <1ba> DW_AT_type : <0x4f>
  377. <1be> DW_AT_external : 1
  378. <1bf> DW_AT_declaration : 1
  379. <1><1c0>: Abbrev Number: 13 (DW_TAG_variable)
  380. <1c1> DW_AT_name : (indirect string, offset: 0x76): optind
  381. <1c5> DW_AT_decl_file : 5
  382. <1c6> DW_AT_decl_line : 321
  383. <1c8> DW_AT_decl_column : 12
  384. <1c9> DW_AT_type : <0x25>
  385. <1cd> DW_AT_external : 1
  386. <1ce> DW_AT_declaration : 1
  387. <1><1cf>: Abbrev Number: 13 (DW_TAG_variable)
  388. <1d0> DW_AT_name : (indirect string, offset: 0x32): opterr
  389. <1d4> DW_AT_decl_file : 5
  390. <1d5> DW_AT_decl_line : 321
  391. <1d7> DW_AT_decl_column : 20
  392. <1d8> DW_AT_type : <0x25>
  393. <1dc> DW_AT_external : 1
  394. <1dd> DW_AT_declaration : 1
  395. <1><1de>: Abbrev Number: 13 (DW_TAG_variable)
  396. <1df> DW_AT_name : (indirect string, offset: 0x45): optopt
  397. <1e3> DW_AT_decl_file : 5
  398. <1e4> DW_AT_decl_line : 321
  399. <1e6> DW_AT_decl_column : 28
  400. <1e7> DW_AT_type : <0x25>
  401. <1eb> DW_AT_external : 1
  402. <1ec> DW_AT_declaration : 1
  403. <1><1ed>: Abbrev Number: 14 (DW_TAG_subroutine_type)
  404. <1ee> DW_AT_sibling : <0x1f4>
  405. <2><1f2>: Abbrev Number: 15 (DW_TAG_unspecified_parameters)
  406. <2><1f3>: Abbrev Number: 0
  407. <1><1f4>: Abbrev Number: 16 (DW_TAG_variable)
  408. <1f5> DW_AT_name : (indirect string, offset: 0x136): __cgo__0
  409. <1f9> DW_AT_decl_file : 6
  410. <1fa> DW_AT_decl_line : 1
  411. <1fb> DW_AT_decl_column : 20
  412. <1fc> DW_AT_type : <0x207>
  413. <200> DW_AT_external : 1
  414. <201> DW_AT_location : 5 byte block: 3 0 0 0 4 (DW_OP_addr: 4)
  415. <1><207>: Abbrev Number: 4 (DW_TAG_pointer_type)
  416. <208> DW_AT_byte_size : 4
  417. <209> DW_AT_type : <0x1ed>
  418. <1><20d>: Abbrev Number: 9 (DW_TAG_array_type)
  419. <20e> DW_AT_type : <0x3a>
  420. <212> DW_AT_sibling : <0x21d>
  421. <2><216>: Abbrev Number: 10 (DW_TAG_subrange_type)
  422. <217> DW_AT_type : <0x2c>
  423. <21b> DW_AT_upper_bound : 1
  424. <2><21c>: Abbrev Number: 0
  425. <1><21d>: Abbrev Number: 16 (DW_TAG_variable)
  426. <21e> DW_AT_name : (indirect string, offset: 0xce): __cgodebug_ints
  427. <222> DW_AT_decl_file : 6
  428. <223> DW_AT_decl_line : 2
  429. <224> DW_AT_decl_column : 11
  430. <225> DW_AT_type : <0x20d>
  431. <229> DW_AT_external : 1
  432. <22a> DW_AT_location : 5 byte block: 3 0 0 0 10 (DW_OP_addr: 10)
  433. <1><230>: Abbrev Number: 9 (DW_TAG_array_type)
  434. <231> DW_AT_type : <0x240>
  435. <235> DW_AT_sibling : <0x240>
  436. <2><239>: Abbrev Number: 10 (DW_TAG_subrange_type)
  437. <23a> DW_AT_type : <0x2c>
  438. <23e> DW_AT_upper_bound : 1
  439. <2><23f>: Abbrev Number: 0
  440. <1><240>: Abbrev Number: 3 (DW_TAG_base_type)
  441. <241> DW_AT_byte_size : 8
  442. <242> DW_AT_encoding : 4 (float)
  443. <243> DW_AT_name : (indirect string, offset: 0x96): double
  444. <1><247>: Abbrev Number: 16 (DW_TAG_variable)
  445. <248> DW_AT_name : (indirect string, offset: 0xd): __cgodebug_floats
  446. <24c> DW_AT_decl_file : 6
  447. <24d> DW_AT_decl_line : 6
  448. <24e> DW_AT_decl_column : 8
  449. <24f> DW_AT_type : <0x230>
  450. <253> DW_AT_external : 1
  451. <254> DW_AT_location : 5 byte block: 3 0 0 0 0 (DW_OP_addr: 0)
  452. <1><25a>: Abbrev Number: 17 (DW_TAG_subprogram)
  453. <25b> DW_AT_external : 1
  454. <25c> DW_AT_name : (indirect string, offset: 0x70): testc
  455. <260> DW_AT_decl_file : 1
  456. <261> DW_AT_decl_line : 6
  457. <262> DW_AT_decl_column : 6
  458. <263> DW_AT_low_pc : 0x0
  459. <267> DW_AT_high_pc : 0x14
  460. <26b> DW_AT_frame_base : 2 byte block: 7e 0 (DW_OP_breg14 (r14): 0)
  461. <26e> DW_AT_GNU_all_call_sites: 1
  462. <26f> DW_AT_sibling : <0x285>
  463. <2><273>: Abbrev Number: 18 (DW_TAG_GNU_call_site)
  464. <274> DW_AT_low_pc : 0x14
  465. <278> DW_AT_GNU_tail_call: 1
  466. <279> DW_AT_abstract_origin: <0x285>
  467. <3><27d>: Abbrev Number: 19 (DW_TAG_GNU_call_site_parameter)
  468. <27e> DW_AT_location : 1 byte block: 58 (DW_OP_reg8 (r8))
  469. <280> DW_AT_GNU_call_site_value: 2 byte block: 78 0 (DW_OP_breg8 (r8): 0)
  470. <3><283>: Abbrev Number: 0
  471. <2><284>: Abbrev Number: 0
  472. <1><285>: Abbrev Number: 20 (DW_TAG_subprogram)
  473. <286> DW_AT_external : 1
  474. <287> DW_AT_declaration : 1
  475. <288> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x12f): printf
  476. <28c> DW_AT_name : (indirect string, offset: 0x12f): printf
  477. <290> DW_AT_decl_file : 4
  478. <291> DW_AT_decl_line : 215
  479. <292> DW_AT_decl_column : 12
  480. <1><293>: Abbrev Number: 0
  481. Contents of the .debug_abbrev section:
  482. Number TAG (0x0)
  483. 1 DW_TAG_compile_unit [has children]
  484. DW_AT_producer DW_FORM_strp
  485. DW_AT_language DW_FORM_data1
  486. DW_AT_name DW_FORM_strp
  487. DW_AT_comp_dir DW_FORM_strp
  488. DW_AT_low_pc DW_FORM_addr
  489. DW_AT_high_pc DW_FORM_addr
  490. DW_AT_stmt_list DW_FORM_data4
  491. DW_AT value: 0 DW_FORM value: 0
  492. 2 DW_TAG_base_type [no children]
  493. DW_AT_byte_size DW_FORM_data1
  494. DW_AT_encoding DW_FORM_data1
  495. DW_AT_name DW_FORM_string
  496. DW_AT value: 0 DW_FORM value: 0
  497. 3 DW_TAG_base_type [no children]
  498. DW_AT_byte_size DW_FORM_data1
  499. DW_AT_encoding DW_FORM_data1
  500. DW_AT_name DW_FORM_strp
  501. DW_AT value: 0 DW_FORM value: 0
  502. 4 DW_TAG_pointer_type [no children]
  503. DW_AT_byte_size DW_FORM_data1
  504. DW_AT_type DW_FORM_ref4
  505. DW_AT value: 0 DW_FORM value: 0
  506. 5 DW_TAG_typedef [no children]
  507. DW_AT_name DW_FORM_strp
  508. DW_AT_decl_file DW_FORM_data1
  509. DW_AT_decl_line DW_FORM_data1
  510. DW_AT_decl_column DW_FORM_data1
  511. DW_AT_type DW_FORM_ref4
  512. DW_AT value: 0 DW_FORM value: 0
  513. 6 DW_TAG_structure_type [has children]
  514. DW_AT_name DW_FORM_strp
  515. DW_AT_byte_size DW_FORM_data1
  516. DW_AT_decl_file DW_FORM_data1
  517. DW_AT_decl_line DW_FORM_data1
  518. DW_AT_decl_column DW_FORM_data1
  519. DW_AT_sibling DW_FORM_ref4
  520. DW_AT value: 0 DW_FORM value: 0
  521. 7 DW_TAG_member [no children]
  522. DW_AT_name DW_FORM_strp
  523. DW_AT_decl_file DW_FORM_data1
  524. DW_AT_decl_line DW_FORM_data1
  525. DW_AT_decl_column DW_FORM_data1
  526. DW_AT_type DW_FORM_ref4
  527. DW_AT_data_member_location DW_FORM_block1
  528. DW_AT value: 0 DW_FORM value: 0
  529. 8 DW_TAG_member [no children]
  530. DW_AT_name DW_FORM_strp
  531. DW_AT_decl_file DW_FORM_data1
  532. DW_AT_decl_line DW_FORM_data1
  533. DW_AT_decl_column DW_FORM_data1
  534. DW_AT_type DW_FORM_ref4
  535. DW_AT_byte_size DW_FORM_data1
  536. DW_AT_bit_size DW_FORM_data1
  537. DW_AT_bit_offset DW_FORM_data1
  538. DW_AT_data_member_location DW_FORM_block1
  539. DW_AT value: 0 DW_FORM value: 0
  540. 9 DW_TAG_array_type [has children]
  541. DW_AT_type DW_FORM_ref4
  542. DW_AT_sibling DW_FORM_ref4
  543. DW_AT value: 0 DW_FORM value: 0
  544. 10 DW_TAG_subrange_type [no children]
  545. DW_AT_type DW_FORM_ref4
  546. DW_AT_upper_bound DW_FORM_data1
  547. DW_AT value: 0 DW_FORM value: 0
  548. 11 DW_TAG_variable [no children]
  549. DW_AT_name DW_FORM_strp
  550. DW_AT_decl_file DW_FORM_data1
  551. DW_AT_decl_line DW_FORM_data1
  552. DW_AT_decl_column DW_FORM_data1
  553. DW_AT_type DW_FORM_ref4
  554. DW_AT_external DW_FORM_flag
  555. DW_AT_declaration DW_FORM_flag
  556. DW_AT value: 0 DW_FORM value: 0
  557. 12 DW_TAG_subrange_type [no children]
  558. DW_AT value: 0 DW_FORM value: 0
  559. 13 DW_TAG_variable [no children]
  560. DW_AT_name DW_FORM_strp
  561. DW_AT_decl_file DW_FORM_data1
  562. DW_AT_decl_line DW_FORM_data2
  563. DW_AT_decl_column DW_FORM_data1
  564. DW_AT_type DW_FORM_ref4
  565. DW_AT_external DW_FORM_flag
  566. DW_AT_declaration DW_FORM_flag
  567. DW_AT value: 0 DW_FORM value: 0
  568. 14 DW_TAG_subroutine_type [has children]
  569. DW_AT_sibling DW_FORM_ref4
  570. DW_AT value: 0 DW_FORM value: 0
  571. 15 DW_TAG_unspecified_parameters [no children]
  572. DW_AT value: 0 DW_FORM value: 0
  573. 16 DW_TAG_variable [no children]
  574. DW_AT_name DW_FORM_strp
  575. DW_AT_decl_file DW_FORM_data1
  576. DW_AT_decl_line DW_FORM_data1
  577. DW_AT_decl_column DW_FORM_data1
  578. DW_AT_type DW_FORM_ref4
  579. DW_AT_external DW_FORM_flag
  580. DW_AT_location DW_FORM_block1
  581. DW_AT value: 0 DW_FORM value: 0
  582. 17 DW_TAG_subprogram [has children]
  583. DW_AT_external DW_FORM_flag
  584. DW_AT_name DW_FORM_strp
  585. DW_AT_decl_file DW_FORM_data1
  586. DW_AT_decl_line DW_FORM_data1
  587. DW_AT_decl_column DW_FORM_data1
  588. DW_AT_low_pc DW_FORM_addr
  589. DW_AT_high_pc DW_FORM_addr
  590. DW_AT_frame_base DW_FORM_block1
  591. DW_AT_GNU_all_call_sites DW_FORM_flag
  592. DW_AT_sibling DW_FORM_ref4
  593. DW_AT value: 0 DW_FORM value: 0
  594. 18 DW_TAG_GNU_call_site [has children]
  595. DW_AT_low_pc DW_FORM_addr
  596. DW_AT_GNU_tail_call DW_FORM_flag
  597. DW_AT_abstract_origin DW_FORM_ref4
  598. DW_AT value: 0 DW_FORM value: 0
  599. 19 DW_TAG_GNU_call_site_parameter [no children]
  600. DW_AT_location DW_FORM_block1
  601. DW_AT_GNU_call_site_value DW_FORM_block1
  602. DW_AT value: 0 DW_FORM value: 0
  603. 20 DW_TAG_subprogram [no children]
  604. DW_AT_external DW_FORM_flag
  605. DW_AT_declaration DW_FORM_flag
  606. DW_AT_MIPS_linkage_name DW_FORM_strp
  607. DW_AT_name DW_FORM_strp
  608. DW_AT_decl_file DW_FORM_data1
  609. DW_AT_decl_line DW_FORM_data1
  610. DW_AT_decl_column DW_FORM_data1
  611. DW_AT value: 0 DW_FORM value: 0
  612. Contents of the .debug_aranges section:
  613. Length: 28
  614. Version: 2
  615. Offset into .debug_info: 0x0
  616. Pointer Size: 4
  617. Segment Size: 0
  618. Address Length
  619. 00000000 00000014
  620. 00000000 00000000
  621. Raw dump of debug contents of section .debug_line:
  622. Offset: 0x0
  623. Length: 290
  624. DWARF Version: 2
  625. Prologue Length: 266
  626. Minimum Instruction Length: 4
  627. Initial value of 'is_stmt': 1
  628. Line Base: -5
  629. Line Range: 14
  630. Opcode Base: 13
  631. Opcodes:
  632. Opcode 1 has 0 args
  633. Opcode 2 has 1 args
  634. Opcode 3 has 1 args
  635. Opcode 4 has 1 args
  636. Opcode 5 has 1 args
  637. Opcode 6 has 0 args
  638. Opcode 7 has 0 args
  639. Opcode 8 has 0 args
  640. Opcode 9 has 1 args
  641. Opcode 10 has 0 args
  642. Opcode 11 has 0 args
  643. Opcode 12 has 1 args
  644. The Directory Table (offset 0x1b):
  645. 1 /export/home/amandeep
  646. 2 /usr/include
  647. 3 /usr/gnu/lib/gcc/sparc-sun-solaris2.10/8.2.1/include-fixed/iso
  648. 4 /usr/gnu/lib/gcc/sparc-sun-solaris2.10/8.2.1/include-fixed
  649. The File Name Table (offset 0xb9):
  650. Entry Dir Time Size Name
  651. 1 1 0 0 abc.go
  652. 2 2 0 0 stdio_impl.h
  653. 3 2 0 0 stdio_tag.h
  654. 4 3 0 0 stdio_iso.h
  655. 5 4 0 0 stdio.h
  656. 6 0 0 0 cgo-dwarf-inference
  657. Line Number Statements:
  658. [0x00000114] Set column to 14
  659. [0x00000116] Extended opcode 2: set Address to 0x0
  660. [0x0000011d] Special opcode 10: advance Address by 0 to 0x0 and Line by 5 to 6
  661. [0x0000011e] Set column to 5
  662. [0x00000120] Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 7
  663. [0x00000121] Advance PC by 20 to 0x14
  664. [0x00000123] Extended opcode 1: End of Sequence
  665. Contents of the .debug_str section:
  666. 0x00000000 5f5f6578 74656e64 65646664 005f5f63 __extendedfd.__c
  667. 0x00000010 676f6465 6275675f 666c6f61 7473005f godebug_floats._
  668. 0x00000020 5f46494c 45005f5f 696f6200 5f666c61 _FILE.__iob._fla
  669. 0x00000030 67006f70 74657272 0046494c 45005f73 g.opterr.FILE._s
  670. 0x00000040 6f627566 006f7074 6f707400 5f627566 obuf.optopt._buf
  671. 0x00000050 656e6474 6162005f 5f6f7269 656e7461 endtab.__orienta
  672. 0x00000060 74696f6e 005f5f69 6f6e6f6c 6f636b00 tion.__ionolock.
  673. 0x00000070 74657374 63006f70 74696e64 00756e73 testc.optind.uns
  674. 0x00000080 69676e65 64206368 6172005f 5f736565 igned char.__see
  675. 0x00000090 6b61626c 6500646f 75626c65 00474e55 kable.double.GNU
  676. 0x000000a0 20433137 20382e32 2e312032 30313830 C17 8.2.1 20180
  677. 0x000000b0 38313320 2d6d6370 753d7639 202d6764 813 -mcpu=v9 -gd
  678. 0x000000c0 77617266 2d32202d 67202d4f 32005f5f warf-2 -g -O2.__
  679. 0x000000d0 63676f64 65627567 5f696e74 73005f70 cgodebug_ints._p
  680. 0x000000e0 74720075 6e736967 6e656420 696e7400 tr.unsigned int.
  681. 0x000000f0 6f707461 7267005f 5f66696c 6c657200 optarg.__filler.
  682. 0x00000100 63686172 005f6669 6c65002f 6578706f char._file./expo
  683. 0x00000110 72742f68 6f6d652f 616d616e 64656570 rt/home/amandeep
  684. 0x00000120 006c6f6e 67206c6f 6e672069 6e740070 .long long int.p
  685. 0x00000130 72696e74 66005f5f 63676f5f 5f30006c rintf.__cgo__0.l
  686. 0x00000140 6f6e6720 696e7400 5f636e74 006c6f6e ong int._cnt.lon
  687. 0x00000150 6720646f 75626c65 002f746d 702f6367 g double./tmp/cg
  688. 0x00000160 6f2d6763 632d696e 7075742d 31373730 o-gcc-input-1770
  689. 0x00000170 32303237 302e6300 5f6c6173 74627566 20270.c._lastbuf
  690. 0x00000180 005f6261 7365005f 5f78665f 6e6f6368 ._base.__xf_noch
  691. 0x00000190 65636b00 5f736962 756600 eck._sibuf.
展开查看全部
7cjasjjr

7cjasjjr2#

/cc @ianlancetaylor@thanm

jfewjypa

jfewjypa3#

从邮件列表中得知,这是一个32位SPARC处理器的问题,可能的原因是debug/elf包中的*File类型没有applyRelocationsSPARC方法。虽然有一个applyRelocationsSPARC64,但没有32位实现。

iqxoj9l9

iqxoj9l94#

你好,@ianlancetaylor。我刚刚查看了源代码,发现已经存在实现:https://github.com/golang/gofrontend/blob/7b25b4dff4778fc4d6b5d6e10594814146b3e5dd/libgo/go/debug/elf/file.go#L1073
我是不是漏掉了什么?

hmtdttj4

hmtdttj45#

对不起,您说得对。我正在查看gc源代码,但您使用的是gccgo。该函数在gccgo中存在。
我不确定这里发生了什么。

相关问题