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

mvme88k



I've got a cross linker, cross assembler, and a cross gcc now. 
(i386-unknown-openbsd2.2 ==> m88k-unknown-openbsd2.2) The ld and gas
sources are the old, non-bfd stuff found in /usr/src/gnu/usr.bin

I have a problem with the linker:  Code from ld.c:

               } else if (RELOC_BASEREL_P(r)) {

                        int                symindex = RELOC_SYMBOL(r);
                        struct localsymbol *lsp =
&entry->symbols[symindex];

Problem ======> if (symindex >= entry->nsymbols)
                                errx(1, "%s: relocation symbolnum out of
range",
                                        get_file_name(entry));

Somehow the symindex > entry->nsymbols.  It doesn't happen on all object
files.  Any clues as to where I should look?  

Also, ld complained about 'No reference to __DYNAMIC'.  I learned that
__DYNAMIC was usually in crt0.o, so I compiled crt0.o from the sources.
(with the cross compiler) But the mvme88k Makefile doesn't  define
-DDYNAMIC, which is required to make a reference  to __DYNAMIC.  Should
-DDYNAMIC be defined?  Or should I just  hack it?  (I did and it shut ld
up.  __DYNAMIC is set to 0 if it is staticly  linked?)

Thanks,

-----------------------------------------------------------
Steve P. Murphree, Jr. 
Computer Network, Inc.
smurph_(_at_)_lgate_(_dot_)_cneti_(_dot_)_com
-----------------------------------------------------------