SBOM: Emit GNU Build ID for vmlinux and kernel modules

This allows identifying a binary from a runtime stackdump as Build IDs can be
part of the emitted information.

Example diff for the generated sbom json:

| @@ -1110,7 +1175,8 @@
|                      "algorithm": "SHA1",
|                      "checksumValue": "4dee636bf4081a43cbb04ff5d2a81f6004d190d7"
|                  }
| -            ]
| +            ],
| +            "comment": "Build ID: 242be6aaa1e3d168bf52700b964e8e02fc90bcc1"
|          }
|      ],
|      "relationships": [

In particular, the format as encoded in the ELF note is preserved.

Bug: 347218961
Bug: 346849570
Change-Id: I4240d14300651b1717c9aea224e97610c218b14f
Signed-off-by: Matthias Maennich <maennich@google.com>
1 file changed