]> Cypherpunks repositories - gostls13.git/commit
Fix cgo for GCC 4.4
authorAdam Langley <agl@golang.org>
Mon, 2 Nov 2009 20:02:16 +0000 (12:02 -0800)
committerAdam Langley <agl@golang.org>
Mon, 2 Nov 2009 20:02:16 +0000 (12:02 -0800)
commit72ec930fa70c20ce69b21bf32a7916c04c2e9c2f
tree60fe8c0d3ae25d25dfdf05ba1073c880f3df739a
parent6358cac7d85544d77ca27597bc4a46c61d0d964e
Fix cgo for GCC 4.4

Firstly, with -Werror, GCC switched to printing warnings starting
with "error:". Widening the string matches solves this as the messages
are otherwise unchanged.

Secondly, GCC 4.4 outputs DWARF sections with with NUL bytes in all
the offsets and requires the relocation section for .debug_info to be
processed in order to result in valid DWARF data. Thus we add minimal
handling for relocation sections, which is sufficient for our needs.

BUG=1
Fixes #1.

R=rsc, iant
CC=go-dev
http://go/go-review/1017003
src/cmd/cgo/gcc.go
src/pkg/debug/elf/file.go
src/pkg/debug/elf/file_test.go
src/pkg/debug/elf/testdata/go-relocation-test-gcc424-x86-64.o [new file with mode: 0644]
src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86-64.o [new file with mode: 0644]
src/pkg/debug/elf/testdata/go-relocation-test-gcc441-x86.o [new file with mode: 0644]
src/pkg/encoding/binary/binary.go