[PATCH] D23206: [ELF] - Linkerscript: do not define _edata, _end, _etext if SECTIONS is used.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 5 08:22:24 PDT 2016


grimar added a comment.

With this + https://reviews.llvm.org/D23201, + https://reviews.llvm.org/D23165 + https://reviews.llvm.org/D22683 + slightly modified kernel linker script I was able to link FreeBSD kernel.
Though I am observing other problems now:

objcopy --only-keep-debug kernel.debug kernel.symbols
BFD: kernel.symbols: section `.eh_frame' can't be allocated in segment 3
objcopy: kernel.symbols: Bad value
Investigating it.

btw difference between my script and latest available is:

1. It does not contain AT(). Actually that what is currently commited in FreeBSD release 10.3 head I think.
2. Assignment to symbols inside output sections declarations (in *bss for example) I moved outside.

After that I verified that kernel works fine when linked with ld.


https://reviews.llvm.org/D23206





More information about the llvm-commits mailing list