From patchwork Wed Sep 30 23:54:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 145061 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EB49E4BB58D5 for ; Wed, 30 Sep 2026 23:55:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB49E4BB58D5 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=kOCnWTY3 X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pj2-x0f.google.com (mail-pj2-x0f.google.com [IPv6:2607:f8b0:4864:39::f]) by sourceware.org (Postfix) with ESMTPS id CDFFE4BB58A3 for ; Wed, 30 Sep 2026 23:54:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CDFFE4BB58A3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CDFFE4BB58A3 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2607:f8b0:4864:39::f ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1790812497; cv=pass; b=UJugZLYGMpI+xRcYoKprs3Qg3PBaY2ZR5MlfeuoUxC9NjeoODgXxcZKbxvn08slYiBpnMPjPul12VvXqS6xRp/T0AjC9cypZjuiX8VKg/u0DJhPzXiRy+wxrdfeLImqMzUQ7b11Nlbg1+7kpT4en4Dus0JpW6NqTe9s662kf9rQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1790812497; c=relaxed/simple; bh=ZABrSf092xxDl5Cy/g2JktZRsQowDXr8lWk9fsdTvKo=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=x7iEuLYdecxMTF9QK4P8Al0a80oSwfJ0L/VogMgQrowpMcQLrhKfrLYdqb8nk/t6hc4Id787226GqYL4sax42fRtkw7fUFrDjHkclXiq3C/o+KUKj0QeeZM6dMjvy88wTVxSG7rQTuJKt6jy765Z7Z3kcF7ag1+I6ME+2hVwbVA= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=kOCnWTY3 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDFFE4BB58A3 Received: by mail-pj2-x0f.google.com with SMTP id 98e67ed59e1d1-396ccd66bb4so2733514a91.1 for ; Wed, 30 Sep 2026 16:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1790812496; cv=none; d=google.com; s=arc-20260327; b=mDJmLLSzEsiV07uWj22X459w4EuTw8bH5xfjw+lRl+zPQWnF1UbZmcLeB4MPThEMUr SSD5fKQXnTWMG0LqfMPt9/ISlJpmSKaN8e5SbTYSOwfYVAsHUXB4oHbcACQNe0qdwJ8G iubLhtmXqODaK66LqTgmmr4lblwZPM24jWgprWDnbzjMRUL6eIQeTh6s4I8nafcKS+Aj pWe+CaNzUuTkzI3tE3yiM9hOxagv/+fKlLG5STcZYBP5mRVF4t3kgQ7uOTJF4i8Vg6Xz UCnGjsL0v/P4Y96H8M24X2fraEJlgYg8uMsFfgtOQILzyh+kLeux8KdshwATaevqmzgr e0QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=Z6bRGQrzRgF796xfGRDJ/RfwI79EpZw6tPOcuBgT4tk=; fh=zH/czBifiqsuTaLFgr7sgH67FzD/dKD7s4P5uxcdfeQ=; b=cPYf6e6XQBvJZRxHMtMWgrT9MbJlGbpKGCsbG5qVIBufPbvQAlwBsr0m+dApgha4ts F61QTUhjrH3f0hytRVdPxpquZwzbmPMVEefgn4xJzWKZtXUcXzW3dYdHyU27LO7giiPn DNFWfVkUhNEw0Vf8g3NBRH4lXTNhOFkaZr6qGHJSg3aASipvyzefRdF9Lne26QNVSdh9 bHTkTeSYJThcmAJwELYjlaHzsBcgKc1fMfmLCygXOP2y8KtsOcBJbupBJ3x7qOY6xHN8 Xm9pDCR1/OCiF8GIKwZg8tKH3bdKbcZJHLypkhfOi9JCaPYg+SgGpVBrxQUSSxy/YD9j FvAg==; darn=sourceware.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790812496; x=1791417296; darn=sourceware.org; h=content-type:to:subject:message-id:date:from:mime-version:from:to :cc:subject:date:message-id:reply-to:content-type; bh=Z6bRGQrzRgF796xfGRDJ/RfwI79EpZw6tPOcuBgT4tk=; b=kOCnWTY3S8lB0p3aEWxtQ/4IO91lYMWiT0OSQe61XhNJt/eHzSoB0U1mR/s8K4pZ9/ J3Fn6N9rZ1Fg+2NtbcId6e+EPXXBnZkECyzY1YHr2j6cE/4dsc8JQ2sO6g8RmLQWteiV ru95wop/Eno2l5mdZ6Oj1CD73Lk0PSEKXp7rIaDyJDOEEpFDmI7Sf+PgYDttLBZh1/Wx WQvVOGEUiYEz4BeftH+PWkjUMhrKIUROAHWfEyO4PrwaetlvIi68SCCj0u8gxSXRuqFC 43ZzRYnihRw0GKXj9I9PLoaDYGjUAzyBaLfDba1+vE2WkSBdUk1XuKKmswxVrOkGBb3Q WRVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790812496; x=1791417296; h=content-type:to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Z6bRGQrzRgF796xfGRDJ/RfwI79EpZw6tPOcuBgT4tk=; b=ipuSbfCjQeIfC+kCi9G7drr6p4oFdq8l2X1pBmOABbs7L/MCTUSJvYLPJHAMEcIwYD stK8iIwrAKSyAhIaF+z63ViRXiyZn7bLczg5VuAX/+gW3rW7GkeKpJkpvYdv/IntMF6w TySdurV1uog8hjTIpayh8FfyezZo5Rca60buljccp9my7NDpdfL/KrJN3MaXjeWDr7Sf 00JYORQu3gYsaKzBKStS3JI1NczQujkGioyStCQZJH1lOI0IpIkYRAiFfi44mn4pl0pq DDY3/x1G7SNg/pWN0trzHyfOYRjZX/ey3u+zy0+ahte7CCH0kfQAP69Cwtw4Ybztf9mZ JVlA== X-Gm-Message-State: AFq9FYJ3wHtbLTUPC/U6mUPioEuhSf17rAUfTB8B8amyRYLvmiZKFyAz ha1XKxAod3iLaBuTiH5B/Av9JTNT6KOJFRtLPzfsVm1AySEsoskxUKHy4k47VLmTx/eG+W0Bl98 1hmVt7N8UGJJJEChqqjTVUIZs9E+Na+rcqYZIM4nEyw== X-Gm-Gg: AYBFou0cHVY8cpmqmsnixaZ0y1eV5D7QmAhJnb9PUdiLV9CUguv4RvNSG7rvBMQ/pEq dNvTQLGDlfba7bCT4nvX5hVgQszd/MrUO+KDoGnL0pbbbgZsBegoiOsNpO9UYepwjQ75oMac6cg csywRNxRgMwXIYEjboQ9p8igPPi3i1/o2JYao+d1PS5u75czY33zSjM9e/rgNnAw3hQNd4JJWUn m/jkFTx0OEFGL20Hkgj7S3t8hbsFIyKnr5lraF1qhLkvl0kDSw7yOYaW+wEusej6uXSeD7FZqI3 5E/n0dRyVKUfZ/1My1D2LQxACbP19b+BHUEF2izeJz/bDOsNw9iqwkUbeA== X-Received: by 2002:a17:90a:e7d0:b0:3a0:f559:824d with SMTP id 98e67ed59e1d1-3a4f918ebcdmr504630a91.50.1790812495421; Wed, 30 Sep 2026 16:54:55 -0700 (PDT) MIME-Version: 1.0 From: "H.J. Lu" Date: Thu, 1 Oct 2026 07:54:17 +0800 X-Gm-Features: AclHuK-u1evPj3FU3jUNnVfgySrfJiRkMoW56U_KSwjbgQH84PRrEeG3yRr3kN4 Message-ID: Subject: [PATCH] x86-64: Use UD0/UD2 after indirect jump in PLT entries To: Binutils , Florian Weimer , Jan Beulich X-Spam-Status: No, score=-3008.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no 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 Replace NOP with UD0 or UD2 after indirect branch in PLT entries to implement optimization guide from Intel optimization manual: Assembly/Compiler Coding Rule 13. (M impact, L generality) When indirect branches are present, try to put the most likely target of an indirect branch immediately following the indirect branch. Alternatively, if indirect branches are common but they cannot be predicted by branch prediction hardware, then follow the indirect branch with a UD0/UD2 instruction, which will stop the processor from decoding down the fall-through path. bfd/ PR ld/34626 * elf64-x86-64.c (elf_x86_64_lazy_plt0_entry): Replace 4-byte NOP with a 4-byte UD0. (elf_x86_64_non_lazy_plt_entry): Replace 2-byte NOP with a 2-byte UD2. (elf_x86_64_non_lazy_ibt_plt_entry): Replace a 6-byte NOP with a 6-byte UD0. ld/ PR ld/34626 * testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d: Adjusted. * testsuite/ld-ifunc/ifunc-2-x86-64-now.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64-now.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64.d: Likewise. * testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-1.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2c.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3c.d: Likewise. * testsuite/ld-x86-64/mark-plt-1d-x32.d: Likewise. * testsuite/ld-x86-64/mark-plt-1d.d: Likewise. * testsuite/ld-x86-64/plt.pd: Likewise. * testsuite/ld-x86-64/plt2.dd: Likewise. * testsuite/ld-x86-64/pr19636-2d.d: Likewise. * testsuite/ld-x86-64/pr19636-2l.d: Likewise. * testsuite/ld-x86-64/pr20830a-now.d: Likewise. * testsuite/ld-x86-64/pr20830a.d: Likewise. * testsuite/ld-x86-64/pr20830b-now.d: Likewise. * testsuite/ld-x86-64/pr20830b.d: Likewise. * testsuite/ld-x86-64/tlsdesc.pd: Likewise. From c006d59eb3b66b215a4c98b6d78f484f0cbe4fcf Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 11 Sep 2026 12:18:10 +0800 Subject: [PATCH] x86-64: Use UD0/UD2 after indirect jump in PLT entries Replace NOP with UD0 or UD2 after indirect branch in PLT entries to implement optimization guide from Intel optimization manual: Assembly/Compiler Coding Rule 13. (M impact, L generality) When indirect branches are present, try to put the most likely target of an indirect branch immediately following the indirect branch. Alternatively, if indirect branches are common but they cannot be predicted by branch prediction hardware, then follow the indirect branch with a UD0/UD2 instruction, which will stop the processor from decoding down the fall-through path. bfd/ PR ld/34626 * elf64-x86-64.c (elf_x86_64_lazy_plt0_entry): Replace 4-byte NOP with a 4-byte UD0. (elf_x86_64_non_lazy_plt_entry): Replace 2-byte NOP with a 2-byte UD2. (elf_x86_64_non_lazy_ibt_plt_entry): Replace a 6-byte NOP with a 6-byte UD0. ld/ PR ld/34626 * testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d: Adjusted. * testsuite/ld-ifunc/ifunc-2-x86-64-now.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64-now.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64.d: Likewise. * testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-1.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2c.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3c.d: Likewise. * testsuite/ld-x86-64/mark-plt-1d-x32.d: Likewise. * testsuite/ld-x86-64/mark-plt-1d.d: Likewise. * testsuite/ld-x86-64/plt.pd: Likewise. * testsuite/ld-x86-64/plt2.dd: Likewise. * testsuite/ld-x86-64/pr19636-2d.d: Likewise. * testsuite/ld-x86-64/pr19636-2l.d: Likewise. * testsuite/ld-x86-64/pr20830a-now.d: Likewise. * testsuite/ld-x86-64/pr20830a.d: Likewise. * testsuite/ld-x86-64/pr20830b-now.d: Likewise. * testsuite/ld-x86-64/pr20830b.d: Likewise. * testsuite/ld-x86-64/tlsdesc.pd: Likewise. Signed-off-by: H.J. Lu --- bfd/elf64-x86-64.c | 13 +++++++------ ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d | 2 +- ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d | 2 +- ld/testsuite/ld-ifunc/pr17154-x86-64-now.d | 2 +- ld/testsuite/ld-ifunc/pr17154-x86-64.d | 2 +- ld/testsuite/ld-x86-64/ibt-plt-1-x32.d | 6 +++--- ld/testsuite/ld-x86-64/ibt-plt-1.d | 6 +++--- ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d | 6 +++--- ld/testsuite/ld-x86-64/ibt-plt-2a.d | 6 +++--- ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d | 6 +++--- ld/testsuite/ld-x86-64/ibt-plt-2c.d | 6 +++--- ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d | 6 +++--- ld/testsuite/ld-x86-64/ibt-plt-3a.d | 6 +++--- ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d | 6 +++--- ld/testsuite/ld-x86-64/ibt-plt-3c.d | 6 +++--- ld/testsuite/ld-x86-64/mark-plt-1d-x32.d | 2 +- ld/testsuite/ld-x86-64/mark-plt-1d.d | 2 +- ld/testsuite/ld-x86-64/plt.pd | 2 +- ld/testsuite/ld-x86-64/plt2.dd | 2 +- ld/testsuite/ld-x86-64/pr19636-2d.d | 2 +- ld/testsuite/ld-x86-64/pr19636-2l.d | 2 +- ld/testsuite/ld-x86-64/pr20830a-now.d | 4 ++-- ld/testsuite/ld-x86-64/pr20830a.d | 4 ++-- ld/testsuite/ld-x86-64/pr20830b-now.d | 4 ++-- ld/testsuite/ld-x86-64/pr20830b.d | 4 ++-- ld/testsuite/ld-x86-64/tlsdesc.pd | 2 +- 26 files changed, 56 insertions(+), 55 deletions(-) diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index ccefcf1b8b0..48c935f2fb0 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -584,13 +584,13 @@ elf_x86_64_write_core_note (bfd *abfd, char *buf, int *bufsiz, /* The first entry in a lazy procedure linkage table looks like this. See the SVR4 ABI i386 supplement and the x86-64 ABI to see how this - works. */ + works. Use UD0 instead of NOP after indirect jump. */ static const bfd_byte elf_x86_64_lazy_plt0_entry[LAZY_PLT_ENTRY_SIZE] = { 0xff, 0x35, 8, 0, 0, 0, /* pushq GOT+8(%rip) */ 0xff, 0x25, 16, 0, 0, 0, /* jmpq *GOT+16(%rip) */ - 0x0f, 0x1f, 0x40, 0x00 /* nopl 0(%rax) */ + 0x0f, 0xff, 0x40, 0x00 /* ud0 0x0(%rax),%eax */ }; /* Subsequent entries in a lazy procedure linkage table look like this. */ @@ -651,13 +651,14 @@ static const bfd_byte elf_x86_64_lazy_ibt_plt_entry[LAZY_PLT_ENTRY_SIZE] = 0x66, 0x90 /* xchg %ax,%ax */ }; -/* Entries in the non-lazy procedure linkage table look like this. */ +/* Entries in the non-lazy procedure linkage table look like this. + Use UD2 instead of NOP after indirect jump. */ static const bfd_byte elf_x86_64_non_lazy_plt_entry[NON_LAZY_PLT_ENTRY_SIZE] = { 0xff, 0x25, /* jmpq *name@GOTPC(%rip) */ 0, 0, 0, 0, /* replaced with offset to this symbol in .got. */ - 0x66, 0x90 /* xchg %ax,%ax */ + 0x0f, 0x0b /* ud2 */ }; /* Entries for branches with BND prefix in the non-lazy procedure @@ -684,14 +685,14 @@ static const bfd_byte elf_x86_64_non_lazy_bnd_ibt_plt_entry[LAZY_PLT_ENTRY_SIZE] /* Entries for branches with IBT-enabled in the non-lazy procedure linkage table look like this. They have the same size as the lazy - PLT entry. */ + PLT entry. Use UD0 instead of NOP after indirect jump. */ static const bfd_byte elf_x86_64_non_lazy_ibt_plt_entry[LAZY_PLT_ENTRY_SIZE] = { 0xf3, 0x0f, 0x1e, 0xfa, /* endbr64 */ 0xff, 0x25, /* jmpq *name@GOTPC(%rip) */ 0, 0, 0, 0, /* replaced with offset to this symbol in .got. */ - 0x66, 0x0f, 0x1f, 0x44, 0x00, 0x00 /* nopw 0x0(%rax,%rax,1) */ + 0x67, 0x0f, 0xff, 0x44, 0x00, 0x00 /* ud0 0x0(%eax,%eax,1),%eax */ }; /* The TLSDESC entry in a lazy procedure linkage table. */ diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d index 6d98d66ebd4..84b0f7d9213 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d @@ -12,7 +12,7 @@ Disassembly of section .plt: 0+170 <\*ABS\*\+0x190@plt-0x10>: +[a-f0-9]+: ff 35 42 01 20 00 push 0x200142\(%rip\) # 2002b8 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 44 01 20 00 jmp \*0x200144\(%rip\) # 2002c0 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax 0+180 <\*ABS\*\+0x190@plt>: +[a-f0-9]+: ff 25 42 01 20 00 jmp \*0x200142\(%rip\) # 2002c8 <_GLOBAL_OFFSET_TABLE_\+0x18> diff --git a/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d b/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d index 8b248d393b0..c26dac7c7bb 100644 --- a/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d +++ b/ld/testsuite/ld-ifunc/ifunc-2-x86-64-now.d @@ -12,7 +12,7 @@ Disassembly of section .plt: 0+170 <\*ABS\*\+0x190@plt-0x10>: +[a-f0-9]+: ff 35 42 01 20 00 push 0x200142\(%rip\) # 2002b8 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 44 01 20 00 jmp \*0x200144\(%rip\) # 2002c0 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax 0+180 <\*ABS\*\+0x190@plt>: +[a-f0-9]+: ff 25 42 01 20 00 jmp \*0x200142\(%rip\) # 2002c8 <_GLOBAL_OFFSET_TABLE_\+0x18> diff --git a/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d b/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d index 4d2ae8413f2..3396687d408 100644 --- a/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d +++ b/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d @@ -12,7 +12,7 @@ Disassembly of section .plt: 0+240 <\*ABS\*\+0x29a@plt-0x10>: +[a-f0-9]+: ff 35 7a 01 20 00 push 0x20017a\(%rip\) # 2003c0 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 7c 01 20 00 jmp \*0x20017c\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax 0+250 <\*ABS\*\+0x29a@plt>: +[a-f0-9]+: ff 25 7a 01 20 00 jmp \*0x20017a\(%rip\) # 2003d0 <_GLOBAL_OFFSET_TABLE_\+0x18> diff --git a/ld/testsuite/ld-ifunc/pr17154-x86-64.d b/ld/testsuite/ld-ifunc/pr17154-x86-64.d index fbe6e225d5c..f0338546691 100644 --- a/ld/testsuite/ld-ifunc/pr17154-x86-64.d +++ b/ld/testsuite/ld-ifunc/pr17154-x86-64.d @@ -8,7 +8,7 @@ 0+240 <.*>: +[a-f0-9]+: ff 35 5a 01 20 00 push 0x20015a\(%rip\) # 2003a0 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 5c 01 20 00 jmp \*0x20015c\(%rip\) # 2003a8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax 0+250 <\*ABS\*\+0x29a@plt>: +[a-f0-9]+: ff 25 5a 01 20 00 jmp \*0x20015a\(%rip\) # 2003b0 <_GLOBAL_OFFSET_TABLE_\+0x18> diff --git a/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d index 369a18be453..3a4f2c12b85 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d @@ -11,7 +11,7 @@ Disassembly of section .plt: [a-f0-9]+ <.plt>: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-1.d b/ld/testsuite/ld-x86-64/ibt-plt-1.d index 283dbf39036..c9675098d1d 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-1.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-1.d @@ -11,7 +11,7 @@ Disassembly of section .plt: [a-f0-9]+ <.plt>: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ <.*> @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d index 31201c6498f..08b4bbaab62 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d @@ -11,7 +11,7 @@ Disassembly of section .plt: 0+140 <.plt>: +[a-f0-9]+: ff 35 4a 01 20 00 push 0x20014a\(%rip\) # 200290 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 4c 01 20 00 jmp \*0x20014c\(%rip\) # 200298 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp 140 @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: 0+170 : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 26 01 20 00 jmp \*0x200126\(%rip\) # 2002a0 - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax 0+180 : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 1e 01 20 00 jmp \*0x20011e\(%rip\) # 2002a8 - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2a.d b/ld/testsuite/ld-x86-64/ibt-plt-2a.d index 7f66eedbcfd..2fb28d48ca2 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2a.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2a.d @@ -11,7 +11,7 @@ Disassembly of section .plt: 0+1f0 <.plt>: +[a-f0-9]+: ff 35 ca 01 20 00 push 0x2001ca\(%rip\) # 2003c0 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 cc 01 20 00 jmp \*0x2001cc\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp 1f0 <.*> @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: 0+220 : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 a6 01 20 00 jmp \*0x2001a6\(%rip\) # 2003d0 - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax 0+230 : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 9e 01 20 00 jmp \*0x20019e\(%rip\) # 2003d8 - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d index 32d0b0efd02..eb9a00c88b1 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d @@ -11,7 +11,7 @@ Disassembly of section .plt: [a-f0-9]+ <.plt>: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2c.d b/ld/testsuite/ld-x86-64/ibt-plt-2c.d index 74184aed366..6289dd427c2 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2c.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2c.d @@ -11,7 +11,7 @@ Disassembly of section .plt: [a-f0-9]+ <.plt>: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ <.*> @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d index 0ba3d07adad..0eac387064d 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d @@ -11,7 +11,7 @@ Disassembly of section .plt: 0+140 <.plt>: +[a-f0-9]+: ff 35 4a 01 20 00 push 0x20014a\(%rip\) # 200290 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 4c 01 20 00 jmp \*0x20014c\(%rip\) # 200298 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp 140 @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: 0+170 : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 26 01 20 00 jmp \*0x200126\(%rip\) # 2002a0 - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax 0+180 : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 1e 01 20 00 jmp \*0x20011e\(%rip\) # 2002a8 - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3a.d b/ld/testsuite/ld-x86-64/ibt-plt-3a.d index 306592ac9cc..61d0412e9d9 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3a.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3a.d @@ -11,7 +11,7 @@ Disassembly of section .plt: 0+1f0 <.plt>: +[a-f0-9]+: ff 35 ca 01 20 00 push 0x2001ca\(%rip\) # 2003c0 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 cc 01 20 00 jmp \*0x2001cc\(%rip\) # 2003c8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp 1f0 <.*> @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: 0+220 : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 a6 01 20 00 jmp \*0x2001a6\(%rip\) # 2003d0 - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax 0+230 : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 9e 01 20 00 jmp \*0x20019e\(%rip\) # 2003d8 - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d index d104d3d33ed..841e7656bc4 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d @@ -11,7 +11,7 @@ Disassembly of section .plt: [a-f0-9]+ <.plt>: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3c.d b/ld/testsuite/ld-x86-64/ibt-plt-3c.d index 8be6783efcb..dbe149ea1b3 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3c.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3c.d @@ -11,7 +11,7 @@ Disassembly of section .plt: [a-f0-9]+ <.plt>: +[a-f0-9]+: ff 35 ([0-9a-f]{2} ){4}[ ]+push 0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 e2 ff ff ff jmp [a-f0-9]+ <.*> @@ -26,12 +26,12 @@ Disassembly of section .plt.sec: [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax [a-f0-9]+ : +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: ff 25 ([0-9a-f]{2} ){4}[ ]+jmp \*0x[a-f0-9]+\(%rip\) # [a-f0-9]+ - +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +[a-f0-9]+: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d b/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d index 82642056bfc..6494c259463 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d @@ -7,7 +7,7 @@ 0+1020 : +1020: f3 0f 1e fa endbr64 +1024: ff 25 86 10 00 00 jmp \*0x1086\(%rip\) # 20b0 - +102a: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +102a: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/mark-plt-1d.d b/ld/testsuite/ld-x86-64/mark-plt-1d.d index a4155b2e067..5c1a1485f14 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1d.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1d.d @@ -7,7 +7,7 @@ 0+1020 : +1020: f3 0f 1e fa endbr64 +1024: ff 25 1e 11 00 00 jmp \*0x111e\(%rip\) # 2148 - +102a: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) + +102a: 67 0f ff 44 00 00 ud0 0x0\(%eax,%eax,1\),%eax Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/plt.pd b/ld/testsuite/ld-x86-64/plt.pd index 6b4024c5c93..6e2f07e37c8 100644 --- a/ld/testsuite/ld-x86-64/plt.pd +++ b/ld/testsuite/ld-x86-64/plt.pd @@ -11,7 +11,7 @@ Disassembly of section .plt: [0-9a-f]+ : +[0-9a-f]+: ff 35 ([0-9a-f]{2} ){4} * push 0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x8> +[0-9a-f]+: ff 25 ([0-9a-f]{2} ){4} * jmp \*0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x10> - +[0-9a-f]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax [0-9a-f]+ : +[0-9a-f]+: ff 25 ([0-9a-f]{2} ){4} * jmp \*0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ diff --git a/ld/testsuite/ld-x86-64/plt2.dd b/ld/testsuite/ld-x86-64/plt2.dd index 454bc060dd4..93573ce9aa7 100644 --- a/ld/testsuite/ld-x86-64/plt2.dd +++ b/ld/testsuite/ld-x86-64/plt2.dd @@ -12,7 +12,7 @@ Disassembly of section .plt: 0+400220 : +[a-f0-9]+: ff 35 7a 01 20 00 push 0x20017a\(%rip\) # 6003a0 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 7c 01 20 00 jmp \*0x20017c\(%rip\) # 6003a8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax 0+400230 : +[a-f0-9]+: ff 25 7a 01 20 00 jmp \*0x20017a\(%rip\) # 6003b0 diff --git a/ld/testsuite/ld-x86-64/pr19636-2d.d b/ld/testsuite/ld-x86-64/pr19636-2d.d index 75c87871684..2ed9dc680cf 100644 --- a/ld/testsuite/ld-x86-64/pr19636-2d.d +++ b/ld/testsuite/ld-x86-64/pr19636-2d.d @@ -11,7 +11,7 @@ Disassembly of section .plt: 0+120 <.plt>: [ ]*[a-f0-9]+: ff 35 2a 01 20 00 push 0x20012a\(%rip\) # 200250 <_GLOBAL_OFFSET_TABLE_\+0x8> [ ]*[a-f0-9]+: ff 25 2c 01 20 00 jmp \*0x20012c\(%rip\) # 200258 <_GLOBAL_OFFSET_TABLE_\+0x10> -[ ]*[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[ ]*[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax [ ]*[a-f0-9]+: ff 25 2a 01 20 00 jmp \*0x20012a\(%rip\) # 200260 <_GLOBAL_OFFSET_TABLE_\+0x18> [ ]*[a-f0-9]+: 68 00 00 00 00 push \$0x0+ [ ]*[a-f0-9]+: e9 00 00 00 00 jmp [a-f0-9]+ <.*> diff --git a/ld/testsuite/ld-x86-64/pr19636-2l.d b/ld/testsuite/ld-x86-64/pr19636-2l.d index 3cb00d7aac1..c18621f6a6b 100644 --- a/ld/testsuite/ld-x86-64/pr19636-2l.d +++ b/ld/testsuite/ld-x86-64/pr19636-2l.d @@ -12,7 +12,7 @@ Disassembly of section .plt: 0+120 <.plt>: +[a-f0-9]+: ff 35 2a 01 20 00 push 0x20012a\(%rip\) # 200250 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 2c 01 20 00 jmp \*0x20012c\(%rip\) # 200258 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax +[a-f0-9]+: ff 25 2a 01 20 00 jmp \*0x20012a\(%rip\) # 200260 <_GLOBAL_OFFSET_TABLE_\+0x18> +[a-f0-9]+: 68 00 00 00 00 push \$0x0 +[a-f0-9]+: e9 00 00 00 00 jmp 140 <_start> diff --git a/ld/testsuite/ld-x86-64/pr20830a-now.d b/ld/testsuite/ld-x86-64/pr20830a-now.d index 28f595f1c83..a09dce57437 100644 --- a/ld/testsuite/ld-x86-64/pr20830a-now.d +++ b/ld/testsuite/ld-x86-64/pr20830a-now.d @@ -52,13 +52,13 @@ Disassembly of section .plt: 0+1b0 <.plt>: +[a-f0-9]+: ff 35 32 fe 3f 00 push 0x3ffe32\(%rip\) # 3fffe8 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 34 fe 3f 00 jmp \*0x3ffe34\(%rip\) # 3ffff0 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax Disassembly of section .plt.got: 0+1c0 : +[a-f0-9]+: ff 25 32 fe 3f 00 jmp \*0x3ffe32\(%rip\) # 3ffff8 - +[a-f0-9]+: 66 90 xchg %ax,%ax + +[a-f0-9]+: 0f 0b ud2 Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/pr20830a.d b/ld/testsuite/ld-x86-64/pr20830a.d index 1d92b10ba71..8610e07edf4 100644 --- a/ld/testsuite/ld-x86-64/pr20830a.d +++ b/ld/testsuite/ld-x86-64/pr20830a.d @@ -52,13 +52,13 @@ Disassembly of section .plt: 0+1b0 <.plt>: +[a-f0-9]+: ff 35 3a fe 3f 00 push 0x3ffe3a\(%rip\) # 3ffff0 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 3c fe 3f 00 jmp \*0x3ffe3c\(%rip\) # 3ffff8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax Disassembly of section .plt.got: 0+1c0 : +[a-f0-9]+: ff 25 1a fe 3f 00 jmp \*0x3ffe1a\(%rip\) # 3fffe0 - +[a-f0-9]+: 66 90 xchg %ax,%ax + +[a-f0-9]+: 0f 0b ud2 Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/pr20830b-now.d b/ld/testsuite/ld-x86-64/pr20830b-now.d index 2cad0234853..163cbc9b15e 100644 --- a/ld/testsuite/ld-x86-64/pr20830b-now.d +++ b/ld/testsuite/ld-x86-64/pr20830b-now.d @@ -44,13 +44,13 @@ Disassembly of section .plt: 0+120 <.plt>: +[a-f0-9]+: ff 35 c2 fe 3f 00 push 0x3ffec2\(%rip\) # 3fffe8 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 c4 fe 3f 00 jmp \*0x3ffec4\(%rip\) # 3ffff0 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax Disassembly of section .plt.got: 0+130 : +[a-f0-9]+: ff 25 c2 fe 3f 00 jmp \*0x3ffec2\(%rip\) # 3ffff8 - +[a-f0-9]+: 66 90 xchg %ax,%ax + +[a-f0-9]+: 0f 0b ud2 Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/pr20830b.d b/ld/testsuite/ld-x86-64/pr20830b.d index 303a0242573..238c0835256 100644 --- a/ld/testsuite/ld-x86-64/pr20830b.d +++ b/ld/testsuite/ld-x86-64/pr20830b.d @@ -44,13 +44,13 @@ Disassembly of section .plt: 0+120 <.plt>: +[a-f0-9]+: ff 35 ca fe 3f 00 push 0x3ffeca\(%rip\) # 3ffff0 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: ff 25 cc fe 3f 00 jmp \*0x3ffecc\(%rip\) # 3ffff8 <_GLOBAL_OFFSET_TABLE_\+0x10> - +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) + +[a-f0-9]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax Disassembly of section .plt.got: 0+130 : +[a-f0-9]+: ff 25 aa fe 3f 00 jmp \*0x3ffeaa\(%rip\) # 3fffe0 - +[a-f0-9]+: 66 90 xchg %ax,%ax + +[a-f0-9]+: 0f 0b ud2 Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/tlsdesc.pd b/ld/testsuite/ld-x86-64/tlsdesc.pd index 7e124ea32e5..596b1bb3f07 100644 --- a/ld/testsuite/ld-x86-64/tlsdesc.pd +++ b/ld/testsuite/ld-x86-64/tlsdesc.pd @@ -12,7 +12,7 @@ Disassembly of section .plt: [0-9a-f]+ <.plt>: [0-9a-f]+: ff 35 .. .. 20 00 push .*\(%rip\) # 201328 <_GLOBAL_OFFSET_TABLE_\+0x8> [0-9a-f]+: ff 25 .. .. 20 00 jmp \*.*\(%rip\) # 201330 <_GLOBAL_OFFSET_TABLE_\+0x10> - [0-9a-f]+: 0f 1f 40 00 nopl 0x0\(%rax\) + [0-9a-f]+: 0f ff 40 00 ud0 0x0\(%rax\),%eax [0-9a-f]+: f3 0f 1e fa endbr64 [0-9a-f]+: ff 35 .. .. 20 00 push .*\(%rip\) # 201328 <_GLOBAL_OFFSET_TABLE_\+0x8> [0-9a-f]+: ff 25 .. .. 20 00 jmp \*.*\(%rip\) # 201318 <.*> -- 2.55.0