PR ld/21375: MIPS: Add test cases for undefined weaks resolving to zero
[deliverable/binutils-gdb.git] / ld / emulparams / elf32lriscv-defs.sh
index 0eba0d1a0cb39a082b4022b64b9a9145da6213b3..91015d44714d0543e0a9de1a3c01bded4b3ed193 100644 (file)
@@ -16,14 +16,21 @@ if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
   esac
 fi
 
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
+# Enable shared library support for everything except an embedded elf target.
+case "$target" in
+  riscv*-elf)
+    ;;
+  *)
+    GENERATE_SHLIB_SCRIPT=yes
+    GENERATE_PIE_SCRIPT=yes
+    ;;
+esac
 
 TEXT_START_ADDR=0x10000
 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
 
-SDATA_START_SYMBOLS="_gp = . + 0x800;
+SDATA_START_SYMBOLS="${CREATE_SHLIB-__global_pointer$ = . + 0x800;}
     *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*)"
 
 INITIAL_READONLY_SECTIONS=".interp         : { *(.interp) } ${CREATE_PIE-${INITIAL_READONLY_SECTIONS}}"
This page took 0.041944 seconds and 4 git commands to generate.