---
id: "gnu_build_id"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["software"]
langs: ["common"]
quality: 68
url: "https://registry.apicrafter.io/datatype/gnu_build_id"
---

# GNU build ID of an ELF file (`gnu_build_id`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Bit string that the linker writes into the .note.gnu.build-id note of an ELF executable or shared library to identify that build. GNU ld computes it with the --build-id option: a SHA-1 hash (160 bits, the default) or an MD5 or XXHASH hash (128 bits) of the output, 128 random bits (uuid style), or a fixed hexadecimal string given by the user. Tools such as file, readelf -n, debuginfod and crash reporters print it as lowercase hexadecimal digits, and debug symbol stores are keyed by it. VirusTotal shows it as the Build id of ELF files. The regexp accepts the 128-bit and 160-bit forms; user-chosen build IDs can have other lengths.

- Personal data (PII): no
- Categories: Software development (software)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:[0-9a-f]{32}|[0-9a-f]{40})$
```

## Examples

- `064cb6d5088be6864ecce961a798300f3b202802` — SHA-1 build ID of an ARM64 Android shared library (libtracernative.so) in its VirusTotal report
- `064cb6d5088be6864ecce961a798300f3b20280` (invalid example) — 39 hexadecimal digits

## Sources

- doc: <https://sourceware.org/binutils/docs/ld/Options.html>
- other: <https://virustotal.readme.io/reference/file-object-elf-info>

## Quality

Score 68/100. Missing: second example, mapping (Wikidata, Schema.org, ...), translation, detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/gnu_build_id.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/software/gnu_build_id.yaml>
