Browse Source

link.x: Add .sdata2 sections

Clang doesn't seem to generate these, but GCC 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.
Wladimir J. van der Laan 5 years ago
parent
commit
370700c3be
1 changed files with 1 additions and 1 deletions
  1. 1 1
      riscv-rt/link.x

+ 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 = .;