Move linker PROVIDE statements inside sections
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 11 Jun 2018 20:01:14 +0000 (16:01 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 11 Jun 2018 20:01:14 +0000 (16:01 -0400)
commit8626ba94657368d45631f85133f0f12d7d5f3841
tree64a5f3322bd1ea6e3469c99696d1a097127dfa73
parent22f750ab2c06d7c672871a2bc5c47c164bebbf0d
Move linker PROVIDE statements inside sections

Newer versions of binutils seem to require having the PROVIDE keyword
inside a specific section, instead of just floating between sections.

Specifically, on x86, binutils-2.30 was assigning all symbols outside a
section the value of the kernel load address (0xffffffffc2000000 or
whatever).  This included the linkerfuncs, the devtab, end, and etext.  The
bss symbols were OK.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/riscv/kernel.ld
kern/arch/x86/kernel64.ld
kern/linker_tables.ld