[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/30944] New: LoongArch linker relaxation support in GAS breaks .
From: |
icenowy at aosc dot io |
Subject: |
[Bug gas/30944] New: LoongArch linker relaxation support in GAS breaks .balign |
Date: |
Thu, 05 Oct 2023 13:45:07 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=30944
Bug ID: 30944
Summary: LoongArch linker relaxation support in GAS breaks
.balign
Product: binutils
Version: 2.41
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: icenowy at aosc dot io
Target Milestone: ---
The following assembly code:
```
.text
.balign 256
func1:
la.global $a0,exit
nop
nop
nop
.balign 256
func2:
la.global $a0,exit
nop
nop
nop
```
Surely we expect func1 @ 0x0 and func2 @ 0x100, however when assembled with no
extra options with GAS 2.41, func1 is @ 0xfc and func2 0x20c.
Add `-mno-relax` option to GAS could workaround this.
This leads to miscompilation of
https://github.com/NVIDIA/libglvnd/blob/master/src/GLdispatch/vnd-glapi/entry_loongarch64_tsd.c
(which emits thousands of function thunks .baligned to 256B, and referenced by
the index at runtime), and leads to broken GL and thus broken desktop.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/30944] New: LoongArch linker relaxation support in GAS breaks .balign,
icenowy at aosc dot io <=