Release 2.26 - Next week ?
H.J. Lu
hjl.tools@gmail.com
Thu Jan 14 01:25:00 GMT 2016
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.
More information about the Binutils
mailing list