diff options
author | Florian Zenker <floriank@google.com> | 2022-10-14 09:13:38 +0000 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2022-10-14 17:10:16 +0000 |
commit | 8826bdd143314895230776e582043d34ea635a33 (patch) | |
tree | e556e21a5b0e2006b9fc2630b075d9d81e625eab /src/debug | |
parent | e9cdca9a24b63cba0560978fb48773b83805be25 (diff) | |
download | go-8826bdd143314895230776e582043d34ea635a33.tar.gz go-8826bdd143314895230776e582043d34ea635a33.zip |
debug/elf: fix inccorrect value in COMPRESS_ZLIB string name
LLVM recently introduced ZSTD compression for ELF sections. The error
message when failing to read the compressed section calls this
COMPRESS_ZLIB+2 while it should report it as COMPRESS_ZLIB+1.
Change-Id: I869aa69baf0c8c86665475b47343c790587cb39b
Reviewed-on: https://go-review.googlesource.com/c/go/+/443035
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/debug')
-rw-r--r-- | src/debug/elf/elf.go | 2 | ||||
-rw-r--r-- | src/debug/elf/elf_test.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/debug/elf/elf.go b/src/debug/elf/elf.go index 77d7b0988c..02cda16510 100644 --- a/src/debug/elf/elf.go +++ b/src/debug/elf/elf.go @@ -735,7 +735,7 @@ const ( ) var compressionStrings = []intName{ - {0, "COMPRESS_ZLIB"}, + {1, "COMPRESS_ZLIB"}, {0x60000000, "COMPRESS_LOOS"}, {0x6fffffff, "COMPRESS_HIOS"}, {0x70000000, "COMPRESS_LOPROC"}, diff --git a/src/debug/elf/elf_test.go b/src/debug/elf/elf_test.go index a61b491090..814c6bd6cc 100644 --- a/src/debug/elf/elf_test.go +++ b/src/debug/elf/elf_test.go @@ -37,6 +37,7 @@ var nameTests = []nameTest{ {R_SPARC_GOT22, "R_SPARC_GOT22"}, {ET_LOOS + 5, "ET_LOOS+5"}, {ProgFlag(0x50), "0x50"}, + {COMPRESS_ZLIB + 1, "COMPRESS_ZLIB+1"}, } func TestNames(t *testing.T) { |