浏览代码

Merge #38

38: link.x: Add .sdata2 sections r=Disasm a=laanwj

Clang doesn't seem to generate these, but GCC (8.3.0 at least) does. I'm trying to link secp256k1, which is a C library, to my Rust code so the linker script needs to include these sections too.

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
bors[bot] 5 年之前
父节点
当前提交
c7579332c0
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      riscv-rt/Cargo.toml
  2. 1 1
      riscv-rt/link.x
  3. 1 1
      riscv-rt/src/lib.rs

+ 1 - 1
riscv-rt/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "riscv-rt"
-version = "0.6.0"
+version = "0.6.1"
 repository = "https://github.com/rust-embedded/riscv-rt"
 authors = ["The RISC-V Team <risc-v@teams.rust-embedded.org>"]
 categories = ["embedded", "no-std"]

+ 1 - 1
riscv-rt/link.x

@@ -57,7 +57,7 @@ SECTIONS
     _sdata = .;
     /* Must be called __global_pointer$ for linker relaxations to work. */
     PROVIDE(__global_pointer$ = . + 0x800);
-    *(.sdata .sdata.*);
+    *(.sdata .sdata.* .sdata2 .sdata2.*);
     *(.data .data.*);
     . = ALIGN(4);
     _edata = .;

+ 1 - 1
riscv-rt/src/lib.rs

@@ -30,7 +30,7 @@
 //! $ # add this crate as a dependency
 //! $ edit Cargo.toml && cat $_
 //! [dependencies]
-//! riscv-rt = "0.6.0"
+//! riscv-rt = "0.6.1"
 //! panic-halt = "0.2.0"
 //!
 //! $ # memory layout of the device