]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/ld: don't set IMAGE_FILE_DEBUG_STRIPPED on PE binaries
authorqmuntal <quimmuntal@gmail.com>
Mon, 3 Apr 2023 08:01:43 +0000 (10:01 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 7 Apr 2023 11:34:41 +0000 (11:34 +0000)
commit949fdd9f0dc53c32dc6a5a46ad7a85032df28055
tree3a40202d07fd8af8d119f1f99722cdd49bc5713d
parent9be533a8ee7673cbf16699d05517d9c6aebed297
cmd/link/internal/ld: don't set IMAGE_FILE_DEBUG_STRIPPED on PE binaries

The IMAGE_FILE_DEBUG_STRIPPED characteristic is used to inform that
the debugging information have been removed from the PE files and moved
into a DBG file, but the Go linker doesn't generate DBG files.

Having this characteristic can confuse debugging tools, so better
don't set it.

While here, remove also IMAGE_FILE_LINE_NUMS_STRIPPED, which is
deprecated and should be zero [1].

Fixes #59391

[1] https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#characteristics

Change-Id: Ia6b1dc3353bfa292a17c4bef17c9bac8dc95189a
Reviewed-on: https://go-review.googlesource.com/c/go/+/481615
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/link/internal/ld/pe.go