This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: MIPS Assembly.
On Mon, 21 Jun 2004, Chris Jones wrote:
> Patching uaccess.h to wrap j 2b as follows:
>
> .set noreorder
> .set nomacro
> j 2b
> .set macro
> .set reorder
>
> still causes problems.
>
> If the code is "correct" and it is the link that is the problem, then I
> would like to know so I can address the symptoms in the best fashion.
>
> Here's a test module that you can compile on MIPS that should generate
> the errors I'm talking about.
>
> gcc -I/location_of_my_kernel_includes -mips32 -DMODULE -D__KERNEL__ -c
> moduletest.c
This is a FAQ...
Your GCC command options are wrong -- you need to make sure options used
for your module match ones used by the kernel build system for modules.
For MIPS/Linux, you want to include at least these: "-G 0 -mno-abicalls
-fno-pic", or better yet, merge your module with the Linux tree.
Since you currently build your module as PIC, it's no surprise gas has
troubles handling the jump instruction here.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +