[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/30930] Broken BTI veneers: ld-2.41 links mame in a way which get
From: |
nsz at gcc dot gnu.org |
Subject: |
[Bug ld/30930] Broken BTI veneers: ld-2.41 links mame in a way which gets stuck on aarch64 |
Date: |
Fri, 03 Nov 2023 13:23:54 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30930
--- Comment #27 from Szabolcs Nagy <nsz at gcc dot gnu.org> ---
for the record a minimal reproducer when a bti veneer branches to itself:
$ cat a.s
.global _start
.type _start, %function
_start:
b foo
.zero 0x07000000
$ cat b.s
.zero 0x01000000
.global foo
.type foo, %function
foo:
nop
$ as -o a.o a.s
$ as -o b.o b.s
$ ld -z force-bti a.o b.o 2>/dev/null
$ objdump -d a.out
a.out: file format elf64-littleaarch64
Disassembly of section .text:
0000000000400108 <_start>:
400108: 15c00004 b 7400118 <__foo_bti_veneer>
...
740010c: d503201f .word 0xd503201f
7400110: 14000008 b 7400130 <__foo_bti_veneer+0x18>
7400114: d503201f nop
0000000007400118 <__foo_bti_veneer>:
7400118: 90000010 adrp x16, 7400000 <_start+0x6fffef8>
740011c: 91046210 add x16, x16, #0x118
7400120: d61f0200 br x16
...
0000000008400130 <foo>:
8400130: d503201f nop
i posted a patchset (version 1) to fix this:
https://sourceware.org/pipermail/binutils/2023-November/130299.html
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/30930] Broken BTI veneers: ld-2.41 links mame in a way which gets stuck on aarch64,
nsz at gcc dot gnu.org <=