https://sourceware.org/bugzilla/show_bug.cgi?id=25551
Bug ID: 25551 Summary: R_X86_64_PLT32 referencing .L should not emit an outstanding relocation Product: binutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Context: https://github.com/ClangBuiltLinux/linux/issues/872 .section .init.text,"ax",@progbits call .Lprintk$local # -- End function .text .globl printk # -- Begin function printk .type printk,@function printk: # @printk .Lprintk$local: ret % as a.s -o a.o % readelf -Wrs a.o Relocation section '.rela.init.text' at offset 0x108 contains 1 entry: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000001 0000000500000004 R_X86_64_PLT32 0000000000000000 .Lprintk$local - 4 ... 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 .Lprintk$local Delete `.section .init.text,"ax",@progbits`, and there will be no relocation. R_X86_64_PC32 does not emit the relocation. call .Lprintk$local emits an R_X86_64_PC32 before: commit bd7ab16b4537788ad53521c45469a1bdae84ad4a Author: H.J. Lu <hjl.to...@gmail.com> Date: Tue Feb 13 07:34:22 2018 -0800 x86-64: Generate branch with PLT32 relocation https://sourceware.org/ml/binutils/2020-02/msg00243.html should fix the bug. -- You are receiving this mail because: You are on the CC list for the bug.