This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: Assembler question


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


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