Details
Details
- Reviewers
fuz
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
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 | ||
|---|---|---|
| 3841–3842 | 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. | |
| contrib/elftoolchain/readelf/readelf.c | ||
|---|---|---|
| 3841–3842 | Scratch that, my code is still wrong. buf is a const char *, so buf[i] can be negative. The isprint call should be isprint((unsigned char)buf[i]). For more comprehensive support, we could call iconv to transcode the buffer contents into the current locale. | |