Skip to content
  • Peter Smith's avatar
    [ELF] Use SyntheticSections for Thunks · 3a52eb00
    Peter Smith authored
        
    Thunks are now implemented by redirecting the relocation to the
    symbol S, to a symbol TS in a Thunk. The Thunk will transfer control
    to S. This has the following implications:
    - All the side-effects of Thunks happen within createThunks()
    - Thunks are no longer stored in InputSections and Symbols no longer
      need to hold a pointer to a Thunk
    - The synthetic Thunk sections need to be merged into OutputSections
        
    This implementation is almost a direct conversion of the existing
    Thunks with the following exceptions:
    - Mips LA25 Thunks are placed before the InputSection that defines
      the symbol that needs a Thunk.
    - All ARM Thunks are placed at the end of the OutputSection of the
      first caller to the Thunk.
        
    Range extension Thunks are not supported yet so it is optimistically
    assumed that all Thunks can be reused.
    
    This is a recommit of r293283 with a fixed comparison predicate as
    std::merge requires a strict weak ordering.
    
    Differential revision: https://reviews.llvm.org/D29327
    
    llvm-svn: 293757
    3a52eb00
Loading