Skip to content
Snippets Groups Projects
  • Franck Jullien's avatar
    9cd73bf8
    openrisc: fix relocation code · 9cd73bf8
    Franck Jullien authored
    
    The relocation code can now relocate from anywhere to
    the RAM.
    
    The old code assumed that the binary was copied to the RAM
    by some PBL and then it just relocated the .text section
    from the loaded address to the linked address.
    
    Now, it first checks if vectors are somewhere else than the
    linked address. If yes, there are copied to address 0 (or
    to the exception vector base address if register EVBAR is
    present).
    
    Then, the .text section is relocated from its current location
    to the RAM.
    
    Signed-off-by: default avatarFranck Jullien <franck.jullien@gmail.com>
    9cd73bf8
    History
    openrisc: fix relocation code
    Franck Jullien authored
    
    The relocation code can now relocate from anywhere to
    the RAM.
    
    The old code assumed that the binary was copied to the RAM
    by some PBL and then it just relocated the .text section
    from the loaded address to the linked address.
    
    Now, it first checks if vectors are somewhere else than the
    linked address. If yes, there are copied to address 0 (or
    to the exception vector base address if register EVBAR is
    present).
    
    Then, the .text section is relocated from its current location
    to the RAM.
    
    Signed-off-by: default avatarFranck Jullien <franck.jullien@gmail.com>