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

Issue 6848044: code review 6848044: debug/elf: do not skip first symbol in the symbol table (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by jsing
Modified:
11 years, 1 month ago
Reviewers:
mtj1, rsc
CC:
golang-dev, mikio, iant2, iant
Visibility:
Public.

Description

debug/elf: do not skip first symbol in the symbol table Do not skip the first symbol in the symbol table. Any other indexes into the symbol table (for example, indexes in relocation entries) will now refer to the symbol following the one that was intended. Add an object that contains debug relocations, which debug/dwarf failed to decode correctly. Extend the relocation tests to cover this case. Note that the existing tests passed since the symbol following the symbol that required relocation is also of type STT_SECTION. Fixes issue 4107.

Patch Set 1 #

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

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

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

Total comments: 1

Patch Set 5 : diff -r d9896259d8e5 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r d1854dd425b2 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -27 lines) Patch
M doc/go1.1.html View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M src/pkg/debug/elf/file.go View 1 2 chunks +0 lines, -8 lines 0 comments Download
M src/pkg/debug/elf/file_test.go View 1 2 chunks +41 lines, -19 lines 0 comments Download
A src/pkg/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj View 1 Binary file 0 comments Download

Messages

Total messages: 13
jsing
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 5 months ago (2012-11-13 13:49:24 UTC) #1
mikio
LGTM Thanks! it also passes on freebsd.
11 years, 5 months ago (2012-11-13 14:30:57 UTC) #2
iant2
This is going to change the behaviour of the Symbols function in debug/elf and potentially ...
11 years, 5 months ago (2012-11-13 14:33:27 UTC) #3
jsing
On 14 November 2012 01:33, Ian Lance Taylor <iant@google.com> wrote: > This is going to ...
11 years, 5 months ago (2012-11-13 15:15:41 UTC) #4
iant2
On Tue, Nov 13, 2012 at 7:15 AM, Joel Sing <jsing@google.com> wrote: > On 14 ...
11 years, 5 months ago (2012-11-13 16:46:32 UTC) #5
jsing
On 2012/11/13 16:46:32, iant2 wrote: > On Tue, Nov 13, 2012 at 7:15 AM, Joel ...
11 years, 5 months ago (2012-11-14 10:35:34 UTC) #6
iant
LGTM with one change. https://codereview.appspot.com/6848044/diff/10001/doc/go1.1.html File doc/go1.1.html (right): https://codereview.appspot.com/6848044/diff/10001/doc/go1.1.html#newcode71 doc/go1.1.html:71: processes the symbol table returned ...
11 years, 5 months ago (2012-11-14 14:19:36 UTC) #7
jsing
On 2012/11/14 14:19:36, iant wrote: > LGTM with one change. > > https://codereview.appspot.com/6848044/diff/10001/doc/go1.1.html > File ...
11 years, 5 months ago (2012-11-14 15:22:31 UTC) #8
jsing
*** Submitted as http://code.google.com/p/go/source/detail?r=9ea9e7e6e0c8 *** debug/elf: do not skip first symbol in the symbol table ...
11 years, 5 months ago (2012-11-14 15:27:16 UTC) #9
rsc
Old CL, but I found this via the Go 1.1 release notes. I am concerned ...
11 years, 1 month ago (2013-03-19 23:28:25 UTC) #10
mtj1
why not replicate the first element and give an address of array[1] On Tue, Mar ...
11 years, 1 month ago (2013-03-19 23:44:06 UTC) #11
jsing
On 2013/03/19 23:28:25, rsc wrote: > Old CL, but I found this via the Go ...
11 years, 1 month ago (2013-03-20 03:21:22 UTC) #12
rsc
11 years, 1 month ago (2013-03-21 20:31:31 UTC) #13
Message was sent while issue was closed.
Rereading the review, Ian had the same reaction I did. The fact is, it is
possible to write correct code with the Go 1.0 interface, so the Go 1.1
interface should not change. Yes, it means that people have to subtract 1 to
index into the symbols list, and yes, if we were starting from scratch we
probably wouldn't make that decision, but we did promise not to change the
semantics of existing code unnecessarily, and this seems unnecessary.

I will send a CL to revert to the old behavior and fix the relocation indices.
Sign in to reply to this message.

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