Skip to content
  1. Oct 11, 2017
    • Rui Ueyama's avatar
      Rename Commands -> SectionCommands. · 6b394caa
      Rui Ueyama authored
      "Commands" was ambiguous because in the linker script, everything is
      a command. We used to handle only SECTIONS commands, and at the time,
      it might make sense to call them the commands, but it is no longer
      the case. We handle not only SECTIONS but also MEMORY, PHDRS, VERSION,
      etc., and they are all commands.
      
      llvm-svn: 315409
      6b394caa
    • Rui Ueyama's avatar
      Rename HasSections -> HasSectionsComand. · a323e2a7
      Rui Ueyama authored
      HasSections is true if there is at least one SECTIONS linker
      script command, and it is not directly related to whether we have
      section objects or not. So I think the new name is better.
      
      llvm-svn: 315405
      a323e2a7
    • Rui Ueyama's avatar
      Move a loop invariant outside the loop. · 7f1c266e
      Rui Ueyama authored
      llvm-svn: 315404
      7f1c266e
    • Rui Ueyama's avatar
      Remove ScriptConfiguration class and move the members to LinkerScript class. · ac27de9d
      Rui Ueyama authored
      ScriptConfiguration was a class to contain parsed results of
      linker scripts. LinkerScript is a class to interpret it.
      
      That ditinction was needed because we haven't instantiated
      LinkerScript early (because, IIRC, LinkerScript class was a
      ELFT template function). So, when we parse linker scripts,
      we couldn't directly store the result to a LinkerScript instance.
      
      Now, that limitation is gone. We instantiate LinkerScript
      at the very beginning of our main function. We can directly
      store parse results to a LinkerScript instance.
      
      llvm-svn: 315403
      ac27de9d
    • Rui Ueyama's avatar
      Inline addRegular into addSymbol. · 18d19687
      Rui Ueyama authored
      Because addRegular's functionality is tightly coupled with
      addSymbol, and the former is called only once, it makes sense
      to merge the two functions. This patch also adds comments.
      
      llvm-svn: 315401
      18d19687
    • Rui Ueyama's avatar
      Remove a constructor from ExprValue. NFC. · 4fbe3518
      Rui Ueyama authored
      I think three ctors are too many for this simple class.
      
      llvm-svn: 315394
      4fbe3518
    • Rui Ueyama's avatar
      Add comments. · 41ef17bb
      Rui Ueyama authored
      llvm-svn: 315393
      41ef17bb
    • Rui Ueyama's avatar
      Remove an unused default argument. · ed94f361
      Rui Ueyama authored
      llvm-svn: 315386
      ed94f361
    • Rui Ueyama's avatar
      Handle input section liveness only in MarkLive.cpp. · a1b79dff
      Rui Ueyama authored
      The condition whether a section is alive or not by default
      is becoming increasingly complex, so the decision of garbage
      collection is spreading over InputSection.h and MarkLive.cpp,
      which is not a good state.
      
      This moves the code to MarkLive.cpp, to keep the file the central
      place to make decisions about garbage collection.
      
      llvm-svn: 315384
      a1b79dff
    • Rafael Espindola's avatar
      Update for llvm change. · ae5e9ed4
      Rafael Espindola authored
      llvm-svn: 315377
      ae5e9ed4
  2. 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
    • George Rimar's avatar
      [ELF] - Improve "has non-ABS reloc" error. · 7e9c5610
      George Rimar authored
      It did not contain information about relocation type and symbol.
      
      Differential revision: https://reviews.llvm.org/D38623
      
      llvm-svn: 315280
      7e9c5610
    • Rui Ueyama's avatar
      Make a local variable name shorter. NFC. · c04a91aa
      Rui Ueyama authored
      llvm-svn: 315271
      c04a91aa
    • Rui Ueyama's avatar
      Simplify. · ce135ff6
      Rui Ueyama authored
      llvm-svn: 315270
      ce135ff6
    • Rui Ueyama's avatar
      Remove dead function. · 6b7f1969
      Rui Ueyama authored
      llvm-svn: 315269
      6b7f1969
    • Rui Ueyama's avatar
      Add comments. · c9a4d1c7
      Rui Ueyama authored
      llvm-svn: 315268
      c9a4d1c7
    • Rui Ueyama's avatar
      Add more comments. · f987fe78
      Rui Ueyama authored
      llvm-svn: 315267
      f987fe78
    • Rui Ueyama's avatar
      Add comment to InputSectionBase::File. · 124bedbd
      Rui Ueyama authored
      This patch also moves declarations so that related declarations next
      to each other.
      
      llvm-svn: 315266
      124bedbd
    • Rui Ueyama's avatar
      Remove dead function. · 339ddd16
      Rui Ueyama authored
      llvm-svn: 315265
      339ddd16
  3. Oct 08, 2017
  4. Oct 07, 2017
  5. Oct 06, 2017
Loading