[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#609371: linux-image-2.6.37-trunk-sparc64: module scsi_mod: Unknown relocation: 36



I've been looking at the contents of scsi_mod.ko at bit more and it looks like this is related to ftrace.

All of the R_SPARC_UA64 records are in section _ftrace_events and the R_SPARC_13 records are located at/near __tracepoint_* symbol uses

RELOCATION RECORDS FOR [_ftrace_events]:
OFFSET           TYPE              VALUE
0000000000000010 R_SPARC_UA64      .data
0000000000000018 R_SPARC_UA64      .rodata.str1.8+0x0000000000000590
0000000000000050 R_SPARC_UA64      .data+0x0000000000000198
0000000000000058 R_SPARC_UA64      .rodata+0x0000000000001650
0000000000000098 R_SPARC_UA64      .data+0x0000000000000048
00000000000000a0 R_SPARC_UA64      .rodata.str1.8+0x00000000000005a8
00000000000000d8 R_SPARC_UA64      .data+0x00000000000001b8
00000000000000e0 R_SPARC_UA64      .rodata+0x0000000000001670
0000000000000120 R_SPARC_UA64      .data+0x0000000000000048
0000000000000128 R_SPARC_UA64      .rodata.str1.8+0x00000000000005c8
0000000000000160 R_SPARC_UA64      .data+0x00000000000001b8
0000000000000168 R_SPARC_UA64      .rodata+0x0000000000001670
00000000000001a8 R_SPARC_UA64      .data+0x0000000000000090
00000000000001b0 R_SPARC_UA64      .rodata.str1.8+0x00000000000005e0
00000000000001e8 R_SPARC_UA64      .data+0x00000000000001d8
00000000000001f0 R_SPARC_UA64      .rodata+0x0000000000002910
0000000000000230 R_SPARC_UA64      .data+0x00000000000000d8
0000000000000238 R_SPARC_UA64      .rodata.str1.8+0x00000000000005f8
0000000000000270 R_SPARC_UA64      .data+0x00000000000001f8
0000000000000278 R_SPARC_UA64      .rodata+0x00000000000033c8

They seem to come from scsi.o at

.LLC51:
        .asciz  "scsi_eh_wakeup"
        .section        _ftrace_events,"aw",@progbits
        .align 4
        .type   event_scsi_eh_wakeup, #object
        .size   event_scsi_eh_wakeup, 136
event_scsi_eh_wakeup:
        .skip   16
        .uaxword        event_class_scsi_eh_wakeup
        .uaxword        .LLC51
        .skip   8
        .skip   40
        .uaxword        ftrace_event_type_funcs_scsi_eh_wakeup
        .uaxword        print_fmt_scsi_eh_wakeup
        .skip   40


From scsi_error.o/.s I see

0000000000002be0 R_SPARC_HI22      __tracepoint_scsi_eh_wakeup
0000000000002be4 R_SPARC_LO10      __tracepoint_scsi_eh_wakeup
0000000000002be4 R_SPARC_13        *ABS*+0x0000000000000008
0000000000002bf4 R_SPARC_LO10      __tracepoint_scsi_eh_wakeup
0000000000002bf4 R_SPARC_13        *ABS*+0x0000000000000020

    2be0:       03 00 00 00     sethi  %hi(0), %g1
    2be4:       c4 00 60 00     ld  [ %g1 ], %g2

        sethi  %hi(__tracepoint_scsi_eh_wakeup), %g1
        lduw    [%g1+%lo(__tracepoint_scsi_eh_wakeup)+8], %g2

Regards

Richard

On 14/01/2011 10:53, Richard Mortimer wrote:


... snip ...

On 13/01/2011 23:57, David Miller wrote:
The original error report shows:

(initramfs) modprobe sym53c8xx
[ 122.470284] module scsi_mod: Unknown relocation: 36
^^^^^^^^^^^^^^^^^^^^^^
FATAL: Error inserting sym53c8xx
(/lib/modules/2.6.37-trunk-sparc64/kernel/drive
rs/scsi/sym53c8xx_2/sym53c8xx.ko): Invalid module format
(initramfs)

So you didn't need to analyze the binary with objdump to
work on this bug.

Yeah I'd seen that in my original error output. Please do excuse my slow
workings it is over 7 years since I was working with Sparc systems on a
daily basis. objdump made it easier to look at the compiler output and
modules without compile/reboot cycles.


Relocation type 36 is R_SPARC_LM22.

I'm confused now! Maybe I've missed something but looking at
arch/sparc/kernel/module.c it seems that the 36 is hexadecimal.

printk(KERN_ERR "module %s: Unknown relocation: %x\n",
me->name,
(int) (ELF_R_TYPE(rel[i].r_info) & 0xff));

So that means that the kernel is complaining about type 54 which is
R_SPARC_UA64. That matches with the objdump output which doesn't list
R_SPARC_LM22 for scsi_mod.ko

Regards

Richard






Reply to: