]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: Don't disable -shared / -pie support for riscv*-elf users/roland/riscv64-elf-shared
authorRoland McGrath <mcgrathr@google.com>
Fri, 16 Aug 2024 02:09:14 +0000 (19:09 -0700)
committerRoland McGrath <mcgrathr@google.com>
Fri, 16 Aug 2024 02:09:14 +0000 (19:09 -0700)
Other *-elf targets support -shared and -pie modes.  There is no
reason to presuppose that riscv64-elf is used for "embedded", nor
for that matter that "embedded" is mutually exclusive with
wanting -shared and -pie functionality available in the linker.

ld/emulparams/elf32lriscv-defs.sh

index 016556168c30a6a05349d725c112e97137b5359f..5c0dac2af8bf0b2828ac6351955ee53be72a31d6 100644 (file)
@@ -16,15 +16,8 @@ if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
   esac
 fi
 
-# 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
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
 
 IREL_IN_PLT=
 TEXT_START_ADDR=0x10000