Repository navigation
Open
Labels
Reported upstreamThis bug was filed on LLVM’s issue tracker, Phabricator, or the kernel mailing list.[ARCH] arm32This bug impacts ARCH=arm[BUG] llvmA bug that should be fixed in upstream LLVM[TOOL] lldThe issue is relevant to LLD linker[WORKAROUND] AppliedThis bug has an applied workaroundfeature-requestNot a bug per-se
Description
After commit b9baf5c8c5c3 ("ARM: Spectre-BHB workaround"):
$ make -skj"$(nproc)" ARCH=arm LLVM=1 mrproper defconfig all
...
ld.lld: error: ./arch/arm/kernel/vmlinux.lds:34: AT expected, but got NOCROSSREFS
>>> __vectors_lma = .; OVERLAY 0xffff0000 : NOCROSSREFS AT(__vectors_lma) { .vectors { *(.vectors) } .vectors.bhb.loop8 { *(.vectors.bhb.loop8) } .vectors.bhb.bpiall { *(.vectors.bhb.bpiall) } } __vectors_start = LOADADDR(.vectors); __vectors_end = LOADADDR(.vectors) + SIZEOF(.vectors); __vectors_bhb_loop8_start = LOADADDR(.vectors.bhb.loop8); __vectors_bhb_loop8_end = LOADADDR(.vectors.bhb.loop8) + SIZEOF(.vectors.bhb.loop8); __vectors_bhb_bpiall_start = LOADADDR(.vectors.bhb.bpiall); __vectors_bhb_bpiall_end = LOADADDR(.vectors.bhb.bpiall) + SIZEOF(.vectors.bhb.bpiall); . = __vectors_lma + SIZEOF(.vectors) + SIZEOF(.vectors.bhb.loop8) + SIZEOF(.vectors.bhb.bpiall); __stubs_lma = .; .stubs ADDR(.vectors) + 0x1000 : AT(__stubs_lma) { *(.stubs) } __stubs_start = LOADADDR(.stubs); __stubs_end = LOADADDR(.stubs) + SIZEOF(.stubs); . = __stubs_lma + SIZEOF(.stubs); PROVIDE(vector_fiq_offset = vector_fiq - ADDR(.vectors));
>>>
...
From the GNU ld documentation:
NOCROSSREFS(section section …)
This command may be used to tell ld to issue an error about any
references among certain output sections.
In certain types of programs, particularly on embedded systems when
using overlays, when one section is loaded into memory, another section
will not be. Any direct references between the two sections would be
errors. For example, it would be an error if code in one section called
a function defined in the other section.
The NOCROSSREFS command takes a list of output section names. If ld
detects any cross references between the sections, it reports an error
and returns a non-zero exit status. Note that the NOCROSSREFS command
uses output section names, not input section names.
The link succeeds with ld.bfd.
Metadata
Metadata
Assignees
Labels
Reported upstreamThis bug was filed on LLVM’s issue tracker, Phabricator, or the kernel mailing list.[ARCH] arm32This bug impacts ARCH=arm[BUG] llvmA bug that should be fixed in upstream LLVM[TOOL] lldThe issue is relevant to LLD linker[WORKAROUND] AppliedThis bug has an applied workaroundfeature-requestNot a bug per-se
Activity
nathanchance commentedon Mar 9, 2022
appears to work, not sure if this is acceptable upstream.
nathanchance commentedon Mar 9, 2022
Patch submitted: https://lore.kernel.org/r/20220309220726.1525113-1-nathan@kernel.org/
ARM: Do not use NOCROSSREFS directive with ld.lld
nathanchance commentedon Mar 9, 2022
Patch applied: https://git.kernel.org/linus/36168e387fa7d0f1fe0cd5cf76c8cea7aee714fa
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
207 remaining items
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld
ARM: Do not use NOCROSSREFS directive with ld.lld