Subject: AW: GCC and Modules

From: [email-masked]
Date: Wed, 25 Jul 2001 11:12:47 +0200

Hi.

> He's refering to the last official release of binutils which indeed wasn't
> usable for modutils.
> 
I compiled the tools by myself but the problems remain.
My module should only print a message using printk, but I can't get it to
run.

Here are my results:
> insmod module.o
insmod: unresolved symbol _gp_disp

Module compiled with -mno-abicalls and -no-half-pic (as someone in the
archives mentioned)
> insmod module.o
Warning: unhandled reloc 9
insmod: Unhandled relocation of type 9 for
Warning: unhandled reloc 11
insmod: Unhandled relocation of type 11 for printk
Warning: unhandled reloc 9
insmod: Unhandled relocation of type 9 for
Warning: unhandled reloc 11
insmod: Unhandled relocation of type 11 for printk

Does anybody know what the problem is?

regards
--
Andre Messerschmidt

Application Engineer
Infineon Technologies AG

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 25 Jul 2001 13:24:55 +0200

> Module compiled with -mno-abicalls and -no-half-pic (as someone in the

-fno-pic you mean.  Half PIC is meaningless under Linux.

  Ralf

---

From: Ian Soanes <[email-masked]>
Date: Wed, 25 Jul 2001 15:02:39 +0100

> Does anybody know what the problem is?

Hi Andre,

This may be a little out of date, but compiling with the module with
-mlong-calls worked for me when I had similar problems loading modules a
while back. Relinking the module with 'ld -r -o new_mod.o orig_mod.o'
was useful too ...it worked around some 'exceeds local_symtab_size'
messages.

At the time I was using modutils 2.4.5 and an older version of binutils
(sorry I'm not near the relevant box to check exactly which version), so
maybe some of this is not relevant any more.

Hope this helps in some way,
Ian

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 25 Jul 2001 19:00:46 +0200

> was useful too ...it worked around some 'exceeds local_symtab_size'

The local_symtab_size symtab is caused by the fine differences between
IRIX ELF and ABI ELF.  More recent binutils versions switched to ABI ELF
as the default.

Not using -mlong-calls results in ``Relocation overflow'' messages.  That's
not the case here, so this option probably was used.

Error messages about _gp_disp proof that the module contains PIC code that
is has not been built using -mno-abicalls -fno-pic.

  Ralf