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-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils