1. Mar 01, 2019
  2. Feb 22, 2019
  3. Feb 14, 2019
  4. Feb 08, 2019
  5. Feb 07, 2019
  6. Feb 05, 2019
  7. Jan 27, 2019
  8. Jan 26, 2019
  9. Nov 21, 2018
  10. Aug 18, 2018
    • bors[bot]'s avatar
      Merge #10 · 691b5ef4
      bors[bot] authored
      
      
      10: support linking with lld r=dvc94ch a=danc86
      
      Rust now ships an embedded copy of lld, so if we can link crates with lld it will make the getting started experience way smoother (don't need to find a separate GNU ld).
      
      Co-authored-by: default avatarDan Callaghan <djc@djc.id.au>
      691b5ef4
  11. Aug 15, 2018
    • Dan Callaghan's avatar
      make the linker script compatible with lld · 89506703
      Dan Callaghan authored
      To work around a bug in lld, we need to avoid starting the .bss section
      from a fixed address (previously, the _sbss symbol). Otherwise lld
      incorrectly tries to extend the FLASH output region up to the start of
      the RAM output region, which is too large.
      
      To work around another bug in lld, we need to avoid starting sections
      marked with (INFO) from a specific starting address. Its parser does not
      accept both a start address and the (INFO) attribute.
      
      Specifying these start addresses is redundant anyway, the linker will
      lay them out in sequential order for us.
      89506703
    • Dan Callaghan's avatar
      discard .eh_frame sections · 19254fa9
      Dan Callaghan authored
      The .cfi_* assembler directives cause call frame information to be
      emitted in a special .eh_frame section. But this is not needed in the
      final binary, because we are not doing panic unwinding.
      
      GNU ld already discards this section with its (default) --gc-sections
      behaviour. Lld doesn't do that by default though, instead it complains:
      
          rust-lld: error: no memory region specified for section '.eh_frame'
      
      So let's explicitly discard the .eh_frame section.
      19254fa9
    • Dan Callaghan's avatar
      align VMA not LMA · 9b5c0cd4
      Dan Callaghan authored
      This aligns the VMA (virtual adddress at runtime):
      
          .rodata ALIGN(4) :
          {
              ...
      
      whereas this aligns the LMA (load address):
      
          .rodata : ALIGN(4)
          {
              ...
      
      If we ensure the VMA is aligned the linker will keep the corresponding
      LMA in sync (and it will be aligned too).
      
      Previously, by forcing the LMA to be aligned but leaving the VMA
      unspecified, the linker would split .text and .rodata into two
      separate loads because their addresses fell out of sync.
      9b5c0cd4
    • Dan Callaghan's avatar
      remove hackery for .debug_gdb_scripts section · 24290f1f
      Dan Callaghan authored
      This is no longer necessary now that we can configure the target to
      exclude the .debug_gdb_scripts section.
      See: https://github.com/rust-lang/rust/pull/53139
      24290f1f
    • Dan Callaghan's avatar
      mark .init and .trap sections as executable · 35389466
      Dan Callaghan authored
      This is needed for lld, otherwise it will complain about section flag
      mismatch:
      
          ld.lld: error: incompatible section flags for .text
          >>> target/riscv32imac-unknown-none/debug/deps/libriscv_rt-7850ee1a6233fbe9.rlib(riscv_rt-7850ee1a6233fbe9.4tmuw4s4crjeqbm5.rcgu.o):(.trap): 0x4
          >>> output section .text: 0x6
      35389466
  12. Aug 12, 2018