1. 29 5月, 2013 1 次提交
  2. 20 12月, 2011 1 次提交
    • S
      powerpc: Process dynamic relocations for kernel · 9c5f7d39
      Suzuki Poulose 提交于
      The following patch implements the dynamic relocation processing for
      PPC32 kernel. relocate() accepts the target virtual address and relocates
       the kernel image to the same.
      
      Currently the following relocation types are handled :
      
      	R_PPC_RELATIVE
      	R_PPC_ADDR16_LO
      	R_PPC_ADDR16_HI
      	R_PPC_ADDR16_HA
      
      The last 3 relocations in the above list depends on value of Symbol indexed
      whose index is encoded in the Relocation entry. Hence we need the Symbol
      Table for processing such relocations.
      
      Note: The GNU ld for ppc32 produces buggy relocations for relocation types
      that depend on symbols. The value of the symbols with STB_LOCAL scope
      should be assumed to be zero. - Alan Modra
      Signed-off-by: NSuzuki K. Poulose <suzuki@in.ibm.com>
      Signed-off-by: NJosh Poimboeuf <jpoimboe@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Alan Modra <amodra@au1.ibm.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
      Signed-off-by: NJosh Boyer <jwboyer@gmail.com>
      9c5f7d39
  3. 24 9月, 2009 1 次提交
    • T
      powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE · 144ef909
      Tony Breeds 提交于
      When using CONFIG_RELOCATABLE, we build the kernel as a position
      independent executable. The kernel then uses a little bit of relocation
      code to relocate itself. That code only deals with R_PPC64_RELATIVE
      relocations though. If for some reason you use assembly constructs
      such as LOAD_REG_IMMEDIATE() to load the address of a symbol, you'll
      generate different kinds of relocations that won't be processed properly
      and bad things will happen. (We have 2 such bugs today).
      
      The perl script tries to filter out "known" bad ones. It's possible
      that we are missing some in the case of a weak function that nobody
      implements, we'll see if we get false positive and fix it.
      Signed-off-by: NTony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      144ef909