Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3425)

Issue 152410043: code review 152410043: cmd/ld: do not assume that only pe section names start ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 6 months ago by brainman
Modified:
9 years, 6 months ago
Reviewers:
jfrederich, slimsag, iant
CC:
golang-codereviews, jfrederich, slimsag, iant, brainman
Visibility:
Public.

Description

cmd/ld: do not assume that only pe section names start with '.' Our current pe object reader assumes that every symbol starting with '.' is section. It appeared to be true, until now gcc 4.9.1 generates some symbols with '.' at the front. Change that logic to check other symbol fields in addition to checking for '.'. I am not an expert here, but it seems reasonable to me. Added test, but it is only good, if tested with gcc 4.9.1. Otherwise the test PASSes regardless. Fixes issue 8811. Fixes issue 8856.

Patch Set 1 #

Patch Set 2 : diff -r 84d418aa033b5e0e4f52b84101b4a5b3cff0aa25 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 84d418aa033b5e0e4f52b84101b4a5b3cff0aa25 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r f4cfb7885a65f2c73d3e66c7d46d74a3439a0a4f https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -5 lines) Patch
M misc/cgo/test/cgo_test.go View 1 1 chunk +1 line, -0 lines 0 comments Download
A misc/cgo/test/issue8811.c View 1 1 chunk +8 lines, -0 lines 0 comments Download
A misc/cgo/test/issue8811.go View 1 1 chunk +22 lines, -0 lines 0 comments Download
M src/cmd/ld/ldpe.c View 1 2 3 5 chunks +12 lines, -5 lines 0 comments Download

Messages

Total messages: 8
brainman
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
9 years, 6 months ago (2014-10-10 00:44:14 UTC) #1
brainman
This CL contains some bits from another CL 154210044. I will remove / merge them ...
9 years, 6 months ago (2014-10-10 00:44:55 UTC) #2
jfrederich
LGTM
9 years, 6 months ago (2014-10-10 06:30:55 UTC) #3
slimsag
Thank you for your prompt work on this. I will be able to thoroughly test ...
9 years, 6 months ago (2014-10-10 08:17:31 UTC) #4
jfrederich
On 2014/10/10 08:17:31, slimsag wrote: > Thank you for your prompt work on this. > ...
9 years, 6 months ago (2014-10-10 08:22:04 UTC) #5
iant
LGTM
9 years, 6 months ago (2014-10-10 14:47:40 UTC) #6
slimsag
Tested using these MinGW versions and can confirm it fixes 8811: x86_64-4.8.3-posix-seh-rt_v3-rev0 x86_64-4.9.1-posix-seh-rt_v3-rev0 LGTM
9 years, 6 months ago (2014-10-11 02:48:12 UTC) #7
brainman
9 years, 6 months ago (2014-10-11 11:01:12 UTC) #8
*** Submitted as https://code.google.com/p/go/source/detail?r=6d6eef8d916b ***

cmd/ld: do not assume that only pe section names start with '.'

Our current pe object reader assumes that every symbol starting with
'.' is section. It appeared to be true, until now gcc 4.9.1 generates
some symbols with '.' at the front. Change that logic to check other
symbol fields in addition to checking for '.'. I am not an expert
here, but it seems reasonable to me.

Added test, but it is only good, if tested with gcc 4.9.1. Otherwise
the test PASSes regardless.

Fixes issue 8811.
Fixes issue 8856.

LGTM=jfrederich, iant, stephen.gutekanst
R=golang-codereviews, jfrederich, stephen.gutekanst, iant
CC=alex.brainman, golang-codereviews
https://codereview.appspot.com/152410043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b