Skip to content

Instantly share code, notes, and snippets.

@jix

jix/elfs.diff Secret

Created January 20, 2021 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jix/4b27c0e71353aba43a7b0be7748e6f73 to your computer and use it in GitHub Desktop.
Save jix/4b27c0e71353aba43a7b0be7748e6f73 to your computer and use it in GitHub Desktop.
% diff -u =(readelf -a build/m1n1.elf) =(readelf -a saved/m1n1.elf)
--- /tmp/zshVTWgwd 2021-01-20 22:31:02.630475843 +0100
+++ /tmp/zshYbq9zb 2021-01-20 22:31:02.637142538 +0100
@@ -29,13 +29,13 @@
[ 2] .init PROGBITS 0000000000004000 00014000
0000000000000910 0000000000000000 AX 0 0 16384
[ 3] .rodata PROGBITS 000000000000c000 0001c000
- 00000000000006f0 0000000000000000 A 0 0 16384
+ 00000000000006e8 0000000000000000 A 0 0 16384
[ 4] .data PROGBITS 0000000000010000 00020000
0000000000004000 0000000000000008 WA 0 0 16384
[ 5] .text PROGBITS 0000000000008000 00018000
0000000000004000 0000000000000008 AX 0 0 16384
- [ 6] .rela.dyn RELA 000000000000c6f0 0001c6f0
- 0000000000003910 0000000000000018 A 0 0 8
+ [ 6] .rela.dyn RELA 000000000000c6e8 0001c6e8
+ 0000000000003918 0000000000000018 A 0 0 8
[ 7] .bss NOBITS 0000000000014000 00024000
0000000000024000 0000000000000000 WA 0 0 16384
[ 8] .symtab SYMTAB 0000000000000000 00024000
@@ -73,7 +73,7 @@
There is no dynamic section in this file.
-Relocation section '.rela.dyn' at offset 0x1c6f0 contains 608 entries:
+Relocation section '.rela.dyn' at offset 0x1c6e8 contains 609 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000010020 000000000403 R_AARCH64_RELATIV 4000
000000010008 000000000403 R_AARCH64_RELATIV 0
@@ -683,6 +683,7 @@
000000000000 000000000000 R_AARCH64_NONE 0
000000000000 000000000000 R_AARCH64_NONE 0
000000000000 000000000000 R_AARCH64_NONE 0
+000000000000 000000000000 R_AARCH64_NONE 0
The decoding of unwind sections for machine type AArch64 is not currently supported.
@@ -694,7 +695,7 @@
3: 000000000000c000 0 SECTION LOCAL DEFAULT 3
4: 0000000000010000 0 SECTION LOCAL DEFAULT 4
5: 0000000000008000 0 SECTION LOCAL DEFAULT 5
- 6: 000000000000c6f0 0 SECTION LOCAL DEFAULT 6
+ 6: 000000000000c6e8 0 SECTION LOCAL DEFAULT 6
7: 0000000000014000 0 SECTION LOCAL DEFAULT 7
8: 0000000000000000 0 FILE LOCAL DEFAULT ABS build/start.o
9: 0000000000004000 0 NOTYPE LOCAL DEFAULT 2 $x
@@ -734,26 +735,26 @@
43: 000000000000c3d0 0 NOTYPE LOCAL DEFAULT 3 $d
44: 0000000000008b70 0 NOTYPE LOCAL DEFAULT 5 $x
45: 0000000000000000 0 FILE LOCAL DEFAULT ABS proxy.c
- 46: 000000000000c480 0 NOTYPE LOCAL DEFAULT 3 $d
+ 46: 000000000000c478 0 NOTYPE LOCAL DEFAULT 3 $d
47: 0000000000008d00 0 NOTYPE LOCAL DEFAULT 5 $x
- 48: 000000000000c4a0 0 NOTYPE LOCAL DEFAULT 3 $d
+ 48: 000000000000c498 0 NOTYPE LOCAL DEFAULT 3 $d
49: 0000000000000000 0 FILE LOCAL DEFAULT ABS startup.c
50: 00000000000092a0 0 NOTYPE LOCAL DEFAULT 5 $x
- 51: 000000000000c4c8 0 NOTYPE LOCAL DEFAULT 3 $d
+ 51: 000000000000c4c0 0 NOTYPE LOCAL DEFAULT 3 $d
52: 0000000000009300 0 NOTYPE LOCAL DEFAULT 5 $x
- 53: 000000000000c688 0 NOTYPE LOCAL DEFAULT 3 $d
+ 53: 000000000000c680 0 NOTYPE LOCAL DEFAULT 3 $d
54: 0000000000009450 0 NOTYPE LOCAL DEFAULT 5 $x
55: 0000000000014000 0 NOTYPE LOCAL DEFAULT 7 $d
56: 0000000000014008 0 NOTYPE LOCAL DEFAULT 7 $d
57: 0000000000014010 0 NOTYPE LOCAL DEFAULT 7 $d
58: 0000000000000000 0 FILE LOCAL DEFAULT ABS vsprintf.c
- 59: 000000000000c6b0 0 NOTYPE LOCAL DEFAULT 3 $d
+ 59: 000000000000c6a8 0 NOTYPE LOCAL DEFAULT 3 $d
60: 0000000000009b30 0 NOTYPE LOCAL DEFAULT 5 $x
61: 0000000000009b30 360 FUNC LOCAL DEFAULT 5 fmtstr
- 62: 000000000000c6b8 0 NOTYPE LOCAL DEFAULT 3 $d
+ 62: 000000000000c6b0 0 NOTYPE LOCAL DEFAULT 3 $d
63: 0000000000009ca0 0 NOTYPE LOCAL DEFAULT 5 $x
64: 0000000000009ca0 1052 FUNC LOCAL DEFAULT 5 fmtint
- 65: 000000000000c6e8 0 NOTYPE LOCAL DEFAULT 3 $d
+ 65: 000000000000c6e0 0 NOTYPE LOCAL DEFAULT 3 $d
66: 000000000000a0c0 0 NOTYPE LOCAL DEFAULT 5 $x
67: 000000000000ab10 0 NOTYPE LOCAL DEFAULT 5 $x
68: 0000000000000000 0 FILE LOCAL DEFAULT ABS build/exception_asm.o
@@ -813,7 +814,7 @@
122: 0000000000004000 0 NOTYPE GLOBAL DEFAULT 1 _hdr_end
123: 00000000000094f0 32 FUNC GLOBAL DEFAULT 5 memcpy
124: 0000000000010000 0 NOTYPE GLOBAL DEFAULT 6 _rodata_end
- 125: 000000000000c768 0 NOTYPE GLOBAL DEFAULT 6 _rela_end
+ 125: 000000000000c760 0 NOTYPE GLOBAL DEFAULT 6 _rela_end
126: 0000000000010030 0 NOTYPE GLOBAL DEFAULT 4 _got_end
127: 000000000000a0c0 2636 FUNC GLOBAL DEFAULT 5 vsnprintf
128: 0000000000008650 172 FUNC GLOBAL DEFAULT 5 adt_path_offset
@@ -876,7 +877,7 @@
185: 00000000000048c4 0 FUNC GLOBAL DEFAULT 2 debug_putc
186: 0000000000009800 72 FUNC GLOBAL DEFAULT 5 checksum
187: 0000000000008040 0 FUNC GLOBAL DEFAULT 5 push_hi_regs
- 188: 000000000000c6f0 0 NOTYPE GLOBAL DEFAULT 6 _rela_start
+ 188: 000000000000c6e8 0 NOTYPE GLOBAL DEFAULT 6 _rela_start
189: 0000000000009790 28 FUNC GLOBAL DEFAULT 5 uart_flush
190: 0000000000009a70 192 FUNC GLOBAL DEFAULT 5 debug_printf
191: 00000000000095b0 40 FUNC GLOBAL DEFAULT 5 strlen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment