Skip to content
  1. Dec 22, 2016
  2. Dec 21, 2016
  3. Dec 19, 2016
  4. Dec 09, 2016
  5. Dec 08, 2016
    • Rafael Espindola's avatar
      Change the implementation of --dynamic-list to use linker script parsing. · d0ebd84c
      Rafael Espindola authored
      The feature is documented as
      -----------------------------
      The format of the dynamic list is the same as the version node
      without scope and node name.  See *note VERSION:: for more
      information.
      --------------------------------
      
      And indeed qt uses a dynamic list with an 'extern "C++"' in it. With
      this patch we support that
      
      The change to gc-sections-shared makes us match bfd. Just because we
      kept bar doesn't mean it has to be in the dynamic symbol table.
      
      The changes to invalid-dynamic-list.test and reproduce.s are because
      of the new parser.
      
      The changes to version-script.s are the only case where we change
      behavior with regards to bfd, but I would like to see a mix of
      --version-script and --dynamic-list used in the wild before
      complicating the code.
      
      llvm-svn: 289082
      d0ebd84c
  6. Dec 05, 2016
  7. Nov 28, 2016
  8. Nov 21, 2016
    • Rui Ueyama's avatar
      Add comments. · 0b1b695a
      Rui Ueyama authored
      This patch rearranges code a bit to make it easy to explain.
      
      llvm-svn: 287515
      0b1b695a
  9. Nov 19, 2016
  10. Nov 18, 2016
  11. Nov 17, 2016
    • Rui Ueyama's avatar
      Allow SIZEOF() command on nonexistent section. · edf75e79
      Rui Ueyama authored
      Linker script doesn't create a section if it has no content. So the following
      script doesn't create .norelocs section if it doesn't have any .rel* sections.
      
        .norelocs : { *(.rel*) }
      
      Later, if you assert that the size of .norelocs is 0, LLD printed out
      an error message, because it didn't allow calling SIZEOF() on nonexistent
      sections.
      
      This patch allows SIZEOF() on nonexistent sections, so that you can do
      something like this.
      
        ASSERT(SIZEOF(.norelocs), "shouldn't contain .rel sections!")
      
      Note that this behavior is compatible with GNU.
      
      Differential Revision: https://reviews.llvm.org/D26810
      
      llvm-svn: 287257
      edf75e79
  12. Nov 16, 2016
  13. Nov 14, 2016
  14. Nov 10, 2016
  15. Nov 05, 2016
  16. Nov 03, 2016
  17. Oct 31, 2016
    • Rafael Espindola's avatar
      The expr '.' is not absolute. · b0de56b5
      Rafael Espindola authored
      With this patch we keep track of the fact that . is a position in the
      file and therefore not absolute. This allow us to compute relative
      relocations that involve symbol that are defined in linker scripts
      with '.'.
      
      This fixes https://llvm.org/bugs/show_bug.cgi?id=30406
      
      There is still more work to track absoluteness over the various
      expressions, but this should unblock linking the EFI bootloader.
      
      llvm-svn: 285641
      b0de56b5
    • Rafael Espindola's avatar
      Delay computation of IsAbsolute. · 2f831dca
      Rafael Espindola authored
      We parse linker scripts very early, but whether an expression is
      absolute or not can depend on a symbol defined in a .o. Given that, we
      have to delay the computation of IsAbsolute. We can do that by storing
      an AST when parsing or by also making IsAbsolute a function like we do
      for the expression value. This patch implements the second option.
      
      llvm-svn: 285628
      2f831dca
    • Rafael Espindola's avatar
      Move IsAbsolute from SymbolAssignment to Expr. · f661393a
      Rafael Espindola authored
      And as a token of the new feature, make ALIGNOF always absolute.
      
      This is a step in making it possible to have non absolute symbols out
      of output sections.
      
      llvm-svn: 285608
      f661393a
  18. Oct 28, 2016
    • Rui Ueyama's avatar
      Consolidate BumpPtrAllocators. · 55518e7d
      Rui Ueyama authored
      Previously, we have a lot of BumpPtrAllocators, but all these
      allocators virtually have the same lifetime because they are
      not freed until the linker finishes its job. This patch aggregates
      them into a single allocator.
      
      Differential revision: https://reviews.llvm.org/D26042
      
      llvm-svn: 285452
      55518e7d
  19. Oct 14, 2016
  20. Oct 06, 2016
  21. Oct 05, 2016
  22. Sep 29, 2016
  23. Sep 26, 2016
    • George Rimar's avatar
      [ELF] - Linkerscript: implemented BYTE/SHORT/LONG/QUAD commands. · e38cbab5
      George Rimar authored
      The BYTE, SHORT, LONG, and QUAD commands store one, two, four, and eight bytes (respectively). 
      After storing the bytes, the location counter is incremented by the number of bytes
      stored.
      
      Previously our scripts handles these commands incorrectly. For example:
      SECTIONS  {
        .foo : {
       *(.foo.1)
       BYTE(0x11)
      ...
      We accepted the script above treating BYTE as input section description. 
      These commands are used in the wild though.
      
      Differential revision: https://reviews.llvm.org/D24830
      
      llvm-svn: 282429
      e38cbab5
  24. Sep 23, 2016
  25. Sep 22, 2016
  26. Sep 21, 2016
    • George Rimar's avatar
      [ELF] - Linkerscript: support complex section pattern grammar. · 07171f21
      George Rimar authored
      This is PR30442.
      Previously we were failed to parce complex expressions like:
      foo : { *(SORT_BY_NAME(bar) zed) }
      
      Main idea of patch that globs and excludes can be wrapped in a SORT.
      There is a difference in semanics of ld/gold:
      ld likes:
      *(SORT(EXCLUDE_FILE (*file1.o) .foo.1))
      
      gold likes:
      *(EXCLUDE_FILE (*file1.o) SORT(.foo.1))
      
      Patch implements ld grammar, complex expressions like 
      next is not a problem anymore:
      .abc : { *(SORT(.foo.* EXCLUDE_FILE (*file1.o) .bar.*) .bar.*) }
      
      
      Differential revision: https://reviews.llvm.org/D24758
      
      llvm-svn: 282078
      07171f21
    • Rafael Espindola's avatar
      Revert "Revert "Only restrict order if both sections are in the script."" · b6b8f6c3
      Rafael Espindola authored
      This reverts commit r282021, bringing back r282015.
      
      The problem was that the comparison function was not a strict weak
      ordering anymore, which this patch fixes.
      
      Original message:
      
      Only restrict order if both sections are in the script.
      
      This matches gold and bfd behavior and is required to handle some scripts.
      
      The script has to assume where PT_LOADs start in order to align that
      spot. If we don't allow section it doesn't know about to move to the
      middle, we can need more PT_LOADs and those will not be aligned.
      
      llvm-svn: 282035
      b6b8f6c3
  27. Sep 20, 2016
  28. Sep 17, 2016
  29. Sep 16, 2016
Loading