[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/18561] New: sh assembler wrongly constant-folds address express
From: |
bugdal at aerifal dot cx |
Subject: |
[Bug gas/18561] New: sh assembler wrongly constant-folds address expressions containing weak symbols |
Date: |
Fri, 19 Jun 2015 17:35:15 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=18561
Bug ID: 18561
Summary: sh assembler wrongly constant-folds address
expressions containing weak symbols
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: bugdal at aerifal dot cx
Target Milestone: ---
Minimal test case:
.global a
.global b
.weak a
.align 2
a: .long 0
b: .long a-.
The output should contain a R_SH_REL32 relocation, but instead it contains a
constant. This bug affects gcc, which produces such expressions for intra-DSO
PIC function calls; if the callee has a local weak definition; strong
definitions will fail to override at link time.
This could be fixed on the GCC side by having gcc explicitly produce @PCREL
references rather than using arithmetic with ., but either way I think this is
a serious gas bug that needs to be fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/18561] New: sh assembler wrongly constant-folds address expressions containing weak symbols,
bugdal at aerifal dot cx <=