home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vxworks
- Path: sparky!uunet!news!wrs.com!geoff
- From: geoff@wrs.com (Geoff Espin)
- Subject: Re: Interesting ld68k behavior
- Message-ID: <geoff.721065104@wrs.com>
- Sender: news@wrs.com (News Manager)
- Nntp-Posting-Host: cowichan
- Organization: Wind River Systems, Inc.
- References: <HMP.92Nov6084047@squash.frc.ri.cmu.edu>
- Date: Fri, 6 Nov 1992 15:51:44 GMT
- Lines: 33
-
- hmp@frc2.frc.ri.cmu.edu (Henning Pangels) writes:
-
- >I just thought I'd share an observation I've made recently while
- >placing vxWorks and application code into ROM.
- >... [accurate description of linking and run-time events deleted]
- >But imagine my surprise when I added some custom routines at the top
- >of usrConfig.c (one might argue over the political correctness of
- >doing so...), and usrInit no longer ended up at RAM_TEXT_HIGH_ADDRESS.
- >Instead, whatever routine appeared first in usrConfig.c got that
- >privilege and was subsequently called by romStart.
- >The obvious solution was to simply rearrange the order of the routines
- >usrConfig.c so that usrInit() comes first.
-
- WRS should explicitly document that the routines: usrConfig.c:usrInit(),
- sysALib.s:sysInit() and romInit.s:romInit() must be the first routines
- in the text segment, when used as system entry points. usrInit() is only
- the system entry point for the compressed image. Usually it is called
- by sysInit().
-
- The complaint that compiler flags "-Ttext" and "-e <entrypoint>" are
- independent, at first, seems valid. But on further reflection,
- it would be very inconvenient if the linker always insisted that
- entry points be the first routines in a module, and that that module
- be the first module listed on the linker command line. Not everybody
- writes system code. :-) What about the UNIX application developer?
- Again, a few words of warning in the VxWorks Programmer's Guide wouldn't hurt.
- A bug report will be submitted.
-
- Geoff
- --
- Geoff Espin geoff@wrs.com (510)748-4100
- Wind River Systems
- 1010 Atlantic Avenue Alameda CA 94501
-