Skip to content

Use dwarf 5 for Linux binaries (BinSkim) #852

Open
@dagood

Description

@dagood

Example BinSkim issue: https://devdiv.visualstudio.com/DevDiv/_queries/edit/1727456

https://github.com/microsoft/binskim/blob/main/docs/BinSkimRules.md#rule-BA3004GenerateRequiredSymbolFormat

'goboringcrypto_linux_amd64.syso' is using debugging dwarf version '4'. The dwarf version 5 contains more information and should be used. To enable the debugging version 5 use '-gdwarf-5'.

Strangely, BinSkim only detects dwarf 4 in src\crypto\internal\boring\goboringcrypto_linux_amd64.syso, not the binaries we actually build. But our binaries do use version 4:

$ llvm-dwarfdump -r 1 go/bin/go | head | grep Compile
0x00000000: Compile Unit: length = 0x00000b85, format = DWARF32, version = 0x0004, abbr_offset = 0x0000, addr_size = 0x08 (next unit at 0x00000b89)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions