rendered paste bodytypedef struct {
int a;
int b;
int c;
int d;
} foo;
foo blah()
{
foo my;
my.a = 1;
my.b = 5;
my.c = 6;
my.d = 8;
return my;
}
int main()
{
foo blarg = blah();
return 0;
}
-bash-3.00$ cc -S -g foo.c
-bash-3.00$ cat foo.s
.section .text,"ax"
.align 4
.globl blah
.type blah,@function
.align 16
blah:
pushl %ebp
movl %esp,%ebp
subl $24,%esp
.L13:
.L14:
.L16:
/ File foo.c:
/ Line 11
movl $1, -20(%ebp)
.L17:
/ Line 12
movl $5, -16(%ebp)
.L18:
/ Line 13
movl $6, -12(%ebp)
.L19:
/ Line 14
movl $8, -8(%ebp)
.L20:
/ Line 16
lea -20(%ebp), %eax
movl %eax, -4(%ebp)
movl -4(%ebp), %eax
movl 0(%eax), %eax
movl %eax, -24(%ebp)
jmp .L12
.align 4
jmp .L12
.align 4
.L21:
.L22:
.L12:
movl 8(%ebp), %ecx
movl -4(%ebp), %edx
movl 0(%edx), %eax
movl %eax, 0(%ecx)
movl 4(%edx), %eax
movl %eax, 4(%ecx)
movl 8(%edx), %eax
movl %eax, 8(%ecx)
movl 12(%edx), %eax
movl %eax, 12(%ecx)
movl %ecx, %eax
leave
ret $4
.size blah,.-blah
.align 4
.globl main
.type main,@function
.align 16
main:
pushl %ebp
movl %esp,%ebp
subl $48,%esp
movl %ebx,-48(%ebp)
.L25:
.L26:
.L28:
/ File foo.c:
/ Line 21
lea -20(%ebp), %eax
movl %eax, -24(%ebp)
lea -40(%ebp), %ebx
pushl %ebx
call blah
movl -24(%ebp), %edx
movl 0(%ebx), %eax
movl %eax, 0(%edx)
movl 4(%ebx), %eax
movl %eax, 4(%edx)
movl 8(%ebx), %eax
movl %eax, 8(%edx)
movl 12(%ebx), %eax
movl %eax, 12(%edx)
movl -24(%ebp), %eax
movl 0(%eax), %eax
movl %eax, -44(%ebp)
.L29:
/ Line 22
movl $0, -4(%ebp)
jmp .L24
.align 4
jmp .L24
.align 4
.L30:
.L31:
.L24:
movl -4(%ebp), %eax
movl -48(%ebp),%ebx
leave
ret
.size main,.-main
.section .bss,"aw"
Bbss.bss:
.zero 0
.size Bbss.bss,0
.section .data,"aw"
Ddata.data:
.zero 0
.size Ddata.data,0
.section .rodata,"a"
Drodata.rodata:
.zero 0
.size Drodata.rodata,0
.globl .XBAjaAlg_zBGFzJ.blah.__func__
.XBAjaAlg_zBGFzJ.blah.__func__:
.byte 0x62,0x6c,0x61,0x68
.set .,.+1
.type .XBAjaAlg_zBGFzJ.blah.__func__,@object
.size .XBAjaAlg_zBGFzJ.blah.__func__,5
.globl .XBAjaAlg_zBGFzJ.main.__func__
.XBAjaAlg_zBGFzJ.main.__func__:
.byte 0x6d,0x61,0x69,0x6e
.set .,.+1
.type .XBAjaAlg_zBGFzJ.main.__func__,@object
.size .XBAjaAlg_zBGFzJ.main.__func__,5
.file "foo.c"
.ident "acomp: Sun C 5.8 Patch 121016-05 2007/01/10"
.globl __fsr_init_value
__fsr_init_value = 0x0
/ Begin sdCreateSection : .debug_info
/ Section Info: link_name/strtab=, entsize=0x1, adralign=0x1, flags=0x0
/ Section Data Blocks:
/ reloc[0]: knd=2, off=6, siz=4, lab1=.debug_abbrev, lab2=, loff=0
/ reloc[1]: knd=2, off=208, siz=4, lab1=.debug_line, lab2=, loff=0
/ reloc[2]: knd=0, off=222, siz=4, lab1=blah, lab2=, loff=0
/ reloc[3]: knd=0, off=226, siz=4, lab1=.L22, lab2=, loff=0
/ reloc[4]: knd=0, off=305, siz=4, lab1=.XBAjaAlg_zBGFzJ.blah.__func__, lab2=, loff=0
/ reloc[5]: knd=0, off=422, siz=4, lab1=main, lab2=, loff=0
/ reloc[6]: knd=0, off=426, siz=4, lab1=.L31, lab2=, loff=0
/ reloc[7]: knd=0, off=508, siz=4, lab1=.XBAjaAlg_zBGFzJ.main.__func__, lab2=, loff=0
.section .debug_info
.byte 0x14,0x02,0x00,0x00,0x02,0x00
.4byte .debug_abbrev
.byte 0x04,0x01,0x00,0x00,0x00,0x00,0x04,0x00
.byte 0x00,0x00,0x66,0x6f,0x6f,0x2e,0x63,0x00
.byte 0x0c,0x2f,0x65,0x78,0x70,0x6f,0x72,0x74
.byte 0x2f,0x68,0x6f,0x6d,0x65,0x2f,0x65,0x72
.byte 0x72,0x6f,0x72,0x34,0x30,0x34,0x00,0x20
.byte 0x2f,0x6f,0x70,0x74,0x2f,0x53,0x55,0x4e
.byte 0x57,0x73,0x70,0x72,0x6f,0x2f,0x70,0x72
.byte 0x6f,0x64,0x2f,0x62,0x69,0x6e,0x2f,0x63
.byte 0x63,0x20,0x2d,0x53,0x20,0x2d,0x67,0x20
.byte 0x20,0x66,0x6f,0x6f,0x2e,0x63,0x20,0x2d
.byte 0x57,0x30,0x2c,0x2d,0x78,0x70,0x2e,0x58
.byte 0x41,0x41,0x6a,0x61,0x41,0x6c,0x67,0x5f
.byte 0x7a,0x42,0x47,0x46,0x7a,0x4a,0x2e,0x00
.byte 0x58,0x61,0x3b,0x67,0x3b,0x52,0x3d,0x53
.byte 0x75,0x6e,0x20,0x43,0x20,0x35,0x2e,0x38
.byte 0x20,0x50,0x61,0x74,0x63,0x68,0x20,0x31
.byte 0x32,0x31,0x30,0x31,0x36,0x2d,0x30,0x35
.byte 0x20,0x32,0x30,0x30,0x37,0x2f,0x30,0x31
.byte 0x2f,0x31,0x30,0x3b,0x47,0x3d,0x2e,0x58
.byte 0x41,0x41,0x6a,0x61,0x41,0x6c,0x67,0x5f
.byte 0x7a,0x42,0x47,0x46,0x7a,0x4a,0x2e,0x3b
.byte 0x62,0x61,0x63,0x6b,0x65,0x6e,0x64,0x3b
.byte 0x72,0x61,0x77,0x3b,0x63,0x64,0x3b,0x00
.byte 0x44,0x42,0x47,0x5f,0x47,0x45,0x4e,0x20
.byte 0x35,0x2e,0x30,0x2e,0x38,0x00
.4byte .debug_line
.byte 0x02,0x62,0x6c,0x61,0x68,0x00,0x01,0x02
.byte 0x01,0x09
.4byte blah
.4byte .L22
.byte 0x01,0x55,0x6c,0x01,0x00,0x00,0x01,0x36
.byte 0x01,0x00,0x00,0x03,0x6d,0x79,0x00,0x6c
.byte 0x01,0x00,0x00,0x01,0x01,0x0a,0x02,0x91
.byte 0x6c,0x04,0x5f,0x5f,0x66,0x75,0x6e,0x63
.byte 0x5f,0x5f,0x00,0x8a,0x01,0x00,0x00,0x03
.byte 0x01,0x09,0x2e,0x58,0x42,0x41,0x6a,0x61
.byte 0x41,0x6c,0x67,0x5f,0x7a,0x42,0x47,0x46
.byte 0x7a,0x4a,0x2e,0x62,0x6c,0x61,0x68,0x2e
.byte 0x5f,0x5f,0x66,0x75,0x6e,0x63,0x5f,0x5f
.byte 0x00,0x05,0x03
.4byte .XBAjaAlg_zBGFzJ.blah.__func__
.byte 0x00,0x05,0x69,0x6e,0x74,0x00,0x05,0x04
.byte 0x06,0x10,0x6c,0x01,0x00,0x00,0x07,0x61
.byte 0x00,0x36,0x01,0x00,0x00,0x02,0x23,0x00
.byte 0x07,0x62,0x00,0x36,0x01,0x00,0x00,0x02
.byte 0x23,0x04,0x07,0x63,0x00,0x36,0x01,0x00
.byte 0x00,0x02,0x23,0x08,0x07,0x64,0x00,0x36
.byte 0x01,0x00,0x00,0x02,0x23,0x0c,0x00,0x08
.byte 0x3d,0x01,0x00,0x00,0x66,0x6f,0x6f,0x00
.byte 0x05,0x63,0x68,0x61,0x72,0x00,0x06,0x01
.byte 0x09,0x75,0x01,0x00,0x00,0x05,0x6c,0x6f
.byte 0x6e,0x67,0x00,0x05,0x04,0x0a,0x7d,0x01
.byte 0x00,0x00,0x05,0x9b,0x01,0x00,0x00,0x0b
.byte 0x82,0x01,0x00,0x00,0x04,0x00,0x0c,0x6d
.byte 0x61,0x69,0x6e,0x00,0x01,0x02,0x02,0x01
.byte 0x14
.4byte main
.4byte .L31
.byte 0x01,0x55,0x36,0x01,0x00,0x00,0x01,0x01
.byte 0x02,0x00,0x00,0x03,0x62,0x6c,0x61,0x72
.byte 0x67,0x00,0x6c,0x01,0x00,0x00,0x01,0x01
.byte 0x15,0x02,0x91,0x6c,0x04,0x5f,0x5f,0x66
.byte 0x75,0x6e,0x63,0x5f,0x5f,0x00,0x06,0x02
.byte 0x00,0x00,0x03,0x01,0x14,0x2e,0x58,0x42
.byte 0x41,0x6a,0x61,0x41,0x6c,0x67,0x5f,0x7a
.byte 0x42,0x47,0x46,0x7a,0x4a,0x2e,0x6d,0x61
.byte 0x69,0x6e,0x2e,0x5f,0x5f,0x66,0x75,0x6e
.byte 0x63,0x5f,0x5f,0x00,0x05,0x03
.4byte .XBAjaAlg_zBGFzJ.main.__func__
.byte 0x00,0x09,0x75,0x01,0x00,0x00,0x0d,0x01
.byte 0x02,0x00,0x00,0x05,0x0b,0x82,0x01,0x00
.byte 0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00
/ End sdCreateSection
/ Begin sdCreateSection : .debug_line
/ Section Info: link_name/strtab=, entsize=0x1, adralign=0x1, flags=0x0
/ Section Data Blocks:
/ reloc[0]: knd=0, off=60, siz=4, lab1=blah, lab2=, loff=0
/ reloc[1]: knd=0, off=67, siz=4, lab1=.L16, lab2=, loff=0
/ reloc[2]: knd=0, off=78, siz=4, lab1=.L17, lab2=, loff=0
/ reloc[3]: knd=0, off=86, siz=4, lab1=.L18, lab2=, loff=0
/ reloc[4]: knd=0, off=94, siz=4, lab1=.L19, lab2=, loff=0
/ reloc[5]: knd=0, off=102, siz=4, lab1=.L20, lab2=, loff=0
/ reloc[6]: knd=0, off=110, siz=4, lab1=.L21, lab2=, loff=0
/ reloc[7]: knd=0, off=118, siz=4, lab1=main, lab2=, loff=0
/ reloc[8]: knd=0, off=125, siz=4, lab1=.L28, lab2=, loff=0
/ reloc[9]: knd=0, off=135, siz=4, lab1=.L29, lab2=, loff=0
/ reloc[10]: knd=0, off=143, siz=4, lab1=.L30, lab2=, loff=0
.section .debug_line
.byte 0x90,0x00,0x00,0x00,0x02,0x00,0x2f,0x00
.byte 0x00,0x00,0x01,0x00,0xff,0x04,0x0a,0x00
.byte 0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x01
.byte 0x2f,0x65,0x78,0x70,0x6f,0x72,0x74,0x2f
.byte 0x68,0x6f,0x6d,0x65,0x2f,0x65,0x72,0x72
.byte 0x6f,0x72,0x34,0x30,0x34,0x00,0x00,0x66
.byte 0x6f,0x6f,0x2e,0x63,0x00,0x01,0x00,0x00
.byte 0x00,0x00,0x05,0x02
.4byte blah
.byte 0x00,0x05,0x02
.4byte .L16
.byte 0x06,0x03,0x0a,0x01,0x00,0x05,0x02
.4byte .L17
.byte 0x0c,0x00,0x05,0x02
.4byte .L18
.byte 0x0c,0x00,0x05,0x02
.4byte .L19
.byte 0x0c,0x00,0x05,0x02
.4byte .L20
.byte 0x0d,0x00,0x05,0x02
.4byte .L21
.byte 0x0c,0x00,0x05,0x02
.4byte main
.byte 0x00,0x05,0x02
.4byte .L28
.byte 0x03,0x04,0x01,0x00,0x05,0x02
.4byte .L29
.byte 0x0c,0x00,0x05,0x02
.4byte .L30
.byte 0x0c
/ End sdCreateSection
/ Begin sdCreateSection : .debug_abbrev
/ Section Info: link_name/strtab=, entsize=0x1, adralign=0x1, flags=0x0
/ Section Data Blocks:
.section .debug_abbrev
.byte 0x01,0x11,0x01,0x11,0x01,0x12,0x01,0x03
.byte 0x08,0x13,0x0b,0x1b,0x08,0x85,0x44,0x08
.byte 0x87,0x44,0x08,0x25,0x08,0x10,0x06,0x00
.byte 0x00,0x02,0x2e,0x01,0x03,0x08,0x3f,0x0c
.byte 0x17,0x0b,0x3a,0x0b,0x3b,0x0b,0x11,0x01
.byte 0x12,0x01,0x40,0x0a,0x49,0x13,0x88,0x44
.byte 0x0b,0x01,0x13,0x00,0x00,0x03,0x34,0x00
.byte 0x03,0x08,0x49,0x13,0x17,0x0b,0x3a,0x0b
.byte 0x3b,0x0b,0x02,0x0a,0x00,0x00,0x04,0x34
.byte 0x00,0x03,0x08,0x49,0x13,0x17,0x0b,0x3a
.byte 0x0b,0x3b,0x0b,0xa6,0x44,0x08,0x02,0x0a
.byte 0x00,0x00,0x05,0x24,0x00,0x03,0x08,0x3e
.byte 0x0b,0x0b,0x0b,0x00,0x00,0x06,0x13,0x01
.byte 0x0b,0x0b,0x01,0x13,0x00,0x00,0x07,0x0d
.byte 0x00,0x03,0x08,0x49,0x13,0x38,0x0a,0x00
.byte 0x00,0x08,0x16,0x00,0x49,0x13,0x03,0x08
.byte 0x00,0x00,0x09,0x26,0x00,0x49,0x13,0x00
.byte 0x00,0x0a,0x01,0x01,0x49,0x13,0x0b,0x0b
.byte 0x01,0x13,0x00,0x00,0x0b,0x21,0x00,0x49
.byte 0x13,0x2f,0x0b,0x00,0x00,0x0c,0x2e,0x01
.byte 0x03,0x08,0x3f,0x0c,0x17,0x0b,0x36,0x0b
.byte 0x3a,0x0b,0x3b,0x0b,0x11,0x01,0x12,0x01
.byte 0x40,0x0a,0x49,0x13,0x88,0x44,0x0b,0x01
.byte 0x13,0x00,0x00,0x0d,0x01,0x01,0x49,0x13
.byte 0x0b,0x0b,0x00,0x00,0x00
/ End sdCreateSection
/ Begin sdCreateSection : .debug_pubnames
/ Section Info: link_name/strtab=, entsize=0x1, adralign=0x1, flags=0x0
/ Section Data Blocks:
/ reloc[0]: knd=2, off=6, siz=4, lab1=.debug_info, lab2=, loff=0
.section .debug_pubnames
.byte 0x20,0x00,0x00,0x00,0x02,0x00
.4byte .debug_info
.byte 0x18,0x02,0x00,0x00,0xd4,0x00,0x00,0x00
.byte 0x62,0x6c,0x61,0x68,0x00,0x9b,0x01,0x00
.byte 0x00,0x6d,0x61,0x69,0x6e,0x00,0x00,0x00
.byte 0x00,0x00
/ End sdCreateSection
/ Begin sdCreateSection : .debug_typenames
/ Section Info: link_name/strtab=, entsize=0x1, adralign=0x1, flags=0x0
/ Section Data Blocks:
/ reloc[0]: knd=2, off=6, siz=4, lab1=.debug_info, lab2=, loff=0
.section .debug_typenames
.byte 0x1c,0x00,0x00,0x00,0x02,0x00
.4byte .debug_info
.byte 0x18,0x02,0x00,0x00,0x3d,0x01,0x00,0x00
.byte 0x00,0x6c,0x01,0x00,0x00,0x66,0x6f,0x6f
.byte 0x00,0x00,0x00,0x00,0x00,0x00
/ End sdCreateSection
/ Begin sdCreateSection : .debug_varnames
/ Section Info: link_name/strtab=, entsize=0x1, adralign=0x1, flags=0x0
/ Section Data Blocks:
/ reloc[0]: knd=2, off=6, siz=4, lab1=.debug_info, lab2=, loff=0
.section .debug_varnames
.byte 0x28,0x00,0x00,0x00,0x02,0x00
.4byte .debug_info
.byte 0x18,0x02,0x00,0x00,0xff,0x00,0x00,0x00
.byte 0x5f,0x5f,0x66,0x75,0x6e,0x63,0x5f,0x5f
.byte 0x00,0xca,0x01,0x00,0x00,0x5f,0x5f,0x66
.byte 0x75,0x6e,0x63,0x5f,0x5f,0x00,0x00,0x00
.byte 0x00,0x00
/ End sdCreateSection