Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/ld: populate Windows PE symbol table #6936

Closed
rsc opened this issue Dec 12, 2013 · 11 comments
Closed

cmd/ld: populate Windows PE symbol table #6936

rsc opened this issue Dec 12, 2013 · 11 comments
Milestone

Comments

@rsc
Copy link
Contributor

@rsc rsc commented Dec 12, 2013

The linkers do not write all symbols to the Windows PE executable file symbol table.
(Before, go tool nm decoded the Plan 9 table embedded in the binary). The new cmd/nm
reads only the standard symbol table, not the Plan 9 one, part of a plan to eliminate
the Plan 9 table and the overhead of storing the symbol table twice. 

To keep nm useful, cmd/ld must write a full Windows symbol table. Must happen for Go 1.3
to keep things like pprof working.
@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented Dec 12, 2013

Comment 1:

I am happy to do it. If you have a plan yet, just state it here. Thank you.
Alex
@rsc
Copy link
Contributor Author

@rsc rsc commented Mar 27, 2014

Comment 2:

For the record, I have no plan. For ELF and Mach-O we add all the Go symbols to the ELF
or Mach-O symbol table. We should do the same for Windows, adding all the symbols to the
PE symbol table.
@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented Mar 27, 2014

Comment 3:

I take it we need to change cmd/ld/pe.c:^addsymtable. At this moment we dump contents of
symlabels array (4 symbols of: "symtab", "esymtab", "pclntab", "epclntab"). This needs
to be replaced by *real* symbols. What are these symbols? Where can I find them?
 
 Alex
@minux
Copy link
Member

@minux minux commented Mar 27, 2014

Comment 4:

alex, take a look at genasmsym in cmd/ld/symtab.c.
@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented Mar 28, 2014

Comment 5:

Thank you, minux. I will have a look.
Alex
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 14, 2014

Comment 8:

CL https://golang.org/cl/85240046 mentions this issue.
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 14, 2014

Comment 9:

CL https://golang.org/cl/87500043 mentions this issue.
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 16, 2014

Comment 10:

CL https://golang.org/cl/87770048 mentions this issue.
@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented Apr 17, 2014

Comment 11:

This issue was updated by revision 387895f.

Update issue #7738
LGTM=rsc
R=golang-codereviews, bradfitz, gobot, rsc
CC=golang-codereviews
https://golang.org/cl/87500043
Committer: Russ Cox 
@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented Apr 17, 2014

Comment 12:

This issue was updated by revision 06dc4e7.

Fixes issue #7738
LGTM=rsc
R=golang-codereviews, bradfitz, ruiu, rsc
CC=golang-codereviews
https://golang.org/cl/85240046
Committer: Russ Cox 
@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented Apr 17, 2014

Comment 13:

This issue was closed by revision fce4f04.

Status changed to Fixed.

@rsc rsc added fixed labels Apr 17, 2014
@rsc rsc added this to the Go1.3 milestone Apr 14, 2015
@rsc rsc removed the release-go1.3 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants