Skip to content
  1. Oct 12, 2017
    • Rui Ueyama's avatar
      Rename P -> Pieces. · 36d8db42
      Rui Ueyama authored
      Conventionally, an array of SectionPieces is named Pieces.
      It is better to follow the convention.
      
      llvm-svn: 315543
      36d8db42
    • NAKAMURA Takumi's avatar
      lld: Prune unused libdeps. · b6d34522
      NAKAMURA Takumi authored
      llvm-svn: 315537
      b6d34522
    • NAKAMURA Takumi's avatar
      lld: Reorder libdeps. · d791eaa5
      NAKAMURA Takumi authored
      Differential Revision: https://reviews.llvm.org/D38828
      
      llvm-svn: 315529
      d791eaa5
    • Rui Ueyama's avatar
      Define RelType to represent relocation types. · 67533a2c
      Rui Ueyama authored
      We were using uint32_t as the type of relocation kind. It has a
      readability issue because what Type really means in `uint32_t Type`
      is not obvious. It could be a section type, a symbol type or a
      relocation type.
      
      Since we do not do any arithemetic operations on relocation types
      (e.g. adding one to R_X86_64_PC32 doesn't make sense), it would be
      more natural if they are represented as enums. Unfortunately, that
      is not doable because relocation type definitions are spread into
      multiple header files.
      
      So I decided to use typedef. This still should be better than the
      plain uint32_t because the intended type is now obvious.
      
      llvm-svn: 315525
      67533a2c
  2. Oct 11, 2017
  3. Oct 10, 2017
    • Rafael Espindola's avatar
      Don't create a dummy __tls_get_addr. · 97c57b9e
      Rafael Espindola authored
      We just don't need one with the current setup.
      
      We only error on undefined references that are used by some
      relocation.
      
      If we managed to relax all uses of __tls_get_addr, no relocation uses
      it and we don't produce an error.
      
      This is less code and fixes the case were we fail to relax. Before we
      would produce a broken output, but now we produce an error.
      
      llvm-svn: 315334
      97c57b9e
    • James Henderson's avatar
      [ELF] Set Dot initially to --image-base value when using linker scripts · b5ca92ef
      James Henderson authored
      When parsing linker scripts, LLD previously started with a '.' value of 0,
      regardless of the internal default image base for the target, and regardless of
      switches such as --image-base. It seems reasonable to use a different image base
      value when using linker scripts and --image-base is specified, since otherwise the
      switch has no effect. This change does this, as well as removing unnecessary
      initialisation of Dot where it is not used.
      
      The default image base should not be used when processing linker
      scripts, because this will change the behaviour for existing linker script users,
      and potentially result in invalid output being produced, as a subsequent assignment
      to Dot could move the location counter backwards. Instead, we maintain the existing
      behaviour of starting from 0 if --image-base is not specified.
      
      Reviewers: ruiu
      
      Differential Revision: https://reviews.llvm.org/D38360
      
      llvm-svn: 315293
      b5ca92ef
    • Andrew Ng's avatar
      [LLD] Fix findOrphanPos to consistently ignore "dead" OutputSection's · 4d54a4b4
      Andrew Ng authored
      When findOrphanPos does the reverse search to find the OutputSection
      preceding the orphan's insertion point, look for a live OutputSection
      and ignore "dead" OutputSection's. This matches the behaviour of the
      forward search performed earlier in this function.
      
      Added test which without the above fix fails as a result of an orphan
      executable section being incorrectly placed in a non-executable segment.
      
      Differential Review: https://reviews.llvm.org/D38690
      
      llvm-svn: 315292
      4d54a4b4
Loading