This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
rodata feature :-(
- To: <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] rodata feature :-(
- From: "Boris V. Guzhov" <borg at int dot spb dot ru>
- Date: Mon, 20 Nov 2000 17:03:59 +0300
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