[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/32022] New: Assembler shouldn't accept invalid TLS instructions
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gas/32022] New: Assembler shouldn't accept invalid TLS instructions |
Date: |
Thu, 25 Jul 2024 19:57:23 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=32022
Bug ID: 32022
Summary: Assembler shouldn't accept invalid TLS instructions
Product: binutils
Version: 2.44 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: lili.cui at intel dot com
Target Milestone: ---
Target: x86
TLS relocations can only be used with specific instructions as specified in TLS
psABI and linker issues an error when TLS relocations are used with wrong
instructions.
Otherwise, compiler bugs may go undetected as shown in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116043
Assembler shouldn't allow TLS relocations on wrong instructions:
[hjl@gnu-tgl-3 tmp]$ cat y.s
.text
xorq foo@GOTTPOFF(%rip), %rax
movq (%rax), %rax
.globl foo
.section .tdata,"awT",@progbits
.align 4
.type foo, @object
.size foo, 4
foo:
.long 100
[hjl@gnu-tgl-3 tmp]$ gcc -c y.s
[hjl@gnu-tgl-3 tmp]$ ld y.o
ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000
ld: y.o: TLS transition from R_X86_64_GOTTPOFF to R_X86_64_TPOFF32 against
`foo' at 0x3 in section `.text' failed
ld: final link failed: bad value
[hjl@gnu-tgl-3 tmp]$
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/32022] New: Assembler shouldn't accept invalid TLS instructions,
hjl.tools at gmail dot com <=
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, hjl.tools at gmail dot com, 2024/07/25
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, hjl.tools at gmail dot com, 2024/07/25
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, sam at gentoo dot org, 2024/07/25
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, hjl.tools at gmail dot com, 2024/07/25
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, lili.cui at intel dot com, 2024/07/26
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, hjl.tools at gmail dot com, 2024/07/26
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, hjl.tools at gmail dot com, 2024/07/26
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, jbeulich at suse dot com, 2024/07/29
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, sam at gentoo dot org, 2024/07/29
- [Bug gas/32022] Assembler shouldn't accept invalid TLS instructions, jbeulich at suse dot com, 2024/07/29