Port-arm archive

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

Re: ARM kernel module supported reloc types

On Dec 18, 2008, at 5:46 PM, Rafal Boni wrote:

I've finally come out of the LKM dark ages and am trying to adapt to
   the new MODULAR kernel mod framework on my evbarm target (thanks to
Andrew for forcing the issue by killing off the old LKM support; the
   new framework is definitely nicer, but sometimes one needs a nudge
to move from the crud you know even if you hate it ;)), but I'm having
   an issue loading even the trivial example module due to unexpected
   reloc types.

   What I get is the following:
        kobj_reloc: unexpected relocation type 1

   An objdump on example.kmod shows:
        # objdump --reloc example.kmod

        example.kmod:     file format elf32-littlearm

        OFFSET   TYPE              VALUE
        00000014 R_ARM_PC24        .text
        00000018 R_ARM_PC24        .text
        00000020 R_ARM_PC24        printf
        0000002c R_ARM_PC24        prop_dictionary_get
        00000034 R_ARM_PC24        .text
        00000038 R_ARM_PC24        prop_object_type
        00000044 R_ARM_PC24        .text
        0000004c R_ARM_PC24        printf
        00000068 R_ARM_PC24        printf

So the question is should I simply add the R_ARM_PC24 handling to the ARM kobj_reloc() method [I've done that already but haven't tested it yet]? I note that ARM's ld_elf.so has a 'XXX shouldn't be here' for
   the PC24 reloc type but handles it anyway...

Yes. PC24 is not appropriate in dynamic shared library loading but since
kernel modules are simple .o files, it is appropriate.

Given that, I thought I'd get a second opinion in case the problem is now the module is built, instead of the missing reloc support in the

Home | Main Index | Thread Index | Old Index