Displaying 1 result from an estimated 1 matches for "l__const".
Did you mean:
__const
2019 Apr 04
3
question about --emit-relocs with lld
Hi,
While doing Linux kernel builds linked with lld, I've tracked down a
difference that breaks relocation of the kernel image (e.g. under
KASLR[1]). Some relocations are changed to ABS (weirdly, all are in
.rodata section). Note the difference below in the resulting linked
output.
.L__const._start.instance becomes *ABS* only under lld:
$ cat minimal.c
struct minimal {
void *pointer;
int value;
};
void _start(void)
{
struct minimal instance = {
.value = 1,
};
}
$ llvm-build/x86/bin/clang -c minimal.c
$ /usr/bin/ld.bfd --emit-relocs mini...