• Shenghou Ma's avatar
    cmd/ld: don't include padding length in size of the note section · 37e195cf
    Shenghou Ma authored
    Recently NetBSD starts to enforce this, and refuses to execute
    the program if n is larger than the sum of entry sizes.
    
    Before:
    $ readelf -n ../bin/go.old
    Notes at offset 0x00000bd0 with length 0x00000019:
      Owner         Data size       Description
      NetBSD                0x00000004      NT_VERSION (version)
    readelf: Warning: corrupt note found at offset 18 into core notes
    readelf: Warning:  type: 0, namesize: 00000000, descsize: 00000000
    $ readelf -n ../bin/go
    Notes at offset 0x00000bd0 with length 0x00000018:
    Owner         Data size       Description
    NetBSD                0x00000004      NT_VERSION (version)
    
    LGTM=iant
    R=iant
    CC=golang-codereviews
    https://golang.org/cl/70710043
    37e195cf
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...