From patchwork Tue Mar 17 16:29:52 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Remus X-Patchwork-Id: 131870 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id B6B5E4B920CC for ; Tue, 17 Mar 2026 16:31:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B6B5E4B920CC Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=oWE/o6nF X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id DA5814BBC090 for ; Tue, 17 Mar 2026 16:30:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DA5814BBC090 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DA5814BBC090 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773765003; cv=none; b=a9n00qjo4cQ0NubFemS/QYYQBH5Ou0JvvCNa/t/0iOWBJbIHIx4iwn7XVso6kLZeTUK1jkZ2qmGD+i9RPrs0YySpKn/2L295Xr2Bs+WqOKPcrgjT9pE73k/KLZ+92jpOKrvi9HiJ7DM4ec7kUAPLPUuE/zPP75Qa3s6XGZwWEmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773765003; c=relaxed/simple; bh=nMFn4lV6iMZE7iiLsVp6NueyG1belEKCZ1N+kW8WIa0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=knz5s91XbF4Jy6h2t14TWGHh0u06jh074oAHd5jn2i7XeUJdb2IZONW6Ju7D8KRdkUStZKXy5LsIcPR2EYxjzcO0R6Vz3/sfzh4gt/hmkz0Jbi2D8ayIVjC8HQg8KiYVy8ijVGb3Mcc+zRhXNmEjJ75L/0evNbFc4XcjmN0V9pA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA5814BBC090 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62HCdMLl2722906; Tue, 17 Mar 2026 16:30:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=pp1; bh=UAFL9txTZ3S53bYqzV27q7ttraUfT7GsKoOCw43u2 9k=; b=oWE/o6nFlgT+F42Ury16RofihXGG99jWSwHOWn28E+DfozpC+jSVBcOtB IscIZ+8u7UHcHSfqZP5u/6+fD5oR4Uehn12hrgbvr/t3EiwDdCizjXjHnZADW+Wy RR9sEwcpGDQ7iFpM5IGblyAxEx2vhv1nJDiSyiClASdVj/LQjJ86ez7etNefLiD+ FmOSfehKJgi5rDdPQ9rLEZlPt86pJKxhsg8T5tQvlJc0ZlWJliMKCP4vlfDOuRct Hs0EzwdPplT5EwVoEdyhuRzVJIePPlrKqWe+kJ6abWpTiOzGGAPF1iompgJBMgVE o3HCKO42Wost54uJLuHOgZPy3eXRQ== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4cvyaud6ga-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Mar 2026 16:29:59 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 62HF7j5A015746; Tue, 17 Mar 2026 16:29:58 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4cwk0n9xtv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Mar 2026 16:29:58 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 62HGTsfv28967546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Mar 2026 16:29:54 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9A5EF2004B; Tue, 17 Mar 2026 16:29:54 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6B56D20040; Tue, 17 Mar 2026 16:29:54 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.87.85.9]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 17 Mar 2026 16:29:54 +0000 (GMT) From: Jens Remus To: binutils@sourceware.org, Andreas Krebbel , Nick Clifton , Alan Modra , Jan Beulich Cc: Jens Remus , Ilya Leoshkevich , Michael Matz , Rui Ueyama Subject: [PATCH v3] s390: Do not use canonical PLT if pointer equality is not needed Date: Tue, 17 Mar 2026 17:29:52 +0100 Message-ID: <20260317162952.3527279-1-jremus@linux.ibm.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzE3MDE0MyBTYWx0ZWRfX2G/69mnNJOde wa9fwOq1pj/peToNeJwkOBOQS4u1D6NzvJjRO8eBpv+sa+NjrqT5Sqf2pOi5puiA23t4QHDaOm3 FQR3C+aLejTlhq0BoCgjqiD9HIUNArnbXONfq5Y1tuH5PIaDZacfBh+AroGd+N+m1MJlKA8g54u 02nz8Ln/Sw2CUZaDdG5X2oUEGTdEeEfmTQplCBxPrNbJJ+PdVfCooDP3vh/3w4bSBlBQ+nsxJi/ 3rvq+u6BB3EjhNt3R8XSAMBGBbitb+6zt9hq91XcAUVApiwg0BNT3mW9kGK42ajEI8DUou+TDQQ Dps0qjgoTfPWUhKVgmeKEe2Kl7R7Rp8bhBODlDrEMs8pM5N1ABnLE/HqZqa6NhYcU0nQ0gbzUPV 35+ARcoVj7pG/Ql8n1hzvAGzLO5ClQWuWU75Z4EplwofVRtIhb2EIzokVdtcee+QgNeTrKgf+rJ zK3Tiz8zAdPCfA2xsug== X-Authority-Analysis: v=2.4 cv=GIQF0+NK c=1 sm=1 tr=0 ts=69b98187 cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=aYxQBJOB5BQ_-b7H:21 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=RzCfie-kr_QcCd8fBx8p:22 a=mDV3o1hIAAAA:8 a=CCpqsmhAAAAA:8 a=VnNF1IyMAAAA:8 a=qPo07d7H_QxI2t6OggkA:9 a=ul9cdbp4aOFLsgKbc677:22 X-Proofpoint-ORIG-GUID: ZAmDhpysmiZ9Woachlz44friGmnOBf2p X-Proofpoint-GUID: il3mKW5wsd1cn9ZmoKyPnVRetg30X4Ei X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-17_03,2026-03-17_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 impostorscore=0 suspectscore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603170143 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, PROLO_LEO2, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org Require pointer equality in executables for symbols with non-PLT PC-relative relocations, that are likely in address taken context, and direct relocations, that are likely in function reference context. Do so for IFUNC symbols defined in a non-shared object. Clear value of PLT undefined symbols if pointer equality is not needed and do not hash them in '.gnu.hash' section. Linkers need to make this distinction in order to decide whether to ask the dynamic linker to use canonical PLT entries. Normally GOT entries in shared libraries contain addresses of the respective functions, with one notable exception: when a PDE (Position-Dependent Executable; no-PIE) calls the respective function and also takes its address. Such executables assume that all addresses are known in advance, so they use addresses of the respective PLT entries. For consistency reasons, all respective GOT entries in the process must also use them. When a linker sees that a PDE both calls a function and also takes its address, it creates a PLT entry and asks the dynamic linker to consider it canonical by setting the respective undefined symbol's value, which is normally zero, to the address of this executable PLT entry. As workaround for GCC 12-14 treat PC32DBL relocation for address taking instruction "larl rX,@PLT" as if it was without @PLT suffix and require pointer equality. GCC 12-14, since GCC commit 0990d93dd8a4 ("IBM Z: Use @PLT symbols for local functions in 64-bit mode") [1], unconditionally suffix non-local symbols with @PLT, regardless of whether they are used in function call instructions (i.e. brasl) or address taking instructions (i.e. larl). The assembler therefore generates a PLT32DBL instead of a PC32DBL relocation for larl. The linker therefore cannot distinguish between function call and address taking instructions solely from the relocation type. The latter requiring pointer equality. This complements GCC commit a2e0a30c52fa ("IBM zSystems: Do not use @PLT with larl") [2], which makes GCC stop suffixing @PLT to address taking larl instructions, so that the correct behavior with regards to pointer equality is also achieved with affected GCC 12-14. Note that this workaround can be reverted once GCC 12-14 emitting address taking larl instructions with @PLT suffix have become irrelevant. Note that without the workaround for GCC 12-14 suffixing @PLT to larl the following linker tests would fail: FAIL: shared FAIL: visibility (hidden_normal) FAIL: visibility (hidden_weak) FAIL: visibility (protected) FAIL: visibility (protected_undef_def) FAIL: visibility (protected_weak) FAIL: visibility (normal) Based on x86-64, especially Jakub Jelinek's x86 commits 47a9f7b34f7a (clearing value of PLT undefined symbols if pointer equality not needed) and fdc90cb46b0f (omitting PLT undefined symbols from '.gnu.hash'). [1] GCC commit 0990d93dd8a4 ("IBM Z: Use @PLT symbols for local functions in 64-bit mode"), https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0990d93dd8a4 [2] GCC commit a2e0a30c52fa ("IBM zSystems: Do not use @PLT with larl"), https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a2e0a30c52fa bfd/ PR ld/29655 * elf64-s390.c (elf_s390_check_relocs): Require pointer equality for direct and non-PLT PC-relative relocations indicating address taking instructions and for PLT32DBL relocations, when used with address taking larl instruction. (elf_s390_finish_dynamic_symbol): Do not use canonical PLT for non-local undefined symbols if pointer equality is not needed. Abort if pointer equality needed flag not set although required. (elf_s390_copy_indirect_symbol): Copy pointer equality needed flag. (elf_s390_hash_symbol): New function. Based on x86-64. (elf_backend_hash_symbol): Wire up elf_s390_hash_symbol. ld/testsuite/ PR ld/29655 * ld-elf/shared.exp: Add new pr29655 test. * ld-elf/pr29655a.c: New file. Based on Rui's sample in PR. * ld-elf/pr29655b.c: Likewise. * ld-s390/plt_64-1.wf: Adjust expected test output to change in .gnu.hash due to omitted PLT undefined symbols that do not need pointer equality. * ld-s390/plt_64-1_eh.wf: Likewise. Bug: https://sourceware.org/PR29655 Co-authored-by: Andreas Krebbel Signed-off-by: Jens Remus --- Notes (jremus): Changes in v3: - Turn pr29655 test into a run_cc_link_tests that checks the executable using readelf --dyn-sym looking for a zero value undefined fun_public. (Alan) - clear-xfail arm*-*-* aarch64-*-* pr29655 test. (Linaro-TCWG-CI) - clear-xfail alpha-*-* hppa-*-* ia64-*-* microblaze-*-* mips-*-* mips64-*-*. (Alan) Changes in v2: - Reword commit message to reflect that function pointer equality is required for all direct and non-PLT PC-relative relocations and to mention which tests fail without the GCC 12-14 workaround. - Fix typo in comment on GCC 12-14 workaround. (Andreas) - Have main() return 0 in test. (Andreas) - Adding Nick, Alan, and Jan due to the added common test case. Note: Splitting the GCC 12-14 workaround into a separate patch either requires it to be the first patch or causes one shared and multiple visibility tests to fail. Addressing the latter using a setup_fail condition as follows (that would get removed by the workaround-patch) seemed rather odd to me: # On s390 64-bit (s390x) GCC 12-14 suffix symbols in address # taken context with @PLT, which breaks function pointer equality. if { [istarget s390x-*-linux*] && [at_least_gcc_version 12 0] && ![at_least_gcc_version 15 0] } { setup_xfail "s390x-*-linux*" } bfd/elf64-s390.c | 66 ++++++++++++++++++++++++++++- ld/testsuite/ld-elf/pr29655.rd | 5 +++ ld/testsuite/ld-elf/pr29655a.c | 20 +++++++++ ld/testsuite/ld-elf/pr29655b.c | 15 +++++++ ld/testsuite/ld-elf/shared.exp | 30 +++++++++++++ ld/testsuite/ld-s390/plt_64-1.wf | 8 ++-- ld/testsuite/ld-s390/plt_64-1_eh.wf | 2 +- 7 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 ld/testsuite/ld-elf/pr29655.rd create mode 100644 ld/testsuite/ld-elf/pr29655a.c create mode 100644 ld/testsuite/ld-elf/pr29655b.c diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index 3925cf6494d3..4730cc2cdb54 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -852,6 +852,7 @@ elf_s390_copy_indirect_symbol (struct bfd_link_info *info, dir->ref_regular |= ind->ref_regular; dir->ref_regular_nonweak |= ind->ref_regular_nonweak; dir->needs_plt |= ind->needs_plt; + dir->pointer_equality_needed |= ind->pointer_equality_needed; } else _bfd_elf_link_hash_copy_indirect (info, dir, ind); @@ -1037,6 +1038,7 @@ elf_s390_check_relocs (bfd *abfd, referenced. */ h->ref_regular = 1; h->needs_plt = 1; + h->pointer_equality_needed = 1; } } @@ -1078,6 +1080,38 @@ elf_s390_check_relocs (bfd *abfd, { h->needs_plt = 1; h->plt.refcount += 1; + + /* GCC 12-14 unconditionally suffix non-local symbols + with @PLT, regardless of whether they are used in + function call instructions (i.e. brasl) or address + taking instructions (i.e. larl). Treat PLT32DBL + relocation for "larl rX,@PLT" instruction as + address taking and require pointer equality. */ + if (bfd_link_executable (info) + && r_type == R_390_PLT32DBL + && rel->r_offset >= 2) + { + bfd_byte *contents; + void *insn_start; + uint16_t op; + + if (elf_section_data (sec)->this_hdr.contents != NULL) + contents = elf_section_data (sec)->this_hdr.contents; + else if (!_bfd_elf_mmap_section_contents (abfd, sec, &contents)) + return false; + + insn_start = contents + rel->r_offset - 2; + op = bfd_get_16 (abfd, insn_start) & 0xff0f; + + if (op == 0xc000) + { + /* larl rX,@PLT */ + h->pointer_equality_needed = 1; + } + + if (elf_section_data (sec)->this_hdr.contents != contents) + _bfd_elf_munmap_section_contents (sec, contents); + } } break; @@ -1227,6 +1261,12 @@ elf_s390_check_relocs (bfd *abfd, refers to is in a shared lib. */ h->plt.refcount += 1; } + + /* Require pointer equality in PDE for above PC-relative + relocations, that are likely in address taken context, + and direct relocations, that are likely in function + reference context. */ + h->pointer_equality_needed = 1; } /* If we are creating a shared library, and this is a reloc @@ -3692,11 +3732,16 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, if (!h->def_regular) { /* Mark the symbol as undefined, rather than as defined in - the .plt section. Leave the value alone. This is a clue + the .plt section. Leave the value if there were any + relocations where pointer equality matters (this is a clue for the dynamic linker, to make function pointer comparisons work between an application and shared - library. */ + library), otherwise set it to zero. If a function is only + called from a binary, there is no need to slow down + shared libraries because of that. */ sym->st_shndx = SHN_UNDEF; + if (!h->pointer_equality_needed) + sym->st_value = 0; } } } @@ -3730,6 +3775,9 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, } else { + if (!h->pointer_equality_needed) + abort (); + /* For non-shared objects explicit GOT slots must be filled with the PLT slot address for pointer equality reasons. */ @@ -4344,6 +4392,19 @@ elf_s390_create_dynamic_sections (bfd *dynobj, return true; } +/* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */ + +static bool +elf_s390_hash_symbol (struct elf_link_hash_entry *h) +{ + if (h->plt.offset != (bfd_vma) -1 + && !h->def_regular + && !h->pointer_equality_needed) + return false; + + return _bfd_elf_hash_symbol (h); +} + /* Why was the hash table entry size definition changed from ARCH_SIZE/8 to 4? This breaks the 64 bit dynamic linker and this is the only reason for the s390_elf64_size_info structure. */ @@ -4424,6 +4485,7 @@ static const struct elf_size_info s390_elf64_size_info = #define elf_backend_sort_relocs_p elf_s390_elf_sort_relocs_p #define elf_backend_additional_program_headers elf_s390_additional_program_headers #define elf_backend_modify_segment_map elf_s390_modify_segment_map +#define elf_backend_hash_symbol elf_s390_hash_symbol #define bfd_elf64_mkobject elf_s390_mkobject #define elf_backend_object_p elf_s390_object_p diff --git a/ld/testsuite/ld-elf/pr29655.rd b/ld/testsuite/ld-elf/pr29655.rd new file mode 100644 index 000000000000..b294ca95a641 --- /dev/null +++ b/ld/testsuite/ld-elf/pr29655.rd @@ -0,0 +1,5 @@ +Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name +#... + +[0-9]+: +0+ +0 +FUNC +GLOBAL +DEFAULT +UND +fun_public +#... diff --git a/ld/testsuite/ld-elf/pr29655a.c b/ld/testsuite/ld-elf/pr29655a.c new file mode 100644 index 000000000000..e523f82d4564 --- /dev/null +++ b/ld/testsuite/ld-elf/pr29655a.c @@ -0,0 +1,20 @@ +#include + +typedef void Fn(); + +void __attribute__((visibility("hidden"))) +fun (void) +{} + +extern void fun_public() __attribute__((alias("fun"))); + +void +call_callback (Fn *callback) +{ + if (callback == fun) + printf("PASS\n"); + else + printf("FAIL\n"); + + callback (); +} diff --git a/ld/testsuite/ld-elf/pr29655b.c b/ld/testsuite/ld-elf/pr29655b.c new file mode 100644 index 000000000000..527fd462b944 --- /dev/null +++ b/ld/testsuite/ld-elf/pr29655b.c @@ -0,0 +1,15 @@ +#ifndef __PIC__ +#error "this file must be compiled with -fPIC" +#endif + +typedef void Fn(); +void fun_public(void); +void call_callback(Fn *callback); + +int +main () +{ + fun_public (); + call_callback (fun_public); + return 0; +} diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 808ad6ffdb6c..a44a65b3428b 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -1863,3 +1863,33 @@ run_ld_link_tests [list \ "pr23658-2" \ ] \ ] + +# PR 29655 +run_cc_link_tests [list \ + [list \ + "Build pr29655.so" \ + "-shared" \ + "-fPIC" \ + { pr29655a.c } \ + {} \ + "pr29655.so" \ + ] \ +] +# PR 29655 (cont.): Check that in PIC code linked as PDE taking the address +# of a function defined in a DSO results in the function address (from GOT) +# and not the "canonical PLT" address from the PDE. +# This is just an optimization and both is valid, although libraries may +# depend on this specific behavior, so do not complain loudly. +setup_xfail *-*-* +clear_xfail aarch64-*-* alpha-*-* arm*-*-* hppa-*-* i?86-*-* ia64-*-* \ + microblaze-*-* mips-*-* mips64-*-* powerpc*-*-* s390x-*-* x86_64-*-* +run_cc_link_tests [list \ + [list \ + "Build pr29655" \ + "$NOPIE_LDFLAGS -Wl,--no-as-needed,-rpath,tmpdir tmpdir/pr29655.so" \ + "-fPIC" \ + { pr29655b.c } \ + {{readelf {--dyn-syms --wide} pr29655.rd}} \ + "pr29655" \ + ] \ +] diff --git a/ld/testsuite/ld-s390/plt_64-1.wf b/ld/testsuite/ld-s390/plt_64-1.wf index 61dc4c7a9894..eac5502e111b 100644 --- a/ld/testsuite/ld-s390/plt_64-1.wf +++ b/ld/testsuite/ld-s390/plt_64-1.wf @@ -19,14 +19,14 @@ Contents of the .eh_frame section: DW_CFA_nop DW_CFA_nop -00000018 000000000000001c 0000001c FDE cie=00000000 pc=00000000010002b8..00000000010002e4 +00000018 000000000000001c 0000001c FDE cie=00000000 pc=00000000010002b0..00000000010002dc DW_CFA_remember_state - DW_CFA_advance_loc: 6 to 00000000010002be + DW_CFA_advance_loc: 6 to 00000000010002b6 DW_CFA_offset: r14 at cfa-48 DW_CFA_offset: r15 at cfa-40 - DW_CFA_advance_loc: 8 to 00000000010002c6 + DW_CFA_advance_loc: 8 to 00000000010002be DW_CFA_def_cfa_offset: 320 - DW_CFA_advance_loc: 24 to 00000000010002de + DW_CFA_advance_loc: 24 to 00000000010002d6 DW_CFA_restore_state DW_CFA_nop DW_CFA_nop diff --git a/ld/testsuite/ld-s390/plt_64-1_eh.wf b/ld/testsuite/ld-s390/plt_64-1_eh.wf index 717e7a7e2a61..794aeee23864 100644 --- a/ld/testsuite/ld-s390/plt_64-1_eh.wf +++ b/ld/testsuite/ld-s390/plt_64-1_eh.wf @@ -19,7 +19,7 @@ Contents of the .eh_frame section: DW_CFA_nop DW_CFA_nop -00000018 0000000000000014 0000001c FDE cie=00000000 pc=0000000001000258..00000000010002b8 +00000018 0000000000000014 0000001c FDE cie=00000000 pc=0000000001000250..00000000010002b0 DW_CFA_nop DW_CFA_nop DW_CFA_nop