Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve binary support #552

Merged
merged 8 commits into from
Nov 26, 2023
Merged

Improve binary support #552

merged 8 commits into from
Nov 26, 2023

Conversation

vinc
Copy link
Owner

@vinc vinc commented Nov 25, 2023

  • Add support for 0b1000 format in Lisp
  • Remove support for 0XC0DE format and keep only 0xC0DE (and 0xc0de) in Lisp
  • Use 0xC0DE format everywhere instead of 0xc0de
  • Rewrite hex command to handle even number of bytes in binary
  • Show correct memory address in elf command
~
> elf /bin/halt
ELF entry address: 0x2011D0

.rodata (addr: 0x200158, size: 64, align: 1)
00200158: 1B5B 3933 6D4D 4F52 4F53 2068 6173 2072 .[93mMOROS has r
00200168: 6561 6368 6564 2069 7473 2066 6174 652C eached its fate,
00200178: 2074 6865 2073 7973 7465 6D20 6973 206E  the system is n
00200188: 6F77 2068 616C 7469 6E67 2E1B 5B30 6D0A ow halting..[0m.

.eh_frame_hdr (addr: 0x200198, size: 12, align: 4)
00200198: 011B 033B 0C00 0000 0000 0000           ...;........

.eh_frame (addr: 0x2001A8, size: 28, align: 8)
002001A8: 1400 0000 0000 0000 017A 5200 0178 1001 .........zR..x..
002001B8: 1B0C 0708 9001 0000 0000 0000           ............

.text (addr: 0x2011D0, size: 207, align: 16)
002011D0: 5348 8D35 80EF FFFF BF01 0000 00BA 0500 SH.5............
002011E0: 0000 E889 0000 0048 8D35 6FEF FFFF BF01 .......H.5o.....
002011F0: 0000 00BA 3600 0000 E873 0000 0048 8D35 ....6....s...H.5
00201200: 8FEF FFFF BF01 0000 00BA 0400 0000 E85D ...............]
00201210: 0000 0048 8D35 7DEF FFFF BF01 0000 00BA ...H.5}.........
00201220: 0100 0000 E847 0000 0048 BF00 0000 0000 .....G...H......
00201230: 00E0 3FE8 2800 0000 E853 0000 0048 BB00 ..?.(....S...H..
00201240: 0000 0000 00F0 3F66 0F1F 8400 0000 0000 ......?f........
00201250: 4889 DFE8 0800 0000 EBF6 CCCC CCCC CCCC H...............
00201260: 50B8 0B00 0000 CD80 58C3 CCCC CCCC CCCC P.......X.......
00201270: 50B8 0400 0000 CD80 4889 C148 F7D1 48C1 P.......H..H..H.
00201280: E93F 4889 C248 89C8 59C3 CCCC CCCC CCCC .?H..H..Y.......
00201290: 50B8 0A00 0000 BFAD DE00 00CD 8058 C3   P............X.

.comment (addr: 0x0, size: 19, align: 1)
00000000: 4C69 6E6B 6572 3A20 4C4C 4420 3136 2E30 Linker: LLD 16.0
00000010: 2E32 00                                 .2.

.shstrtab (addr: 0x0, size: 58, align: 1)
00000000: 002E 7368 7374 7274 6162 002E 726F 6461 ..shstrtab..roda
00000010: 7461 002E 6568 5F66 7261 6D65 5F68 6472 ta..eh_frame_hdr
00000020: 002E 6568 5F66 7261 6D65 002E 7465 7874 ..eh_frame..text
00000030: 002E 636F 6D6D 656E 7400                ..comment.

@vinc vinc changed the title Add binary number support to Lisp Improve binary support Nov 25, 2023
@vinc vinc marked this pull request as ready for review November 26, 2023 10:55
@vinc vinc merged commit 9086221 into trunk Nov 26, 2023
1 check passed
@vinc vinc deleted the feature/binary branch November 26, 2023 10:56
@vinc vinc mentioned this pull request Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant