• Ian Lance Taylor's avatar
    cmd/link: set correct alignment of ELF note section · cd5c10f0
    Ian Lance Taylor authored
    Otherwise the default computation in symalign kicked in, setting the
    alignment to be too high. This didn't matter with GNU ld, which put
    each loadable note into a separate PT_NOTE segment, but it did matter
    with gold which accumulated them all into a single PT_NOTE segment,
    respecting the requested alignment. In the single PT_NOTE segment
    generated by gold, the incorrect section alignment made the notes
    unreadable.
    
    Fixes #21564
    
    Change-Id: I15eb408bb04a2566c9fdfb6828e14188d9ef2280
    Reviewed-on: https://go-review.googlesource.com/58290Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    cd5c10f0
elf.go 68.3 KB