-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-readobj][ELF] Alter JSON/LLVM output on note sections to allow …
…for multiple notes per section in JSON (#96813) It turns out that the notes section for corefiles (or really any elf file with multiple notes) is set up in such a way for LLVM formatted output that the JSON equivalent only has the last note since the notes are held in a dictionary with every key being Note. This pr alters the layout for the notes to a list of dictionaries to sidestep this issue for JSON output. Prior to this pr a note section in the output looked like (for LLVM output): ``` Notes [ NoteSection { Name: <?> Offset: 0x2148 Size: 0x1F864 Note { Owner: CORE Data size: 0x150 Type: NT_PRSTATUS (prstatus structure) Description data ( 0000: 06000000 00000000 00000000 06000000 |................| ... ) } Note { Owner: CORE Data size: 0x88 Type: NT_PRPSINFO (prpsinfo structure) Description data ( 0000: 02440000 00000000 04054040 00000000 |.D........@@....| .... ``` But is now: ``` NoteSections [ NoteSection { Name: <?> Offset: 0x2148 Size: 0x1F864 Notes [ { Owner: CORE Data size: 0x150 Type: NT_PRSTATUS (prstatus structure) Description data ( 0000: 06000000 00000000 00000000 06000000 |................| ... ) } { Owner: CORE Data size: 0x88 Type: NT_PRPSINFO (prpsinfo structure) Description data ( 0000: 02440000 00000000 04054040 00000000 |.D........@@....| ... ```
- Loading branch information
Showing
31 changed files
with
574 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.