FAQ
https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/elf.go
File src/cmd/nm/elf.go (right):

https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/elf.go#newcode45
src/cmd/nm/elf.go:45: sym.Code = 'R'
The code 'R' is not documented in doc.go.

https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/elf.go#newcode49
src/cmd/nm/elf.go:49: }
if elf.ST_BIND(sym.Info) == elf.STB_LOCAL {
      sym.Code += 'a' - 'A'
}

https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/goobj.go
File src/cmd/nm/goobj.go (right):

https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/goobj.go#newcode43
src/cmd/nm/goobj.go:43: sym.Code = 'X'
The code 'X' is not documented in doc.go.

https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/nm.go
File src/cmd/nm/nm.go (right):

https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/nm.go#newcode140
src/cmd/nm/nm.go:140: fmt.Fprintf(w, "%8s", "")
When the current nm program is given more than one file on the command
line, it prints the file name before each symbol line. Should this
program act the same way? The current behaviour is unhelpful since
there is no indication of when one file ends and another begins.

https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/nm.go#newcode156
src/cmd/nm/nm.go:156: func filter(syms []Sym, ok func(Sym) bool) []Sym {
I don't think anything uses this.

https://codereview.appspot.com/40600043/

--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Alex Brainman at Dec 11, 2013 at 11:58 pm
    I am probably wrong but ...

    Your new command is vastly different from the old command on windows.
    Your new nm command displays "pe symbols". We have 4 of those. As far as
    I remember, one of those points onto "go symbols" section. The old nm
    command displays the later.

    We had a plan at some stage in the past to copy "go symbols" into "pe
    symbols", so all "standard" GNU commands will be able to interrogate our
    binaries. But we never implemented it, because nm did a good job of it.

    Alex

    https://codereview.appspot.com/40600043/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Russ Cox at Dec 12, 2013 at 12:13 am

    On Wed, Dec 11, 2013 at 3:58 PM, wrote:

    I am probably wrong but ...

    Your new command is vastly different from the old command on windows.
    Your new nm command displays "pe symbols". We have 4 of those. As far as
    I remember, one of those points onto "go symbols" section. The old nm
    command displays the later.

    We had a plan at some stage in the past to copy "go symbols" into "pe
    symbols", so all "standard" GNU commands will be able to interrogate our
    binaries. But we never implemented it, because nm did a good job of it.
    Perhaps this will be a good motivation to make that work. :-)

    The change here is intentional, and mentioned in the CL description. The
    goal is to eliminate the uses of the Plan 9 symbol table so that we are not
    carrying two.

    It is probably okay for now if nm only shows those 4 symbols on Windows. It
    may be easier to fill out the Windows symbol table once the linker is
    written in Go (golang.org/s/go13linker).

    I created golang.org/issue/6936 so we don't forget this. Thanks.

    Russ

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Rob Pike at Dec 12, 2013 at 12:18 am
    Once symtab goes away, it will show only 3 symbols. Now that's progress.

    -rob

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Rsc at Dec 11, 2013 at 11:58 pm
    https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/nm.go
    File src/cmd/nm/nm.go (right):

    https://codereview.appspot.com/40600043/diff/130001/src/cmd/nm/nm.go#newcode140
    src/cmd/nm/nm.go:140: fmt.Fprintf(w, "%8s", "")
    On 2013/12/11 23:25:43, iant wrote:
    When the current nm program is given more than one file on the command line, it
    prints the file name before each symbol line. Should this program act the same
    way? The current behaviour is unhelpful since there is no indication of when
    one file ends and another begins.
    Perhaps it should. If so it should print the archive name instead of the
    member name. I'll try that.

    https://codereview.appspot.com/40600043/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Alex Brainman at Dec 12, 2013 at 12:03 am
    On 2013/12/11 23:58:03, brainman wrote:

    That is what I see:

    C:\go\root\src\pkg\archive\zip>go tool nm zip.test.exe <- old nm
    command
        ...
        ...
        ...
        55fcb8 D unicode/utf8.gcargs┬╖16
        57e860 D unicode/utf8.gcargs┬╖18
        574b00 D unicode/utf8.gcargs┬╖2
        570ec0 D unicode/utf8.gcargs┬╖20
        566720 D unicode/utf8.gcargs┬╖22
        566740 D unicode/utf8.gcargs┬╖4
        566760 D unicode/utf8.gcargs┬╖8
        567300 D unicode/utf8.gclocals┬╖1
        55fcc8 D unicode/utf8.gclocals┬╖11
        574b40 D unicode/utf8.gclocals┬╖13
        574b80 D unicode/utf8.gclocals┬╖15
        55c310 D unicode/utf8.gclocals┬╖17
        574f40 D unicode/utf8.gclocals┬╖19
        570f00 D unicode/utf8.gclocals┬╖21
        566780 D unicode/utf8.gclocals┬╖23
        567320 D unicode/utf8.gclocals┬╖3
        55fcd8 D unicode/utf8.gclocals┬╖5
        55fce8 D unicode/utf8.gclocals┬╖9
        6b3e48 d unknown
        416bd0 t unlockOSThread
        414920 t unlockextra
        40d200 t updatememstats
        6bc102 b use_aeshash
        41c420 t vneg
        412d20 t vprintf
        414e40 t wakep
        6bc9a0 b work

    C:\go\root\src\pkg\archive\zip>go tool nm zip.test.exe <- new nm
    command
        2a43d5 T epclntab
        239d52 T esymtab
        239d60 T pclntab
        1a0900 T symtab

    C:\go\root\src\pkg\archive\zip>

    https://codereview.appspot.com/40600043/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 11, '13 at 11:25p
activeDec 12, '13 at 12:18a
posts6
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase