bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LD Bug & AS Improvements


From: Nick Clifton
Subject: Re: LD Bug & AS Improvements
Date: 10 Jul 2001 18:59:26 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Hi Brian,

> One thing that I am worried about is that I have some 16-bit
> assembly code and data that both must be linked at the beginning of
> the output file.  Otherwise my boot manager won't work. If I link as
> a PE file and then use objcopy to make it a binary file will it be
> able to put both the 16-bit code & data in the beginning of the
> file, with 32-bit code and data after?

Well if that is how the data and instructions are laid out in the
linked executable then yes.  What the binary conversion does is to
scan all of the output sections and extract the lowest LMA.  This is
then considered to be the start of the file, and each output section,
in turn, is placed into the output file at a offset of "(the
sections's LMA - the lowest LMA)."

So if your 16 bit code has a lower LMA than your 32 bit code it will
appear before it in the binary output file.

Cheers
        Nick






reply via email to

[Prev in Thread] Current Thread [Next in Thread]