From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Boris V. Guzhov" To: Subject: [ECOS] rodata feature :-( Date: Mon, 20 Nov 2000 06:52:00 -0000 Message-id: <004c01c052fa$badb9bf0$7601a8c0@borg> X-SW-Source: 2000-11/msg00244.html Hi All, There is a very interesting feature of the "rodata" section. There is the a.out program that linked with the following linker script (mlt_i386_pc_ram.ldi): MEMORY { ram : ORIGIN = 0x0, LENGTH = 0x800000 } SECTIONS { SECTIONS_BEGIN SECTION_vectors (ram, 0x10000, LMA_EQ_VMA) SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA) SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA) SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA) SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA) SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA) SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA) SECTION_rel__got (ram, ALIGN (0x1), LMA_EQ_VMA) SECTION_data (ram, 0x100000, LMA_EQ_VMA) SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA) SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA) SECTIONS_END } It's "nm -gn a.out" output: .... 0007a0e0 R bit_first_set8 00092d08 R Cyg_libc_str_null_mask_1 00092d10 R Cyg_libc_str_null_mask_2 0009522f R nothrow 00095360 A _EXCEPT_END_ .... There is strange memory hole between "bit_first_set8" and " Cyg_libc_str_null_mask_1": 0x92d08 - 0x7a0e0 = 0x18C28 (~100 kb). How can you explain it? Note that: - the bit_first_set8 declaration is "extern const unsigned char bit_first_set8[256];", - the bit_first_set8 and Cyg_libc_str_null_mask_* variables are declared in different files. Thanks in advance. -- Boris Guzhov, St.Petersburg, Russia