What does "AT(0x3000000)" mean ?
Does it mean that the loader will load this executable at "physical address
" 0x3000000 ?
I know the "virtual address" of the first byte of this executable would be
0x1000, but in Linux , can we put data at any physical address as we wish ?
If it does, why the program still works even if the RAM is 32M in my PC
?(0x3000000 > 32M). What tool in Linux can we have to let us "watch" the
contents of memory by specifying "physical addresses"? If it doesn't, what
is the function when we write "AT(xxxx)" ? Hope I can receive an answer when
you are not busy. Thank you very much!
[Ben] Hi, Jun-Ming -
I'm afraid your question is somewhat misdirected: I'm not an assembly
expert, under Linux or otherwise. My suggestion to you would be to start
at [87]http://linuxassembly.org and go from there - their front page reads
...............
Welcome to the Linux Assembly!
If you are looking for information on assembly programming under UNIX-like
operating systems (Linux/BSD/ BeOS/etc), this is the right place to be.
Here you can find various resources, ranging from tutorials and
documentation, to actual programs written in assembly language. As time
passes, we will try to provide as much information on the subject as
possible, so stay tuned.
...............
That seems like the right place for your query.
[Jimmy O'Regan] The AT() keyword is for things like ROMs. I recommend you
read the GNU Linker manual:
[88]http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_chapter/ld_3
.html#SEC21
Dear Answer Gang:
According to the GNU linker ld manual:
the AT() keywod specifies the load address of a section, and it says "this
feature is designed to make it easy to build a ROM image..."
Query,
1. the address specified by AT() keyword to load is the "physical address"
of ROM ? and we can really put code in ROM in this way ?
2. the "ROM" the document mentioned is the actual element in board, or just
RAM of imitating the Read-Only-Memory ?
( forgive me for a Chinese student's poor English !)
[Jimmy] The AT() keyword can be used for ROMs - if you want to write a
replacement BIOS (such as Linux BIOS: [89]http://www.linuxbios.org), you
will have to do use the AT() keyword; or if you are creating a ROM images
for later use in an emulator, or to write to a physical ROM.
You can also use the AT() keyword for boot loaders/kernels, which need to
be at a specific location in RAM to be executed; and in a normal program.
If the program has a specified load address, and is loaded on an MMU-less
system, or in an OS which doesn't use the MMU, then you get access to that
specific area of memory, but in an OS (such as Linux) which makes use of
the MMU, the address is transparently remapped to an address within the
space allocated to your program by the kernel.
Jimmy also asked a friend... -- Heather
[Jimmy] Sorry about the format this takes; I asked a friend from college
if he could answer the linker script question, the answer is in the
attached IRC log. There's a lot of overview in there which I thought was
interesting. Philip's credentials are that he wrote an operating system
for his degree thesis, based on KeyOS ([90]http://keyos.sourceforge.net),
to which he contributed code under a pseudonym (the college made some
claims about copyright...).
Logged from the [91]UnderNet IRC on Jun 20.
-- Heather
...............
So, can you answer that question?
Cos noone at LG can.
question?
In the html file I sent
its the offset that that section is loaded at.
the offset from the loadaddr
?
and the 0x1000 is the size of the section if i remember correctly
or at least i think thats it.
had to figure it out for writing my boot loader, which i couldnt
get to work right, caused fatal exception when it switched to ring 0 to
=9= |