Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Enable lld for ppc64 #106

Merged
merged 1 commit into from
Jul 8, 2019
Merged

Conversation

martell
Copy link
Contributor

@martell martell commented Dec 23, 2018

No description provided.

@shenki
Copy link
Member

shenki commented Dec 29, 2018

@nathanchance nathanchance added the WIP Work in progress label Jan 13, 2019
@tpimh
Copy link
Contributor

tpimh commented Jun 24, 2019

Now both issues are closed, let's try building again as soon as llvm binaries are updated!

@nickdesaulniers
Copy link
Member

@martell do you mind rebasing your PR? In fact, if LLD works then I recommend replacing the ld.bfd builds with ld.lld outright.

@martell
Copy link
Contributor Author

martell commented Jul 7, 2019

@nickdesaulniers @tpimh @shenki
It seemingly works and boots the kernel and runs through which is great. 🎉

There are a couple of linker warnings to note

WARNING: vmlinux.o(.text+0x3328): Section mismatch in reference from the variable start_here_multiplatform to the function .init.text:early_setup()
The function start_here_multiplatform() references
the function __init early_setup().
This is often because start_here_multiplatform lacks a __init 
annotation or the annotation of early_setup is wrong.
WARNING: vmlinux.o(.text+0x3364): Section mismatch in reference from the variable start_here_common to the function .init.text:start_kernel()
The function start_here_common() references
the function __init start_kernel().
This is often because start_here_common lacks a __init 
annotation or the annotation of start_kernel is wrong.
WARNING: vmlinux.o(.text+0x7af38): Section mismatch in reference from the function remove_pmd_table() to the function .meminit.text:split_kernel_mapping()
The function remove_pmd_table() references
the function __meminit split_kernel_mapping().
This is often because remove_pmd_table lacks a __meminit 
annotation or the annotation of split_kernel_mapping is wrong.
  MODINFO modules.builtin.modinfo
ld.lld-9: warning: <internal>:(.bss.rel.ro) is being placed in '.bss.rel.ro'
ld.lld-9: warning: <internal>:(.symtab) is being placed in '.symtab'
ld.lld-9: warning: <internal>:(.symtab_shndx) is being placed in '.symtab_shndx'
ld.lld-9: warning: <internal>:(.shstrtab) is being placed in '.shstrtab'
ld.lld-9: warning: <internal>:(.strtab) is being placed in '.strtab'
  KSYM    .tmp_kallsyms1.o
ld.lld-9: warning: <internal>:(.bss.rel.ro) is being placed in '.bss.rel.ro'
ld.lld-9: warning: <internal>:(.symtab) is being placed in '.symtab'
ld.lld-9: warning: <internal>:(.symtab_shndx) is being placed in '.symtab_shndx'
ld.lld-9: warning: <internal>:(.shstrtab) is being placed in '.shstrtab'
ld.lld-9: warning: <internal>:(.strtab) is being placed in '.strtab'
  KSYM    .tmp_kallsyms2.o
  LD      vmlinux
ld.lld-9: warning: <internal>:(.bss.rel.ro) is being placed in '.bss.rel.ro'
ld.lld-9: warning: <internal>:(.symtab) is being placed in '.symtab'
ld.lld-9: warning: <internal>:(.symtab_shndx) is being placed in '.symtab_shndx'
ld.lld-9: warning: <internal>:(.shstrtab) is being placed in '.shstrtab'
ld.lld-9: warning: <internal>:(.strtab) is being placed in '.strtab'

And this compiler warning

arch/powerpc/boot/main.c:107:18: warning: array comparison always evaluates to a constant [-Wtautological-compare]
        if (_initrd_end > _initrd_start) {
                        ^
1 warning generated.

Maybe we can create an issue somewhere for this one but it seems unimportant for merging.

Last question, do we want to add lld to linux-next for ppc64?
If not feel free to merge assuming all it okay. :)

@martell martell added enhancement New feature or request and removed WIP Work in progress labels Jul 7, 2019
@nathanchance
Copy link
Member

Maybe we can create an issue somewhere for this one but it seems unimportant for merging.

All of those should be tracked/answered already:

ClangBuiltLinux/linux#212

ClangBuiltLinux/linux#272

ClangBuiltLinux/linux#273

ClangBuiltLinux/linux#303 (comment)

Last question, do we want to add lld to linux-next for ppc64?
If not feel free to merge assuming all it okay. :)

Yes, we should add it for linux-next as well if mainline is working fine.

@martell
Copy link
Contributor Author

martell commented Jul 7, 2019

Yes, we should add it for linux-next as well if mainline is working fine.

done

Copy link
Member

@nathanchance nathanchance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM based on presubmit and local testing.

@nickdesaulniers
Copy link
Member

🆒 😎

@nickdesaulniers nickdesaulniers merged commit a21569a into ClangBuiltLinux:master Jul 8, 2019
@tpimh
Copy link
Contributor

tpimh commented Jul 8, 2019

Looking forward to other targets to move to LLD!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants