Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Problem with modules.
@ 1996-10-08  9:54 Amit Margalit
  0 siblings, 0 replies; 2+ messages in thread
From: Amit Margalit @ 1996-10-08  9:54 UTC (permalink / raw)


Hi!

I have completed a compile of the kernel (2.0.18) which comes with RedHat
4.0 (Colgate), and after 'make modules' I get the following:

multam-root:/usr/src/linux/modules# ls
BLOCK_MODULES     bsd_comp.o@       rd.o@             st.o@
FS_MODULES        dummy.o@          sg.o@             ufs.o@
NET_MISC_MODULES  isofs.o@          slhc.o@           vfat.o@
NET_MODULES       loop.o@           smbfs.o@
SCSI_MODULES      ppp.o@            sr_mod.o@
multam-root:/usr/src/linux/modules# insmod vfat
insmod: module is 40262 bytes long (expected 34745)
insmod: forgot to specify -dc when linking ./vfat.o?
multam-root:/usr/src/linux/modules# 

Another interesting fact is that when I tried to compile vfat into the
kernel, the compilation's last part ended with some symbols undefined in
the linking...

	Amit

------------------------------------------------------------------------
Amit Margalit (Software Support Digital Israel) amitm@doronx.iso.dec.com
------------------------------------------------------------------------
All information in the above mail message is personal, and does not
imply on my employer. None of it should be attributed to my employer.

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem with modules.
@ 1996-10-08 15:16 David Mosberger-Tang
  0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger-Tang @ 1996-10-08 15:16 UTC (permalink / raw)


>>>>> On Tue, 8 Oct 1996 11:54:12 +0200 (IST), Amit Margalit <amitm@amitpc.iso.dec.com> said:

  Amit> multam-root:/usr/src/linux/modules# insmod vfat
  Amit> insmod: module is 40262 bytes long (expected 34745)
  Amit> insmod: forgot to specify -dc when linking ./vfat.o?

Ah, just yesterday I noticed this myself.  Below is a patch that
should fix the problem.  I'll make a new relese of the BFS insmod
sometime soon.  If somebody had some spare time at hand: how about
looking into porting the regular insmod to the Alpha?  Now that we
have ELF, this might be a worthwhile thing to do.

	--david

--- insmod.c~	Sun Sep  1 08:34:45 1996
+++ insmod.c	Thu Oct  3 23:10:12 1996
@@ -98,8 +100,11 @@
 accum_size (bfd *abfd, asection *sect, PTR obj)
 {
     unsigned long *size = (unsigned long *) obj;
-    *size += (bfd_section_size (abfd, sect) +
-	      (1 << bfd_get_section_alignment(abfd, sect)));
+
+    if (sect->flags & SEC_ALLOC) {
+	*size += (bfd_section_size (abfd, sect) +
+		  (1 << bfd_get_section_alignment(abfd, sect)));
+    }
 }
 
 
@@ -109,10 +114,11 @@
     unsigned long size = bfd_section_size (bfd, sect);
     unsigned long *total_size = (unsigned long *) obj;
 
-    *total_size += size;
     if (sect->flags & SEC_ALLOC) {
 	char * addr;
 
+	*total_size += size;
+
 	addr = code + (bfd_get_section_vma(bfd, sect) - mod_addr);
 	if (addr + size >= code + code_size) {
 	    return;

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-10-08 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-10-08 15:16 Problem with modules David Mosberger-Tang
  -- strict thread matches above, loose matches on Subject: below --
1996-10-08  9:54 Amit Margalit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox