• Vincent Whitchurch's avatar
    ARM: 8975/1: module: fix handling of unwind init sections · cdcb07e4
    Vincent Whitchurch authored
    Unwind information for init sections is placed in .ARM.exidx.init.text
    and .ARM.extab.init.text.  The module core doesn't know that these are
    init sections so they are allocated along with the core sections, and if
    the core and init sections get allocated in different memory regions
    (which is possible with CONFIG_ARM_MODULE_PLTS=y) and they can't reach
    each other, relocation fails:
    
      final section addresses:
      	...
      	0x7f800000 .init.text
    	..
      	0xcbb54078 .ARM.exidx.init.text
    	..
    
     section 16 reloc 0 sym '': relocation 42 out of range (0xcbb54078 ->
     0x7f800000)
    
    Fix this by informing the module core that these sections are init
    sections, and by removing the init unwind tables before the module core
    frees the init sections.
    Signed-off-by: default avatarVincent Whitchurch <vincent.whitchurch@axis.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    cdcb07e4
module.c 11.9 KB