Page MenuHomeFreeBSD

readelf: add support for ELF package metadata note
Needs ReviewPublic

Authored by emaste on Tue, Nov 12, 2:45 PM.
This revision needs review, but there are no reviewers specified.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.
fuz added inline comments.
contrib/elftoolchain/readelf/readelf.c
3824

Can we get a symbolic constant for this type?

3827–3828

Cast to avoid sign-extension, clearer code. Is the charset of these ASCII? Or is it UTF-8?

The general idea seems fine.

Selfishly, it's convenient to see someone else driving a need for JSON handling in ELF files since we're going to want something like that for CHERI compartmentalization. CC @jhb

contrib/elftoolchain/readelf/readelf.c
3827–3828

From the systemd.io link "The format is a single JSON object, encoded as a zero-terminated UTF-8 string". We should probably act accordingly.