This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: Patch: Switch Linux/mips to stabs


On Tue, Jun 12, 2001 at 04:15:13AM +0200, Maciej W. Rozycki wrote:

 >  I'm not sure objcopy is the right tool here -- while the tool is right
 > for converting between binary formats, it's not the one to modify
 > binaries' internals.  The desired effect can be achieved with ld, which
 > indeed is the right tool here:

I don't want to modify the binary's internals.  The executable, a
kernel, is comprised of a single loadable section, a'la OMAGIC, and
-N is provided to the linker along with a linker script that arranges
the ELF image the right way.  It is not intended to be paged.

I simply want objcopy to copy the ELF image to an ECOFF image, and
stamp the ECOFF image with the appropriate magic number.  But because
the ELF backend pretty much always sets D_PAGED, the ECOFF backend
! OMAGIC into the magic number.

Now, if the linker were to not align the loadable part of the ELF
image at 0x1000 offset into the file, then D_PAGED would not be set
by the ELF backend, but I haven't been able to figure out why it's
even doing so, considering I'm using ld -N.

 >  That said we could certainly support -[Nn] for ELF as well. 

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>


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