https://sourceware.org/bugzilla/show_bug.cgi?id=18297
Bug ID: 18297 Summary: ld does not report truncated relocation for R_MIPS_26 for calls from .init Product: binutils Version: 2.26 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: milko.leporis at imgtec dot com Created attachment 8260 --> https://sourceware.org/bugzilla/attachment.cgi?id=8260&action=edit asm file for main function This is simplified test to reproduce the issue, when jal is used to jump to function in different 256MB region. Steps to reproduce: - create obj files from attached .S files mipsel-linux-gnu-gcc call-from-init.S -c -o call-from-init.o mipsel-linux-gnu-gcc crtend.S -c -o crtend.o - link object files mipsel-linux-gnu-ld call-from-init.o crtend.o -o call-from-init --section-start=.init=0x0FF00000 --section-start=.text=0x10000000 - part of objdump output for call-from-init: Disassembly of section .init: 0ff00000 <.init>: ff00000: 04110001 bal ff00008 <main-0xffff8> ff00004: 00000000 nop ff00008: 0c00000c jal 30 <main-0xfffffd0> ff0000c: 00000000 nop Disassembly of section .text: 10000000 <main>: 10000000: 27bdfff8 addiu sp,sp,-8 10000004: afbe0004 sw s8,4(sp) ... 10000030 <__do_global_ctors_aux>: 10000030: 3c021001 lui v0,0x1001 10000034: 8c590090 lw t9,144(v0) 10000038: 2402ffff li v0,-1 ... - jal instruction in .init will cause SEGMENTATION FAULT in runtime -- 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