From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199610081516.IAA03732@panda.mosberger> Date: Tue, 8 Oct 1996 08:16:45 -0700 From: David Mosberger-Tang Subject: Re: Problem with modules. >>>>> On Tue, 8 Oct 1996 11:54:12 +0200 (IST), Amit Margalit 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