aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog21
-rwxr-xr-xld/configure17
-rw-r--r--ld/configure.ac13
-rw-r--r--ld/scripttempl/avr.sc22
-rw-r--r--ld/testsuite/ld-elf/indirect.exp15
-rw-r--r--ld/testsuite/ld-elfweak/elfweak.exp4
-rw-r--r--ld/testsuite/ld-plugin/lto.exp2
-rw-r--r--ld/testsuite/ld-powerpc/elfv2-2so.d2
8 files changed, 76 insertions, 20 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 52bbeda..7b03989 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,24 @@
+2025-07-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * testsuite/ld-elfweak/elfweak.exp: Enable on *-*-solaris2* rather
+ than sparc*-*-solaris2* only.
+
+2025-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * testsuite/ld-plugin/lto.exp (PR ld/28138 test): Raise fd limit
+ to 25.
+
+2025-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * testsuite/ld-elf/indirect.exp (Run with libpr19553c.so):
+ Skip on *-*-solaris2*.
+
+2025-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR ld/32580
+ * configure.ac <*-*-solaris2*>: Enforce SHELL=/bin/bash.
+ * configure: Regenerate.
+
2025-07-13 Nick Clifton <nickc@redhat.com>
* 2.45 Branch point.
diff --git a/ld/configure b/ld/configure
index 015666d..124b441 100755
--- a/ld/configure
+++ b/ld/configure
@@ -3362,6 +3362,19 @@ fi
+case $target in
+ *-*-solaris2*)
+ case "$SHELL" in
+ *bash*)
+ ;;
+ *)
+ # PR 32580: Force use of bash to avoid corrupt linker scripts.
+ SHELL=/bin/bash
+ ;;
+ esac
+ ;;
+esac
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -11501,7 +11514,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11504 "configure"
+#line 11517 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11607,7 +11620,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11610 "configure"
+#line 11623 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/ld/configure.ac b/ld/configure.ac
index af065fe..e306c1d 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -28,6 +28,19 @@ AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE
+case $target in
+ *-*-solaris2*)
+ case "$SHELL" in
+ *bash*)
+ ;;
+ *)
+ # PR 32580: Force use of bash to avoid corrupt linker scripts.
+ SHELL=/bin/bash
+ ;;
+ esac
+ ;;
+esac
+
AC_PROG_CC
AC_PROG_CXX
AC_PROG_GREP
diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc
index 4d9af7f..a902385 100644
--- a/ld/scripttempl/avr.sc
+++ b/ld/scripttempl/avr.sc
@@ -186,7 +186,9 @@ SECTIONS
/* Internal text space or external memory. */
.text ${RELOCATING-0} :
{
- ${RELOCATING+*(.vectors)
+EOF
+test -z "${RELOCATING}" || cat <<EOF
+ *(.vectors)
KEEP(*(.vectors))
/* For data that needs to reside in the lower 64k of progmem.
@@ -197,7 +199,7 @@ SECTIONS
*(.progmem.*)
__progmem_end = . ;
ASSERT (__progmem_start == __progmem_end || __progmem_end <= 0x10000,
- \".progmem section exceeds 0x10000\");
+ ".progmem section exceeds 0x10000");
. = ALIGN(2);
__trampolines_start = . ;
@@ -210,8 +212,9 @@ SECTIONS
/* For code that needs to reside in the lower 128k progmem. */
*(.lowtext)
- *(.lowtext*)}
-
+ *(.lowtext*)
+EOF
+cat <<EOF
${CONSTRUCTING+ __ctors_start = . ; }
${CONSTRUCTING+ *(.ctors) }
${CONSTRUCTING+ __ctors_end = . ; }
@@ -365,21 +368,20 @@ EOF
fi
if test -n "${HAVE_FLMAP}"; then
- cat <<EOF
-
-${RELOCATING+
+test -z "${RELOCATING}" || cat <<EOF
__flmap_init_label = DEFINED(__flmap_init_start) ? __flmap_init_start : 0 ;
/* User can specify position of .rodata in flash (LMA) by supplying
__RODATA_FLASH_START__ or __flmap, where the former takes precedence. */
__RODATA_FLASH_START__ = DEFINED(__RODATA_FLASH_START__)
? __RODATA_FLASH_START__
: DEFINED(__flmap) ? __flmap * 32K : ${RODATA_FLASH_START};
-ASSERT (__RODATA_FLASH_START__ % 32K == 0, \"__RODATA_FLASH_START__ must be a multiple of 32 KiB\")
+ASSERT (__RODATA_FLASH_START__ % 32K == 0, "__RODATA_FLASH_START__ must be a multiple of 32 KiB")
__flmap = ${FLMAP_MASK} & (__RODATA_FLASH_START__ >> 15);
__RODATA_FLASH_START__ = __flmap << 15;
__rodata_load_start = MAX (__data_load_end, __RODATA_FLASH_START__);
-__rodata_start = __RODATA_ORIGIN__ + __rodata_load_start - __RODATA_FLASH_START__;}
-
+__rodata_start = __RODATA_ORIGIN__ + __rodata_load_start - __RODATA_FLASH_START__;
+EOF
+cat << EOF
.rodata ${RELOCATING+ __rodata_start} ${RELOCATING-0} : ${RELOCATING+ AT (__rodata_load_start)}
{
*(.rodata)
diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp
index 9a0bcb2..3d9cc2a 100644
--- a/ld/testsuite/ld-elf/indirect.exp
+++ b/ld/testsuite/ld-elf/indirect.exp
@@ -189,14 +189,21 @@ set run_tests [list \
{check-ptr-eq.c} "pr18720d" "pr18720.out"] \
[list "Run with libpr19553b.so" \
"-Wl,--no-as-needed tmpdir/libpr19553b.so tmpdir/libpr19553d.so -Wl,-rpath-link,." "" \
- {pr19553a.c} "pr19553b" "pr19553b.out"] \
+ {pr19553a.c} "pr19553b" "pr19553b.out"]
+]
+
+# This test relies on versioned symbols, which Solaris ld.so.1 doesn't support.
+if { ![istarget *-*-solaris2*] } {
+ lappend run_tests \
[list "Run with libpr19553c.so" \
"-Wl,--no-as-needed tmpdir/libpr19553c.so tmpdir/libpr19553b.so tmpdir/libpr19553d.so" "" \
- {pr19553a.c} "pr19553c" "pr19553c.out"] \
+ {pr19553a.c} "pr19553c" "pr19553c.out"]
+}
+
+lappend run_tests \
[list "Run with libpr19553d.so" \
"-Wl,--no-as-needed tmpdir/libpr19553d.so tmpdir/libpr19553b.so -Wl,-rpath-link,." "" \
- {pr19553a.c} "pr19553d" "pr19553d.out"] \
-]
+ {pr19553a.c} "pr19553d" "pr19553d.out"]
run_ld_link_exec_tests $run_tests
diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp
index aa6c29a..4e5ac42 100644
--- a/ld/testsuite/ld-elfweak/elfweak.exp
+++ b/ld/testsuite/ld-elfweak/elfweak.exp
@@ -35,7 +35,8 @@ if { ![check_shared_lib_support] } {
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
# This is similar to the test that is used in ld-shared, BTW.
-if { ![istarget alpha*-*-linux*]
+if { ![istarget *-*-solaris2*]
+ && ![istarget alpha*-*-linux*]
&& ![istarget arm*-*-linux*]
&& ![istarget hppa*64*-*-hpux*]
&& ![istarget hppa*-*-linux*]
@@ -52,7 +53,6 @@ if { ![istarget alpha*-*-linux*]
&& ![istarget powerpc*-*-sysv4*]
&& ![istarget sh\[34\]*-*-linux*]
&& ![istarget sparc*-*-elf]
- && ![istarget sparc*-*-solaris2*]
&& ![istarget sparc*-*-linux*]
&& ![istarget x86_64-*-linux*] } {
return
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index d68e5f4..9ac3cf6 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -1009,7 +1009,7 @@ run_cc_link_tests [list \
set board_flags [get_board_flags]
set exec_output [run_host_cmd "sh" \
- "-c \"ulimit -n 20; \
+ "-c \"ulimit -n 25; \
$CC_FOR_TARGET $gcc_B_opt $CFLAGS_FOR_TARGET \
$board_flags $ld_L_opt -o tmpdir/pr28138 \
tmpdir/pr28138.o tmpdir/pr28138.a\""]
diff --git a/ld/testsuite/ld-powerpc/elfv2-2so.d b/ld/testsuite/ld-powerpc/elfv2-2so.d
index 56b1434..18bc87f 100644
--- a/ld/testsuite/ld-powerpc/elfv2-2so.d
+++ b/ld/testsuite/ld-powerpc/elfv2-2so.d
@@ -2,4 +2,4 @@
#source: elfv2-2b.s
#as: -a64
#ld: -melf64ppc -shared -e f1
-#error: .* R_PPC64_ADDR64_LOCAL reloc unsupported in shared libraries and PIEs.*
+#error: .* R_PPC64_ADDR64_LOCAL unsupported in shared libraries and PIEs.*