Date: Sat, 24 Jan 2015 10:20:13 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 196918] [PATCH] Add R_X86_64_PC64 to sys/sys/elf_common.h Message-ID: <bug-196918-8-y0ee9v86oo@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-196918-8@https.bugs.freebsd.org/bugzilla/> References: <bug-196918-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196918 --- Comment #10 from Konstantin Belousov <kib@FreeBSD.org> --- (In reply to yuri from comment #9) The '-P' part in the description of the relocation in the ABI spec provides a hint that the relocation is for pc-relative addressing, and to be applied to the (part of) the instruction. The presence of the pc-relative relocations in the object files is expected. This is how assembler represents references which cannot be resolved at the assembler time, but should be finished by linker. On the other hand, such relocations must not appear in the final linking objects, both executables and shared libraries, but for different reasons. For executables, the symbol must be resolved. For shared libs, undefined external symbols must be referenced through the GOT/PLT, and not by a relocation of the text segment. Allowing the relocations in the final object would require patching of the read-only text segment, i.e. DT_TEXTREL and all ill consequences of it. >From your reply, it is not clear what you mean by 'no bug in linker'. Is it mean that linker does not emit such relocations for the final link result, or that it does emit, but you deny that this is a bug ? -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196918-8-y0ee9v86oo>