This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Release 2.26 - Next week ?
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: Tristan Gingold <gingold at adacore dot com>, Matthias Klose <doko at ubuntu dot com>, binutils <binutils at sourceware dot org>
- Date: Wed, 13 Jan 2016 17:25:16 -0800
- Subject: Re: Release 2.26 - Next week ?
- Authentication-results: sourceware.org; auth=none
- References: <568FF162 dot 5000801 at ubuntu dot com> <828FEF00-284A-48C3-9395-2295167002EA at adacore dot com> <20160113010412 dot GB1270 at bubble dot grove dot modra dot org> <CAMe9rOpPPFuAwR-vif32KvDnjHRy5p4ushrvhrVso43681E+3Q at mail dot gmail dot com> <20160113015844 dot GC1270 at bubble dot grove dot modra dot org> <CAMe9rOqyLdTz5FiiMVTukDnQwby+Kx_wzmHtWtNu6n3ZOXfEDA at mail dot gmail dot com> <20160113034534 dot GD1270 at bubble dot grove dot modra dot org> <CAMe9rOrOaGWKS7me-v8AqUPKpKg=JxHcFdePBFPVtOEkKXGiuw at mail dot gmail dot com> <20160113061824 dot GE1270 at bubble dot grove dot modra dot org> <CAMe9rOqtizKXd87rRDDSGQiQ55pFjXRSf_2c1jwg6w45xx9x2g at mail dot gmail dot com> <20160113232249 dot GF1270 at bubble dot grove dot modra dot org>
On Wed, Jan 13, 2016 at 3:22 PM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Jan 13, 2016 at 05:26:09AM -0800, H.J. Lu wrote:
>> On Tue, Jan 12, 2016 at 10:18 PM, Alan Modra <amodra@gmail.com> wrote:
>> My x86-64 kernel has
>>
>> # CONFIG_MODVERSIONS is not set
>> CONFIG_RELOCATABLE=y
>>
>> Will I see the problem if I turn on CONFIG_MODVERSIONS and turn
>> off CONFIG_RELOCATABLE?
>
> No. The Linux kernel problem is specific to ppc64 ELFv2, and the
> .TOC. symbol.
>
>> > The important question is: Was PR4317 just cosmetic?
>> >
>>
>> I don't remember what triggered me to open the bug.
>
> So, Tristan, should I revert my PR4317 patch for 2.26?
>
> The argument for this action is that we have a presumed cosmetic fix
> that causes a known regression. The regression failure has been
> analyzed sufficiently to know the exact cause. There is also some
> small chance that other projects that post-process a final-linked
> executable might similarly fail when undefined symbols are removed.
>
> Against that is the fact that the PR4317 patch has been applied for
> quite a while, and the kernel or anything else that depends on
> undefined symbols in an executable is quite fragile if not downright
> buggy.
>
Assuming Linux kernel is wrong, I would take a different approach.
FWIW, it has happened a couple times with x86 kernel where
binutils change broke kernel. My solution is to fix the kernel
and provide a kernel patch in binutils release note. The last
time was
---
Starting from the 2.25.51.0.2 release, the x86 assembler will optimize
out relocations against defined non-weak global branch targets with
default visibility by default. This Linux kernel patch is needed to
create a working x86 Linux kernel if it hasn't been updated to support
the newer assembler:
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index ae6588b..b91a00c 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -339,8 +339,8 @@ early_idt_handlers:
i = i + 1
.endr
-/* This is global to keep gas from relaxing the jumps */
-ENTRY(early_idt_handler)
+/* This is weak to keep gas from relaxing the jumps */
+WEAK(early_idt_handler)
cld
cmpl $2,(%rsp) # X86_TRAP_NMI
---
--
H.J.