• Russ Cox's avatar
    cmd/ld: fix symbol table sorting · 40ed753e
    Russ Cox authored
    runtime: double-check that symbol table is sorted
    
    If the symbol table is unsorted, the binary search in findfunc
    will not find its func, which will make stack traces stop early.
    When the garbage collector starts using the stack tracer,
    that would be a serious problem.
    
    The unsorted symbol addresses came from from two things:
    
    1. The symbols in an ELF object are not necessarily sorted,
       so sort them before adding them to the symbol list.
    
    2. The __i686.get_pc_thunk.bx symbol is present in multiple
       object files and was having its address adjusted multiple
       times, producing an incorrect address in the symbol table.
    
    R=golang-dev, iant
    CC=golang-dev
    https://golang.org/cl/7440044
    40ed753e
Name
Last commit
Last update
..
5a Loading commit data...
5c Loading commit data...
5g Loading commit data...
5l Loading commit data...
6a Loading commit data...
6c Loading commit data...
6g Loading commit data...
6l Loading commit data...
8a Loading commit data...
8c Loading commit data...
8g Loading commit data...
8l Loading commit data...
addr2line Loading commit data...
api Loading commit data...
cc Loading commit data...
cgo Loading commit data...
cov Loading commit data...
dist Loading commit data...
fix Loading commit data...
gc Loading commit data...
go Loading commit data...
godoc Loading commit data...
gofmt Loading commit data...
ld Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
prof Loading commit data...
vet Loading commit data...
yacc Loading commit data...