This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Assembler question
- From: Michael Meissner <gcc-help at the-meissners dot org>
- To: Sumesh UdayaKumaran <sumesh_uk at hotmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 11 Jun 2003 13:33:05 -0400
- Subject: Re: Assembler question
- References: <BAY1-F93kSmLAztxc1o00008f5d@hotmail.com>
On Mon, Jun 09, 2003 at 11:44:21PM +0000, Sumesh UdayaKumaran wrote:
> Thanks , but doesnt the assembler make some kind of an offset assignment to
> the variables inside the segment. And thereon the linker relocating them ?
> And did u know with relation to gcc mcore assembler source code for elf
> format , where was this handled ?
You might spend some time actually looking at the ELF format, it should answer
your questions. I suggest you write two assembler modules that are self
contained and can be linked together, one of which defines the variable, and
the other references it, assemble both, and then use objdump -dwx to display
the modules and the linker output. If you can find it second hand (it is not
listed on mkp.com any more), John Levine's book on linkers and loaders should
be helpful:
Linkers & Loaders
by John R. Levine
published by Morgan Kaufmann Pubishers
ISBN 1-55860-496-0
You should be asking these questions on the binutils mailing list, rather than
the compiler mailing list, since it is not a compiler issue.
--
Michael Meissner
email: meissner@the-meissners.org
http://www.the-meissners.org