Skip to content

Commit

Permalink
note about mask
Browse files Browse the repository at this point in the history
  • Loading branch information
reteps committed Dec 4, 2023
1 parent 2413860 commit 18844eb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions blog/fast-gdb/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,20 @@ sudo apt install gcc:amd64

## Rosetta Passthrough

Then follow the steps to register Rosetta passthrough (well described in the [UTM Docs](https://docs.getutm.app/advanced/rosetta/))
Then follow the steps to register Rosetta passthrough (well described in the [UTM Docs](https://docs.getutm.app/advanced/rosetta/)).

```bash
sudo mkdir /media/rosetta
sudo mount -t virtiofs rosetta /media/rosetta
sudo echo 'rosetta\t/media/rosetta\tvirtiofs\tro,nofail\t0\t0' >> /etc/fstab
sudo /usr/sbin/update-binfmts --install rosetta /media/rosetta/rosetta \
--magic "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00" \
--mask "\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \
--magic "<COPY FROM LINK> \
--mask "<COPY FROM LINK>" \
--credentials yes --preserve no --fix-binary yes
```
Copy the command from the tutorial, my blog renderer messes up the mask/magic bytes.
## Your First Test
You can ensure everything is working by writing a simple `main.c` binary:
Expand Down

0 comments on commit 18844eb

Please sign in to comment.