recently im trying to inspect the asm files of my compiled c++ codes to understand whats going on behind the scene better. (im using g++ -c to compile. on a windows 10 + wsl.)
imagine this code:
int main()
{
static int c{12345};
}
and when i check the asm code i see its mentioned as
.data:0000000000000080 ; ===========================================================================
.data:0000000000000080
.data:0000000000000080 ; Segment type: Pure data
.data:0000000000000080 ; Segment permissions: Read/Write
.data:0000000000000080 _data segment dword public 'DATA' use64
.data:0000000000000080 assume cs:_data
.data:0000000000000080 ;org 80h
.data:0000000000000080 ; int main::c
.data:0000000000000080 _ZZ4mainE1c dd 3039h ; DATA XREF: main+1E↑r
.data:0000000000000080 _data ends
and its called like this in the main()...
.text:000000000000004B mov eax, cs:_ZZ4mainE1c ; main::c
Im curious about this cs:
part. can you explain whats that? thanks