Skip to content

Instantly share code, notes, and snippets.

@arichardson
Created July 17, 2017 18:18
Show Gist options
  • Save arichardson/81e741bdc14f63162c65fde8546f436d to your computer and use it in GitHub Desktop.
Save arichardson/81e741bdc14f63162c65fde8546f436d to your computer and use it in GitHub Desktop.
crt1.o: file format elf64-tradbigmips
crt1.o
architecture: mips:4000, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x0000000000000000
private flags = 20000007: [abi=64] [mips3] [not 32bitmode] [noreorder] [PIC] [CPIC]
Sections:
Idx Name Size VMA LMA File off Algn
0 .note.tag 00000030 0000000000000000 0000000000000000 00000040 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .MIPS.options 00000050 0000000000000000 0000000000000000 00000070 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .text 00000280 0000000000000000 0000000000000000 000000c0 2**4
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
3 .rodata.str1.8 00000008 0000000000000000 0000000000000000 00000340 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .eh_frame 00000028 0000000000000000 0000000000000000 00000348 2**3
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
5 .data 00000000 0000000000000000 0000000000000000 00000370 2**4
CONTENTS, ALLOC, LOAD, DATA
6 .data.rel.local 00000008 0000000000000000 0000000000000000 00000370 2**3
CONTENTS, ALLOC, LOAD, RELOC, DATA
7 .bss 00000010 0000000000000000 0000000000000000 00000380 2**4
ALLOC
8 .comment 000000d0 0000000000000000 0000000000000000 00000380 2**0
CONTENTS, READONLY
9 .pdr 00000040 0000000000000000 0000000000000000 00000450 2**2
CONTENTS, RELOC, READONLY
10 .note.GNU-stack 00000000 0000000000000000 0000000000000000 00000490 2**0
CONTENTS, READONLY, CODE
11 .mdebug.abi64 00000000 0000000000000000 0000000000000000 00000490 2**0
CONTENTS, READONLY
SYMBOL TABLE:
0000000000000000 l d .note.tag 0000000000000000 .note.tag
0000000000000000 l d .MIPS.options 0000000000000000 .MIPS.options
0000000000000000 l d .text 0000000000000000 .text
0000000000000000 l d .rodata.str1.8 0000000000000000 .rodata.str1.8
0000000000000000 l d .eh_frame 0000000000000000 .eh_frame
0000000000000000 l d .data 0000000000000000 .data
0000000000000000 l d .data.rel.local 0000000000000000 .data.rel.local
0000000000000000 l d .bss 0000000000000000 .bss
0000000000000000 l d .comment 0000000000000000 .comment
0000000000000000 l d .pdr 0000000000000000 .pdr
0000000000000000 l d .note.GNU-stack 0000000000000000 .note.GNU-stack
0000000000000000 l d .mdebug.abi64 0000000000000000 .mdebug.abi64
0000000000000000 l df *ABS* 0000000000000000 crt1_c.c
00000000000001f0 l F .text 000000000000008c finalizer
0000000000000000 l O .note.tag 0000000000000018 crt_noinit_tag
0000000000000018 l O .note.tag 0000000000000018 abitag
0000000000000000 w *UND* 0000000000000000 _DYNAMIC
0000000000000000 w *UND* 0000000000000000 __fini_array_end
0000000000000000 *UND* 0000000000000000 _init
0000000000000000 g O .bss 0000000000000008 environ
0000000000000000 g F .text 0000000000000024 __start
0000000000000000 g O .data.rel.local 0000000000000008 __progname
0000000000000000 w *UND* 0000000000000000 __fini_array_start
0000000000000000 *UND* 0000000000000000 main
0000000000000000 *UND* 0000000000000000 _init_tls
0000000000000000 w *UND* 0000000000000000 __init_array_end
0000000000000030 g F .text 00000000000001bc _start1
0000000000000000 *UND* 0000000000000000 _fini
0000000000000000 *UND* 0000000000000000 atexit
0000000000000000 w *UND* 0000000000000000 __preinit_array_end
0000000000000000 *UND* 0000000000000000 exit
0000000000000000 w *UND* 0000000000000000 __init_array_start
0000000000000000 w *UND* 0000000000000000 __preinit_array_start
Disassembly of section .text:
0000000000000000 <__start>:
0: 67bdffe0 daddiu sp,sp,-32
4: ffbf0018 sd ra,24(sp)
8: ffbc0008 sd gp,8(sp)
c: 3c1c0000 lui gp,0x0
c: R_MIPS_GPREL16 __start
c: R_MIPS_SUB *ABS*
c: R_MIPS_HI16 *ABS*
10: 279c0000 addiu gp,gp,0
10: R_MIPS_GPREL16 __start
10: R_MIPS_SUB *ABS*
10: R_MIPS_LO16 *ABS*
14: 0399e02d daddu gp,gp,t9
18: df990000 ld t9,0(gp)
18: R_MIPS_CALL16 _start1
18: R_MIPS_NONE *ABS*
18: R_MIPS_NONE *ABS*
1c: 03200008 jr t9
20: 00000000 nop
...
0000000000000030 <_start1>:
30: 67bdffc0 daddiu sp,sp,-64
34: ffbf0038 sd ra,56(sp)
38: ffbc0030 sd gp,48(sp)
3c: ffb50028 sd s5,40(sp)
40: ffb40020 sd s4,32(sp)
44: ffb30018 sd s3,24(sp)
48: ffb20010 sd s2,16(sp)
4c: ffb10008 sd s1,8(sp)
50: ffb00000 sd s0,0(sp)
54: 3c1c0000 lui gp,0x0
54: R_MIPS_GPREL16 _start1
54: R_MIPS_SUB *ABS*
54: R_MIPS_HI16 *ABS*
58: 0399e02d daddu gp,gp,t9
5c: 679c0000 daddiu gp,gp,0
5c: R_MIPS_GPREL16 _start1
5c: R_MIPS_SUB *ABS*
5c: R_MIPS_LO16 *ABS*
60: 8c900004 lw s0,4(a0)
64: 64910008 daddiu s1,a0,8
68: 64840010 daddiu a0,a0,16
6c: 001010f8 dsll v0,s0,0x3
70: 0082902d daddu s2,a0,v0
74: df830000 ld v1,0(gp)
74: R_MIPS_GOT_DISP environ
74: R_MIPS_NONE *ABS*
74: R_MIPS_NONE *ABS*
78: dc620000 ld v0,0(v1)
7c: 50400002 beqzl v0,88 <_start1+0x58>
80: fc720000 sd s2,0(v1)
84: 00000000 nop
88: 1a000012 blez s0,d4 <_start1+0xa4>
8c: 00000000 nop
90: de230000 ld v1,0(s1)
94: 1060000f beqz v1,d4 <_start1+0xa4>
98: 00000000 nop
9c: df820000 ld v0,0(gp)
9c: R_MIPS_GOT_DISP __progname
9c: R_MIPS_NONE *ABS*
9c: R_MIPS_NONE *ABS*
a0: fc430000 sd v1,0(v0)
a4: 80640000 lb a0,0(v1)
a8: 1080000a beqz a0,d4 <_start1+0xa4>
ac: 64630001 daddiu v1,v1,1
b0: 0040302d move a2,v0
b4: 00000000 nop
b8: 2402002f li v0,47
bc: 50820002 beql a0,v0,c8 <_start1+0x98>
c0: fcc30000 sd v1,0(a2)
c4: 00000000 nop
c8: 80640000 lb a0,0(v1)
cc: 1480fffa bnez a0,b8 <_start1+0x88>
d0: 64630001 daddiu v1,v1,1
d4: df820000 ld v0,0(gp)
d4: R_MIPS_GOT_DISP _DYNAMIC
d4: R_MIPS_NONE *ABS*
d4: R_MIPS_NONE *ABS*
d8: 10400006 beqz v0,f4 <_start1+0xc4>
dc: 00a0202d move a0,a1
e0: df990000 ld t9,0(gp)
e0: R_MIPS_CALL16 atexit
e0: R_MIPS_NONE *ABS*
e0: R_MIPS_NONE *ABS*
e4: 0320f809 jalr t9
e4: R_MIPS_JALR atexit
e4: R_MIPS_NONE *ABS*
e4: R_MIPS_NONE *ABS*
e8: 00000000 nop
ec: 10000036 b 1c8 <_start1+0x198>
f0: 0200202d move a0,s0
f4: df990000 ld t9,0(gp)
f4: R_MIPS_CALL16 _init_tls
f4: R_MIPS_NONE *ABS*
f4: R_MIPS_NONE *ABS*
f8: 0320f809 jalr t9
f8: R_MIPS_JALR _init_tls
f8: R_MIPS_NONE *ABS*
f8: R_MIPS_NONE *ABS*
fc: 00000000 nop
100: df840000 ld a0,0(gp)
100: R_MIPS_GOT_DISP .text+0x1f0
100: R_MIPS_NONE *ABS*+0x1f0
100: R_MIPS_NONE *ABS*+0x1f0
104: df990000 ld t9,0(gp)
104: R_MIPS_CALL16 atexit
104: R_MIPS_NONE *ABS*
104: R_MIPS_NONE *ABS*
108: 0320f809 jalr t9 [65/45662]
108: R_MIPS_JALR atexit
108: R_MIPS_NONE *ABS*
108: R_MIPS_NONE *ABS*
10c: 00000000 nop
110: df830000 ld v1,0(gp)
110: R_MIPS_GOT_DISP __preinit_array_start
110: R_MIPS_NONE *ABS*
110: R_MIPS_NONE *ABS*
114: 10600013 beqz v1,164 <_start1+0x134>
118: 00000000 nop
11c: df820000 ld v0,0(gp)
11c: R_MIPS_GOT_DISP __preinit_array_end
11c: R_MIPS_NONE *ABS*
11c: R_MIPS_NONE *ABS*
120: 0043102f dsubu v0,v0,v1
124: 0002a8fb dsra s5,v0,0x3
128: 12a0000e beqz s5,164 <_start1+0x134>
12c: 00000000 nop
130: 0060a02d move s4,v1
134: 0000982d move s3,zero
138: de990000 ld t9,0(s4)
13c: 2f220002 sltiu v0,t9,2
140: 54400006 bnezl v0,15c <_start1+0x12c>
144: 66730001 daddiu s3,s3,1
148: 0200202d move a0,s0
14c: 0220282d move a1,s1
150: 0320f809 jalr t9
154: 0240302d move a2,s2
158: 66730001 daddiu s3,s3,1
15c: 16b3fff6 bne s5,s3,138 <_start1+0x108>
160: 66940008 daddiu s4,s4,8
164: df990000 ld t9,0(gp)
164: R_MIPS_CALL16 _init
164: R_MIPS_NONE *ABS*
164: R_MIPS_NONE *ABS*
168: 0320f809 jalr t9
168: R_MIPS_JALR _init
168: R_MIPS_NONE *ABS*
168: R_MIPS_NONE *ABS*
16c: 00000000 nop
170: df830000 ld v1,0(gp)
170: R_MIPS_GOT_DISP __init_array_start
170: R_MIPS_NONE *ABS*
170: R_MIPS_NONE *ABS*
174: 10600014 beqz v1,1c8 <_start1+0x198>
178: 0200202d move a0,s0
17c: df820000 ld v0,0(gp)
17c: R_MIPS_GOT_DISP __init_array_end
17c: R_MIPS_NONE *ABS*
17c: R_MIPS_NONE *ABS*
180: 0043102f dsubu v0,v0,v1
184: 0002a8fb dsra s5,v0,0x3
188: 12a00010 beqz s5,1cc <_start1+0x19c>
18c: 0220282d move a1,s1
190: 0060a02d move s4,v1
194: 0000982d move s3,zero
198: de990000 ld t9,0(s4)
19c: 2f220002 sltiu v0,t9,2
1a0: 54400006 bnezl v0,1bc <_start1+0x18c>
1a4: 66730001 daddiu s3,s3,1
1a8: 0200202d move a0,s0
1ac: 0220282d move a1,s1
1b0: 0320f809 jalr t9
1b4: 0240302d move a2,s2
1b8: 66730001 daddiu s3,s3,1
1bc: 16b3fff6 bne s5,s3,198 <_start1+0x168>
1c0: 66940008 daddiu s4,s4,8
1c4: 0200202d move a0,s0
1c8: 0220282d move a1,s1
1cc: 0240302d move a2,s2
1d0: df990000 ld t9,0(gp)
1d0: R_MIPS_CALL16 main
1d0: R_MIPS_NONE *ABS*
1d0: R_MIPS_NONE *ABS*
1d4: 0320f809 jalr t9
1d4: R_MIPS_JALR main
1d4: R_MIPS_NONE *ABS*
1d4: R_MIPS_NONE *ABS*
1d8: 00000000 nop
1dc: 0040202d move a0,v0
1e0: df990000 ld t9,0(gp)
1e0: R_MIPS_CALL16 exit
1e0: R_MIPS_NONE *ABS*
1e0: R_MIPS_NONE *ABS*
1e4: 0320f809 jalr t9
1e4: R_MIPS_JALR exit
1e4: R_MIPS_NONE *ABS*
1e4: R_MIPS_NONE *ABS*
1e8: 00000000 nop
1ec: 00000000 nop
00000000000001f0 <finalizer>:
1f0: 67bdffe0 daddiu sp,sp,-32
1f4: ffbf0018 sd ra,24(sp)
1f8: ffbc0010 sd gp,16(sp)
1fc: ffb10008 sd s1,8(sp)
200: ffb00000 sd s0,0(sp)
204: 3c1c0000 lui gp,0x0
204: R_MIPS_GPREL16 .text+0xffffffffffff8201
204: R_MIPS_SUB *ABS*+0xffffffffffff8201
204: R_MIPS_HI16 *ABS*+0xffffffffffff8201
208: 0399e02d daddu gp,gp,t9
20c: 679c0000 daddiu gp,gp,0
20c: R_MIPS_GPREL16 .text+0xffffffffffff8201
20c: R_MIPS_SUB *ABS*+0xffffffffffff8201
20c: R_MIPS_LO16 *ABS*+0xffffffffffff8201
210: df840000 ld a0,0(gp)
210: R_MIPS_GOT_DISP __fini_array_start
210: R_MIPS_NONE *ABS*
210: R_MIPS_NONE *ABS*
214: 10800010 beqz a0,258 <finalizer+0x68>
218: 00000000 nop
21c: df820000 ld v0,0(gp)
21c: R_MIPS_GOT_DISP __fini_array_end
21c: R_MIPS_NONE *ABS*
21c: R_MIPS_NONE *ABS*
220: 0044102f dsubu v0,v0,a0
224: 000218fb dsra v1,v0,0x3
228: 1060000b beqz v1,258 <finalizer+0x68>
22c: 000310f8 dsll v0,v1,0x3
230: 0044882d daddu s1,v0,a0
234: 0060802d move s0,v1
238: de39fff8 ld t9,-8(s1)
23c: 2f220002 sltiu v0,t9,2
240: 14400003 bnez v0,250 <finalizer+0x60>
244: 6610ffff daddiu s0,s0,-1
248: 0320f809 jalr t9
24c: 00000000 nop
250: 1600fff9 bnez s0,238 <finalizer+0x48>
254: 6631fff8 daddiu s1,s1,-8
258: df990000 ld t9,0(gp)
258: R_MIPS_CALL16 _fini
258: R_MIPS_NONE *ABS*
258: R_MIPS_NONE *ABS*
25c: 0320f809 jalr t9
25c: R_MIPS_JALR _fini
25c: R_MIPS_NONE *ABS*
25c: R_MIPS_NONE *ABS*
260: 00000000 nop
264: dfbf0018 ld ra,24(sp)
268: dfbc0010 ld gp,16(sp)
26c: dfb10008 ld s1,8(sp)
270: dfb00000 ld s0,0(sp)
274: 03e00008 jr ra
278: 67bd0020 daddiu sp,sp,32
27c: 00000000 nop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment