Add -mshared option to x86 ELF assembler
Quoted 31 lines · H.J. Lu
Quoted 20 lines · Markus Trippelsdorf
Quoted 19 lines · H.J. Lu
This patch adds -mshared option to x86 ELF assembler. By default, assembler will optimize out non-PLT relocations against defined non-weak global branch targets with default visibility. The -mshared option tells the assembler to generate code which may go into a shared library where all non-weak global branch targets with default visibility can be preempted. The resulting code is slightly bigger. This option only affects the handling of branch instructions.
This Linux kernel patch is needed to create a working x86 Linux kernel if it hasn't been applied:
arch/x86/kernel/head_64.S +0
-0@@ -339,8 +339,8 @@ early_idt_handlers: i = i + 1 .endrQuoted 8 lines
arch/x86/kernel/head_64.S early_idt_handlers: · line 344
Quoted 5 lines
arch/x86/kernel/head_64.S +2
-2-/* 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) cldHave you posted the patch to LKML already?
(I hit this issue today and it took me a while to figure out the cause.)
Quoted 2 lines
A kernel patch will be checked in soon.
It already is:
It's currently queued for 4.2.
Ingo, would it make sense to promote this to 4.1? It's definitely a violation of the "no development after the merge window" rule, but it's sort of a build fix. Alternatively, we could ask Greg et al to backport it.
--Andy
Quoted 37 lines · Andy Lutomirski
Quoted 31 lines · H.J. Lu
Quoted 20 lines · Markus Trippelsdorf
Quoted 19 lines · H.J. Lu
This patch adds -mshared option to x86 ELF assembler. By default, assembler will optimize out non-PLT relocations against defined non-weak global branch targets with default visibility. The -mshared option tells the assembler to generate code which may go into a shared library where all non-weak global branch targets with default visibility can be preempted. The resulting code is slightly bigger. This option only affects the handling of branch instructions.
This Linux kernel patch is needed to create a working x86 Linux kernel if it hasn't been applied:
arch/x86/kernel/head_64.S +0
-0@@ -339,8 +339,8 @@ early_idt_handlers: i = i + 1 .endrQuoted 8 lines
arch/x86/kernel/head_64.S early_idt_handlers: · line 344
Quoted 5 lines
arch/x86/kernel/head_64.S +2
-2-/* 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) cldHave you posted the patch to LKML already?
(I hit this issue today and it took me a while to figure out the cause.)Quoted 2 lines
A kernel patch will be checked in soon.
It already is:
Quoted 7 lines
It's currently queued for 4.2.
Ingo, would it make sense to promote this to 4.1? It's definitely a violation of the "no development after the merge window" rule, but it's sort of a build fix. [...]
Yeah, agreed - the commit was problem-free in testing, so I've cherry-picked it over into tip:x86/urgent and will push it to Linus for v4.1.
Thanks,
Ingo