[lkml]   [2000]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: relocation truncated to fit: R_386_PC32
On Mon, 18 Sep 2000 22:51:42 -0700, 
"Armand" <> wrote:
>drivers/char/rtc.o: file format elf32-i386
> b9: 7e f5 jle b0 <.text.lock+0xb0>
> bb: e9 b6 00 00 00 jmp 176 <days_in_mo+0x70>
> bc: R_386_PC32 .text.init
> c0: 80 3d 00 00 00 00 00 cmpb $0x0,0x0
> c2: R_386_32 rtc_lock
> c7: f3 90 repz nop
> c9: 7e f5 jle c0 <.text.lock+0xc0>
> cb: e9 06 00 00 00 jmp d6 <.text.lock+0xd6>
> cc: R_386_PC32 .text.exit

That one is the culprit, it is this code in drivers/char/rtc.c. Copied
to Paul Gortmaker who wrote rtc.

static void __exit rtc_exit (void)
/* interrupts and maybe timer disabled at this point by rtc_release */
/* FIXME: Maybe??? */

if (rtc_status & RTC_TIMER_ON) {
spin_lock_irq (&rtc_lock); <============
rtc_status &= ~RTC_TIMER_ON;
spin_unlock_irq (&rtc_lock); <============

printk(KERN_WARNING "rtc_exit(), and timer still running.\n");

Sections marked __exit get discarded when the code is linked into the
kernel, they are kept when the code is a module. But the spin lock
code is kept (in another section) and relocation from .text.lock back
to .text.exit fails. Possible fixes:

Use RTC as a module.
Remove __exit from rtc_exit.
Compile rtc_exit conditional on not being a module.
Remove the spin locks.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:39    [W:0.034 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site