[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pb with ld-cris for compilation
> From: "Pierre Filliolaud" <firstname.lastname@example.org>
> Date: Tue, 11 Jun 2002 18:52:55 +0200
> I try to compile my module device driver. It seems to compile with gcc and
> ld. But when I try to compile it again with gcc-cris and ld-cris, ld-cris
No it doesn't, not according to your description. It correctly
emits an error. Crashing is when a program malfunctions so it
has to somehow be aborted by the system where it runs (or the
system goes down too, for some systems).
> It is writtent : "Bad value: failed to merge target specific data of file
> /usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: mbpi.o: uses non-prefixed
> symbols, but writing file with _-prefixed symbols "
> I get only files *.o but not my compiled final file.
That's right, it refuses to link together those objects, because
there was mismatching use of -mlinux for some file (mbpi.c or
main.c?) or for the linked output. I don't know whether -mlinux
is supposed to be used or not for modules (I guess not), but it
must either be present for all files or absent for all files,
including when creating the final output, if gcc-cris is used
> I made a Makefile with these options: "-D__KERNEL__ -DMODULE -Wall -O2" for
> and "-r $^ -o $@" for ld-cris
> Any idea??
I suggest using gcc-cris for both and "-nostdlib -Wl,-r", and of
course consistent use of -mlinux. Alternatively, see below.
> Which options need I put for ld-cris to link several files.o ??
None. But I think your question should be "what linker option
do I need to link modules for Linux/CRIS?". For that, the
answer is: use "-mcrislinux" (or "-mcriself" if -mlinux isn't
used to compile).