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

Issue 5823055: code review 5823055: cmd/ld, cmd/6l, cmd/8l: fix hidden/local symbol import for ELF systems (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by minux1
Modified:
12 years, 6 months ago
Reviewers:
CC:
iant, rsc, golang-dev
Visibility:
Public.

Description

cmd/ld, cmd/6l, cmd/8l, cmd/5l: fix hidden/local symbol import for ELF systems Introduce a newsym() to cmd/lib.c to add a symbol but don't add them to hash table. Introduce a new bit flag SHIDDEN and bit mask SMASK to handle hidden and/or local symbols in ELF symbol tables. Though we still need to order the symbol table entries correctly. Fix for issue 3261 comment #9. For CL 5822049.

Patch Set 1 #

Patch Set 2 : diff -r 59b7d79b616f https://code.google.com/p/go/ #

Patch Set 3 : diff -r 59b7d79b616f https://code.google.com/p/go/ #

Total comments: 2

Patch Set 4 : diff -r a303acb0a5f2 https://code.google.com/p/go/ #

Patch Set 5 : diff -r a303acb0a5f2 https://code.google.com/p/go/ #

Patch Set 6 : diff -r a303acb0a5f2 https://code.google.com/p/go/ #

Patch Set 7 : diff -r a303acb0a5f2 https://code.google.com/p/go/ #

Patch Set 8 : diff -r a303acb0a5f2 https://code.google.com/p/go/ #

Patch Set 9 : diff -r a303acb0a5f2 https://code.google.com/p/go/ #

Total comments: 3

Patch Set 10 : diff -r 047d46024b74 https://code.google.com/p/go/ #

Patch Set 11 : diff -r 047d46024b74 https://code.google.com/p/go/ #

Patch Set 12 : diff -r 14c38c23c819 https://code.google.com/p/go/ #

Patch Set 13 : diff -r 316890203045 https://code.google.com/p/go/ #

Patch Set 14 : diff -r 2d97f35f53e1 https://code.google.com/p/go/ #

Patch Set 15 : diff -r 2d97f35f53e1 https://code.google.com/p/go/ #

Patch Set 16 : diff -r f59dd827d8d9 https://code.google.com/p/go/ #

Patch Set 17 : diff -r f59dd827d8d9 https://code.google.com/p/go/ #

Patch Set 18 : diff -r b54f4da6d7be https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -105 lines) Patch
M src/cmd/5l/asm.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/5l/pass.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/6l/asm.c View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/6l/pass.c View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/8l/asm.c View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/8l/pass.c View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/cmd/ld/data.c View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/ld/ldelf.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +94 lines, -66 lines 0 comments Download
src/cmd/ld/lib.h View 1 2 3 4 5 6 2 chunks +4 lines, -1 line 0 comments Download
src/cmd/ld/lib.c View 1 2 3 2 chunks +33 lines, -20 lines 0 comments Download
M src/cmd/ld/symtab.c View 1 2 3 4 5 6 7 8 9 10 5 chunks +13 lines, -11 lines 0 comments Download

Messages

Total messages: 16
minux1
Hello iant@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 8 months ago (2012-03-15 04:36:57 UTC) #1
rsc
LGTM but wait for iant
12 years, 8 months ago (2012-03-15 18:57:51 UTC) #2
iant
http://codereview.appspot.com/5823055/diff/3002/src/cmd/ld/ldelf.c File src/cmd/ld/ldelf.c (right): http://codereview.appspot.com/5823055/diff/3002/src/cmd/ld/ldelf.c#newcode762 src/cmd/ld/ldelf.c:762: // fall through You don't want a STB_GLOBAL symbol ...
12 years, 8 months ago (2012-03-15 19:46:02 UTC) #3
minux1
PTAL. On 2012/03/15 19:46:02, iant wrote: > http://codereview.appspot.com/5823055/diff/3002/src/cmd/ld/ldelf.c > File src/cmd/ld/ldelf.c (right): > > http://codereview.appspot.com/5823055/diff/3002/src/cmd/ld/ldelf.c#newcode762 ...
12 years, 8 months ago (2012-03-16 10:35:57 UTC) #4
iant
http://codereview.appspot.com/5823055/diff/11010/src/cmd/ld/data.c File src/cmd/ld/data.c (right): http://codereview.appspot.com/5823055/diff/11010/src/cmd/ld/data.c#newcode162 src/cmd/ld/data.c:162: if(r->sym != S && (r->sym->type == 0 || r->sym->type ...
12 years, 8 months ago (2012-03-16 13:55:10 UTC) #5
minux1
PTAL. On 2012/03/16 13:55:10, iant wrote: > http://codereview.appspot.com/5823055/diff/11010/src/cmd/ld/data.c#newcode162 > src/cmd/ld/data.c:162: if(r->sym != S && (r->sym->type ...
12 years, 8 months ago (2012-03-17 08:52:43 UTC) #6
iant
LGTM Thanks for bearing with me. Violating the ELF requirement that all STB_LOCAL symbols precede ...
12 years, 8 months ago (2012-03-18 04:24:18 UTC) #7
minux1
On 2012/03/18 04:24:18, iant wrote: > Thanks for bearing with me. I'd like to thank ...
12 years, 8 months ago (2012-03-18 07:15:36 UTC) #8
rsc
Hi, Please do not submit this before Go 1. It would have been fine to ...
12 years, 7 months ago (2012-03-26 19:35:31 UTC) #9
minux1
ping.
12 years, 7 months ago (2012-04-06 07:32:49 UTC) #10
rsc
It's fine to submit this now. I did not re-review the code.
12 years, 7 months ago (2012-04-10 20:14:58 UTC) #11
minux1
Found a new bug in this approach. When testing this CL on Linux/ARM with the ...
12 years, 7 months ago (2012-04-21 19:22:30 UTC) #12
minux1
On 2012/04/21 19:22:30, minux wrote: > We have two options here: > 1, always enter ...
12 years, 7 months ago (2012-04-21 19:39:15 UTC) #13
minux1
PTAL. Reversed the order of relocation loading and sub-symbol loading. Tested on Linux/amd64, Linux/386, Linux/ARM ...
12 years, 7 months ago (2012-04-21 20:22:32 UTC) #14
iant
LGTM
12 years, 6 months ago (2012-05-02 00:36:31 UTC) #15
minux1
12 years, 6 months ago (2012-05-22 18:32:39 UTC) #16
*** Submitted as http://code.google.com/p/go/source/detail?r=046668c6315e ***

cmd/ld, cmd/6l, cmd/8l, cmd/5l: fix hidden/local symbol import for ELF systems
   Introduce a newsym() to cmd/lib.c to add a symbol but don't add
them to hash table.
   Introduce a new bit flag SHIDDEN and bit mask SMASK to handle hidden
and/or local symbols in ELF symbol tables. Though we still need to order
the symbol table entries correctly.
   Fix for issue 3261 comment #9.
   For CL 5822049.

R=iant, rsc
CC=golang-dev
http://codereview.appspot.com/5823055
Sign in to reply to this message.

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