• Than McIntosh's avatar
    debug/elf: apply more relocations when reading DWARF data sections · df855da6
    Than McIntosh authored
    The elf reader's method for reading in DWARF section data has support
    for applying selected relocations when the debug/dwarf readers are
    being used on relocatable objects. This patch extends the set of
    relocations applied slightly. In particlar, prior to this for some
    architectures we were only applying relocations whose target symbol
    was a section symbol; now we also include some relocations that target
    other symbols. This is needed to get meaningful values for compilation
    unit DIE low_pc attributes, which typically target a specific function
    symbol in text.
    
    Fixes #31363.
    
    Change-Id: I34b02e7904cd7f2dea74197f73fa648141d15212
    Reviewed-on: https://go-review.googlesource.com/c/go/+/195679Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    df855da6
dwarf_test.go 5.34 KB