This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: eCOS(fixed_vector section) realted GNU question. Thanksa lot.


Thanks a lot Jonathan.

BTW if I want the "fixed_vector" section to have "LOAD" attribute as the
"rom_vectors"(vectors) (this try is just for experiment), I tried to set the
section flag to

	.section ".fixed_vectors","ax"

but I came out with error? Why I can't have this section to be set with
"LOAD" attribute? If I would like to use the section to store some
predefined value and to be loadded into memory when loading the program, how
can I do that. ( I am sorry that I think this question might be a little be
exceed the eCOS, but I can't ask such detail related to ecos question on the
other post, I can't explain it clearly.). Thank you very much indeed.


-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Jonathan Larmour
Sent: 23 May 2003 02:50
To: QiangHuang
Cc: Ecos-Discuss
Subject: Re: [ECOS] eCOS(fixed_vector section) realted GNU question. Thanksa
lot.


QiangHuang wrote:
> Q1.
> The fixed_vectors section is marked as "CONTENTS, READONLY" Does this mean
> this section is not to be loadded with the initialisation (default value)?
> And I checked with the a.srec(using arm-elf-objcopy) file and noticed that
> there is nothing to be loadded into this memory address (start from 0x20),
> so I guess that this section is not loadded with anything when the program
> to be loadded into memory. So when loading the RAM based ecos application
> the content of this memory address (0x20) left as it was intialissed by
> RedBoot(virtual vector).  Am I right?

Yes.

> Q2.
> when defining this section as:
>
> hal_virtual_vector_table:
>         .rept   CYGNUM_CALL_IF_TABLE_SIZE
>         .long   0
>         .endr
>
> Is the ".long 0" stand for the default value is "0"? If so why this
section
> is defined with **default value** but not end up in the binary?

Because of the section flags on .fixed_vectors. And there needs to be
_some_ value in there so the linker knows the size (this isn't always
required, but is helpful so the linker can tell us if anything overlaps
with it).

 > or the
> default value get loadded into 0x20? Does it matter if this changed to
> ".long 0x12" (does this will cause 0x12 to be loadded into that address)?
>  maybe I am wrong with assembly language directive).

The value doesn't matter as it never gets used. The table is initialized
separately. Look at hal/common/current/src/hal_if.c and search for
CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]