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: equivalent for -M MAPFILE option of Solaris ld in GNU ld?


>>>>> "Christian" == Christian Grothoff <grothoff@cs.purdue.edu> writes:
Christian> I'm trying to migrate the compilation process of the
Christian> (research/teaching/toy) XINU-OS from Solaris to
Christian> GNU/Linux. At the moment I'm really stuck at the linking
Christian> step. XINU uses the "-M" option of the Solaris linker to
Christian> specify the binary layout (it has nothing to do with the
Christian> "-Map" option that outputs a mapfile).

I'm not familiar with solaris mapfiles, but I logged into a solaris
box we have here and their default/sample mapfiles (see /usr/lib/ld)
only set the start of the text segment.  With GNU ld, you can do the
same with -Text <addr>.

Christian> This is how the mapfile XINU uses looks like:
Christian> # Xinu mapfile for Solaris ld
Christian> #-----------------------------
Christian> text    = LOAD ?RX V0x000;
Christian> text    : $PROGBITS ?A!W;
Christian> # end of mapfile

I'm not exactly sure what this means.  However, you should be able to
achieve the same results using a custom linker script.  Linker scripts
are a very flexible and precise way of controlling ld's behavior.  See
the documentation for details.

Not that it matters, is this version of XINU one that runs in a
UNIX/solaris process, or one that runs "raw" on sparc hardware.  
The only version of XINU I've had any experience with is the PC/X86
version, and that was a long time ago.

        --jtc

-- 
J.T. Conklin
RedBack Networks

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