I'm confused by the behavior of xxd, here's what I'm doing.
I have a xxd dump :
$ head dump
00000000: 7f45 4c46 0201 0103 0000 0000 0000 0000 .ELF............
00000010: 0200 3e00 0100 0000 107f 4400 0000 0000 ..>.......D.....
00000020: 4000 0000 0000 0000 0000 0000 0000 0000 @...............
00000030: 0000 0000 4000 3800 0200 4000 0000 0000 ....@.8...@.....
00000040: 0100 0000 0500 0000 0000 0000 0000 0000 ................
00000050: 0000 4000 0000 0000 0000 4000 0000 0000 ..@.......@.....
00000060: 2487 0400 0000 0000 2487 0400 0000 0000 $.......$.......
00000070: 0000 2000 0000 0000 0100 0000 0600 0000 .. .............
00000080: 2854 0b00 0000 0000 2854 6b00 0000 0000 (T......(Tk.....
00000090: 2854 6b00 0000 0000 0000 0000 0000 0000 (Tk.............
But when I xxd -r it, the first byte is changed to another value:
$ xxd -r dump output
$ xxd output | head
00000000: ce45 4c46 0201 0103 0000 0000 0000 0000 .ELF............
00000010: 0200 3e00 0100 0000 107f 4400 0000 0000 ..>.......D.....
00000020: 4000 0000 0000 0000 0000 0000 0000 0000 @...............
00000030: 0000 0000 4000 3800 0200 4000 0000 0000 ....@.8...@.....
00000040: 0100 0000 0500 0000 0000 0000 0000 0000 ................
00000050: 0000 4000 0000 0000 0000 4000 0000 0000 ..@.......@.....
00000060: 2487 0400 0000 0000 2487 0400 0000 0000 $.......$.......
00000070: 0000 2000 0000 0000 0100 0000 0600 0000 .. .............
00000080: 2854 0b00 0000 0000 2854 6b00 0000 0000 (T......(Tk.....
00000090: 2854 6b00 0000 0000 0000 0000 0000 0000 (Tk.............
As you can see everything stays the same but the first byte is ce instead of 7f.