• 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
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
race.bash Loading commit data...
race.bat Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...
sudo.bash Loading commit data...