none-mmu without rodata section. so, each processes can not share read-only data.
dump section by case in no MMU.
peter@main$ xxxlinux-uclibc-readelf -S ssi
There are 32 section headers, starting at offset 0x5fe90:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .interp PROGBITS 000000f4 0000f4 000014 00 A 0 0 1
[ 2] .hash HASH 00000108 000108 00089c 04 A 3 0 4
[ 3] .dynsym DYNSYM 000009a4 0009a4 0011e0 10 A 4 1 4
[ 4] .dynstr STRTAB 00001b84 001b84 000d59 00 A 0 0 1
[ 5] .rel.dyn REL 000028e0 0028e0 000380 08 A 3 0 4
[ 6] .rel.plt REL 00002c60 002c60 000380 08 A 3 8 4
[ 7] .init PROGBITS 00002fe0 002fe0 000020 00 AX 0 0 4
[ 8] .plt PROGBITS 00003000 003000 000980 00 AX 0 0 4
[ 9] .text PROGBITS 00003980 003980 010a10 00 AX 0 0 4
[10] .fini PROGBITS 00014390 014390 000018 00 AX 0 0 4
[11] .rofixup PROGBITS 000143a8 0143a8 0030b4 00 A 0 0 4
[12] .ctors PROGBITS 0001845c 01745c 000008 00 WA 0 0 4
[13] .dtors PROGBITS 00018464 017464 000008 00 WA 0 0 4
[14] .jcr PROGBITS 0001846c 01746c 000004 00 WA 0 0 4
[15] .dynamic DYNAMIC 00018470 017470 0000e0 08 WA 4 0 4
[16] .data PROGBITS 00018550 017550 013c6c 00 WA 0 0 4
[17] .got PROGBITS 0002c1c0 02b1c0 0013a4 00 WA 0 0 8
[18] .bss NOBITS 0002d568 02c564 040e9c 00 WA 0 0 8
[19] .comment PROGBITS 00000000 02c564 00001c 00 0 0 1
[20] .debug_aranges PROGBITS 00000000 02c580 000620 00 0 0 1
[21] .debug_pubnames PROGBITS 00000000 02cba0 0010b3 00 0 0 1
[22] .debug_info PROGBITS 00000000 02dc53 0176ae 00 0 0 1
[23] .debug_abbrev PROGBITS 00000000 045301 004d4f 00 0 0 1
[24] .debug_line PROGBITS 00000000 04a050 00cd60 00 0 0 1
[25] .debug_frame PROGBITS 00000000 056db0 001b9c 00 0 0 4
[26] .debug_str PROGBITS 00000000 05894c 0001d6 00 0 0 1
[27] .debug_loc PROGBITS 00000000 058b22 00645a 00 0 0 1
[28] .debug_ranges PROGBITS 00000000 05ef7c 000e00 00 0 0 1
[29] .shstrtab STRTAB 00000000 05fd7c 000111 00 0 0 1
[30] .symtab SYMTAB 00000000 060390 001ee0 10 31 188 4
[31] .strtab STRTAB 00000000 062270 00175d 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
peter@server:main$ xxx-linux-uclibc-size ssi
text data bss dec hex filename
95077 86276 265884 447237 6d305 ssi
Case in MMU support
peter@main$ mips-linux-size /media/sdc2/git/xxx/apps/cgi/main/ssi
text data bss dec hex filename
155152 27676 265960 448788 6d914 /media/sdc2/git/xxx/apps/cgi/main/ssi
peter@-server:main$ mmu-linux-readelf -S /media/sdc2/git/xxx/apps/cgi/main/ssi
There are 41 section headers, starting at offset 0x375d8:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .interp PROGBITS 00400134 000134 000014 00 A 0 0 1
[ 2] .reginfo MIPS_REGINFO 00400148 000148 000018 18 A 0 0 4
[ 3] .dynamic DYNAMIC 00400160 000160 000130 08 A 6 0 4
[ 4] .hash HASH 00400290 000290 00051c 04 A 5 0 4
[ 5] .dynsym DYNSYM 004007ac 0007ac 000c20 10 A 6 1 4
[ 6] .dynstr STRTAB 004013cc 0013cc 000794 00 A 0 0 1
[ 7] .gnu.version VERSYM 00401b60 001b60 000184 02 A 5 0 2
[ 8] .gnu.version_r VERNEED 00401ce4 001ce4 000020 00 A 6 1 4
[ 9] .rel.dyn REL 00401d04 001d04 000028 08 A 5 0 4
[10] .init PROGBITS 00401d2c 001d2c 000080 00 AX 0 0 4
[11] .text PROGBITS 00401db0 001db0 015e90 00 AX 0 0 16
[12] .MIPS.stubs PROGBITS 00417c40 017c40 0006b0 00 AX 0 0 4
[13] .fini PROGBITS 004182f0 0182f0 000054 00 AX 0 0 4
[14] .rodata PROGBITS 00418350 018350 00dc00 00 A 0 0 16
[15] .eh_frame PROGBITS 00425f50 025f50 000004 00 A 0 0 4
[16] .ctors PROGBITS 00436000 026000 000008 00 WA 0 0 4
[17] .dtors PROGBITS 00436008 026008 000008 00 WA 0 0 4
[18] .jcr PROGBITS 00436010 026010 000004 00 WA 0 0 4
[19] .data.rel.ro PROGBITS 00436014 026014 000060 00 WA 0 0 4
[20] .data PROGBITS 00436080 026080 006880 00 WA 0 0 16
[21] .rld_map PROGBITS 0043c900 02c900 000004 00 WA 0 0 4
[22] .got PROGBITS 0043c910 02c910 000320 04 WAp 0 0 16
[23] .sdata PROGBITS 0043cc30 02cc30 000004 00 WAp 0 0 4
[24] .bss NOBITS 0043cc40 02cc34 040ee8 00 WA 0 0 16
[25] .comment PROGBITS 00000000 02cc34 0004da 00 0 0 1
[26] .debug_aranges MIPS_DWARF 00000000 02d10e 000300 00 0 0 1
[27] .debug_pubnames MIPS_DWARF 00000000 02d40e 000359 00 0 0 1
[28] .debug_info MIPS_DWARF 00000000 02d767 0038d1 00 0 0 1
[29] .debug_abbrev MIPS_DWARF 00000000 031038 001e9d 00 0 0 1
[30] .debug_line MIPS_DWARF 00000000 032ed5 001532 00 0 0 1
[31] .debug_frame MIPS_DWARF 00000000 034408 000400 00 0 0 4
[32] .debug_str MIPS_DWARF 00000000 034808 0004b1 01 MS 0 0 1
[33] .debug_loc MIPS_DWARF 00000000 034cb9 000ee1 00 0 0 1
[34] .debug_ranges MIPS_DWARF 00000000 035b9a 0000c8 00 0 0 1
[35] .gnu.attributes LOOS+ffffff5 00000000 035c62 000010 00 0 0 1
[36] .mdebug.abi32 PROGBITS 000002a0 035c72 000000 00 0 0 1
[37] .pdr PROGBITS 00000000 035c74 0017e0 00 0 0 4
[38] .shstrtab STRTAB 00000000 037454 000182 00 0 0 1
[39] .symtab SYMTAB 00000000 037c40 002460 10 40 278 4
[40] .strtab STRTAB 00000000 03a0a0 001ab0 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
看來有些rd-only的data是在.text,
沒有留言:
張貼留言