Getting Closer

Mark Palmerino mbp@csr-bos.com
Wed Feb 28 06:05:00 GMT 2001


Hi Kai and everyone,


Kai writes:
> You can easily see what it REALLY does by substituting the '-v' with
> '-verbose'.

Thank you for pointing out the usefulness of the -verbose flag. It
definitely helped me find a 'duh' error - I had neglected to put a reference
to hello.o on the ld line - which explains why it was having trouble with
'main'.

I have rectified that and have produced an S-record file on the unix side
where I have referenced the windows libraries.

I am enclosing the resulting ld maps (using the -verbose flag) from the
windows compile (hell1.map) and the unix compile (hello.map).

I will try downloading the resulting file to the board to see if it works.
However, something that Joel pointed out yesterday is still a problem.
(There also may be other problems, but I am just now starting to learn how
to read and use a .map file!)

Here are some snippets from the .map files that show a problem with the
definition of the vector*defaults.

Here is a snippet from the map file produced under windows:

----------------------------- clip ------------------------------
.text           0x00090000     0x5580
                0x00090000        0x4 LONG 0xbeefbeef
                0x00090004        0x4 LONG 0x7ffc __stack
                0x00090008        0x4 LONG 0x90010 __prog_start
                0x0009000c        0x4 LONG 0x0
 *(.text)
 .text          0x00090010      0x15c rm_crt0.o
                0x00090146                __vector_buserror_default
                0x00090154                __vector_addrerror_default
                0x00090162                __vector_default
                0x00090010                start
 .text          0x0009016c       0x28 hell1.o
                0x0009017a                main
 .text          0x00090194       0x62
c:/xgcc/68k/2_8_1/mcpu32/libc.a(atexit.o)
                0x00090194                atexit
----------------------------- clip ------------------------------

And here is the same snippet from the unix compilation:

----------------------------- clip ------------------------------
.text           0x00090000     0x5574
                0x00090000        0x4 LONG 0xbeefbeef
                0x00090004        0x4 LONG 0x7ffc __stack
                0x00090008        0x4 LONG 0x90010 __prog_start
                0x0009000c        0x4 LONG 0x0
 *(.text)
 .text          0x00090010      0x14e rm_crt0.o
                0x00090146                __vector_buserror_default
                0x00090146                __vector_addrerror_default
                0x00090146                __vector_default
                0x00090010                start
----------------------------- clip ------------------------------

Does anyone know why there is a difference between the two links for these
vector*defaults?  What controls the definition of these?  I am including the
rm_crt0.S and rm_rom.ld files if they are useful in figuring this out. BTW,
the rm_crt0.o file that I have used for this compile is the one that was
used under windows - does this suggest that something else is controlling
the definition of these defaults?

Any thoughts?




More information about the crossgcc mailing list