Pelles C forum

Assembly language => Assembly discussions => Topic started by: HellOfMice on February 07, 2025, 09:13:30 AM

Title: Some Stats
Post by: HellOfMice on February 07, 2025, 09:13:30 AM
Hello,

I had some free time, no biathlon on TV, time this morning so I made this:

File sqlite3.dll
Size on disk 788 Kb


File sqlite3.dll
Size on disk 788 Kb
                                                            DATA DIRECTORIES      SECTIONS       D / S %
Export Directory                            .rdata               7 036             104 028        6.76 %
Import Directory                            .data                   40              27 712        0.14 %
Resource Directory                          .rsrc                1 264               1 264      100.00 %
Exception Directory                         .pdata              21 204              21 204      100.00 %
Security Directory
Base Relocation Table                       .reloc               6 772               6 772      100.00 %
Debug Directory
Architecture Specific Data
Global Pointer Register
Thread Local Storage Directory (TLS)
Load Configuration Directory
Bound Import Directory
Import Address Table (IAT)                  .data                  872              27 712        3.14 %
Delay Load Import Descriptors
COM Runtime Descriptor
Reserved
".text" section                                                                    647 942        0.00 %
TOTAL                                                           37 188             808 922        4.59 %

Compare file size and sections size
                   File Size = 788.00 Kb
Sections Size 808 922 / 1024 = 789.96 Kb


The file size is equal to the sections total sizeSome sections store many data directoriesExcept ".text" and ".data", the directory data ".rdata" occupies a small part of the ".rdata" section.What does contain this section?
Title: Re: Some Stats
Post by: TimoVJL on February 07, 2025, 09:29:54 AM
.rdata is read only data section.
Title: Re: Some Stats
Post by: HellOfMice on February 07, 2025, 10:03:14 AM
Timo, I will see that but a last question:
We cannot see if there is a BSS. I don't know program without it.

Title: Re: Some Stats
Post by: TimoVJL on February 07, 2025, 10:17:01 AM
BSS can go to .data section and then raw size and virtual size differs

Borland and gcc might use BSS section
Title: Re: Some Stats
Post by: HellOfMice on February 07, 2025, 11:10:40 AM
When we have a ".Data?" segment it is a BSS and an empty Variable in C it also is in BSS
I would like to know the difference between a COMM variable and a variable declare in ".Data?"?
It it the same?