bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/23527] regression (ld-2.30 worked): relocation R_X86_64_PC32 aga


From: hjl.tools at gmail dot com
Subject: [Bug ld/23527] regression (ld-2.30 worked): relocation R_X86_64_PC32 against protected symbol `a' can not be used when making a shared object
Date: Wed, 15 Aug 2018 12:03:13 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=23527

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Sergei Trofimovich from comment #2)
> Bisected the change to:
> 
> bd7ab16b4537788ad53521c45469a1bdae84ad4a is the first bad commit
> commit bd7ab16b4537788ad53521c45469a1bdae84ad4a
> Author: H.J. Lu <address@hidden>
> Date:   Tue Feb 13 07:34:22 2018 -0800
> 
>     x86-64: Generate branch with PLT32 relocation
>     
>     Since there is no need to prepare for PLT branch on x86-64, generate
>     R_X86_64_PLT32, instead of R_X86_64_PC32, if possible, which can be
>     used as a marker for 32-bit PC-relative branches.

This commit includes:

           PR gas/22791
            * elf64-x86-64.c (is_32bit_relative_branch): Removed.
            (elf_x86_64_relocate_section): Check PIC relocations in PIE.
            Remove is_32bit_relative_branch usage.  Disallow PC32 reloc
            against protected function in shared object.

is_32bit_relative_branch is a kludge which is removed.  R_X86_64_PLT32
should be used here as a marker for external branches. clang should be
changed to generate R_X86_64_PLT32 for branches to external symbols. Or
you can use GNU assembler to work around this issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]