[llvm-dev] Linking Linux kernel with LLD

Dmitry Golovin via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 26 10:33:29 PST 2017


Hi!

I used objcopy from GNU Binutils 2.27 and I didn't have this error. Maybe it's something new, so I will build a new version of LLD and try to reproduce.

Sorry, I accidentally used "Reply" instead of "Reply all", so the message didn't get to the mailing list.

Regards,
Dmitry

25.01.2017, 18:19, "George Rimar" <grimar at accesssoftek.com>:
> Hi !
>
> I am observing next issue when linking with WIP patches applied:
>
> ld: warning: cannot find entry symbol _start; defaulting to 0x1000
>   RELOCS arch/x86/realmode/rm/realmode.relocs
>   OBJCOPY arch/x86/realmode/rm/realmode.bin
> objcopy:arch/x86/realmode/rm/realmode.elf: Bad value
> arch/x86/realmode/rm/Makefile:61: recipe for target 'arch/x86/realmode/rm/realmode.bin' failed
> make[5]: *** [arch/x86/realmode/rm/realmode.bin] Error 1
>
> It seems to be objcopy version specific.
>
> With GNU objcopy (GNU Binutils for Ubuntu) 2.26.1 and GNU objcopy (GNU Binutils) 2.27 I have the same errors,
> GNU objcopy (GNU Binutils) 2.17.50.20070806 produces output fine.
>
> What version of binutils do you use ?
>
> Also I am observing that we do not produce correct output for realmode.elf anyways.
> It has next script:
> (arch/x86/realmode/rm/realmode.lds.S)
>
>  .rodata : {
>   *(.rodata)
>   *(.rodata.*)
>   . = ALIGN(16);
>   video_cards = .;
>   *(.videocards)
>   video_cards_end = .;
>  }
>
> But symbols video_cards == video_cards_end in LLD output (realmode.elf),
> what does not seems to be correct.
>
> So I believe realmode.elf, bin are broken, even if objcopy runs fine.
>
> I am investigating it now.
>
> George.


More information about the llvm-dev mailing list