freebsd-dev/sys/amd64/amd64
Brandon Bergren 40b664f64b [PowerPC] More relocation fixes
It turns out relocating the symbol table itself can cause issues, like fbt
crashing because it applies the offsets to the kernel twice.

This had been previously brought up in rS333447 when the stoffs hack was
added, but I had been unaware of this and reimplemented symtab relocation.

Instead of relocating the symbol table, keep track of the relocation base
in ddb, so the ddb symbols behave like the kernel linker-provided symbols.

This is intended to be NFC on platforms other than PowerPC, which do not
use fully relocatable kernels. (The relbase will always be 0)

 * Remove the rest of the stoffs hack.
 * Remove my half-baked displace_symbol_table() function.
 * Extend ddb initialization to cope with having a relocation offset on the
   kernel symbol table.
 * Fix my kernel-as-initrd hack to work with booke64 by using a temporary
   mapping to access the data.
 * Fix another instance of __powerpc__ that is actually RELOCATABLE_KERNEL.
 * Change the behavior or X_db_symbol_values to apply the relocation base
   when updating valp, to match link_elf_symbol_values() behavior.

Reviewed by:	jhibbits
Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D25223
2020-06-21 03:39:26 +00:00
..
apic_vector.S Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
atpic_vector.S Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
bios.c sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
bpf_jit_machdep.c Make UMA and malloc(9) return non-executable memory in most cases. 2018-06-13 17:04:41 +00:00
bpf_jit_machdep.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
copyout.c Port the NetBSD KCSAN runtime to FreeBSD. 2019-11-21 11:22:08 +00:00
cpu_switch.S amd64: Add a knob to flush RSB on context switches if machine has SMEP. 2020-05-20 22:00:31 +00:00
db_disasm.c ddb: Add support for disassembling 'crc32' on amd64 2019-10-16 18:27:27 +00:00
db_interface.c amd64: move common_tss into pcpu. 2019-11-10 09:28:18 +00:00
db_trace.c teach db_nextframe/x86 about [X]xen_intr_upcall interrupt handler 2019-11-12 11:00:01 +00:00
efirt_machdep.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
efirt_support.S amd64 ef_rt_arch_call: Preserve %rflags around call into EFI RT service. 2019-06-03 15:32:42 +00:00
elf_machdep.c [PowerPC][Book-E] Fix missing load base in elf_cpu_parse_dynamic(). 2020-03-18 02:58:18 +00:00
exception.S amd64: in double fault handler, do not rely on sane gsbase value. 2019-11-20 11:12:19 +00:00
fpu.c FPU init: allocate initial state from UMA to ensure alignment 2020-06-12 21:17:56 +00:00
gdb_machdep.c Provide KPI for handling of rw/ro kernel text. 2018-03-20 17:43:50 +00:00
genassym.c amd64: move common_tss into pcpu. 2019-11-10 09:28:18 +00:00
in_cksum.c spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
initcpu.c Control for Special Register Buffer Data Sampling mitigation. 2020-06-12 22:14:45 +00:00
io.c sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
locore.S Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
machdep.c [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00
mem.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
minidump_machdep.c Remove an obsolete TODO comment from several minidump implementations. 2020-04-24 18:47:42 +00:00
mp_machdep.c Fix the build after r361033 when ACPI is disabled. 2020-05-22 01:18:55 +00:00
mpboot.S x86: improve reservation of AP trampoline memory 2018-04-05 14:39:51 +00:00
pmap.c amd64 pmap: reorder IPI send and local TLB flush in TLB invalidations. 2020-06-10 22:07:57 +00:00
prof_machdep.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
ptrace_machdep.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sigtramp.S Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
support.S copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
sys_machdep.c Fix map locking in the CLEAR_PKRU sysarch(2) handler. 2020-02-05 16:09:02 +00:00
trap.c Retire procfs-based process debugging. 2020-04-01 19:22:09 +00:00
uio_machdep.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
uma_machdep.c Use vm_page_unwire_noq() instead of directly modifying page wire counts. 2018-02-08 19:28:51 +00:00
vm_machdep.c Retire procfs-based process debugging. 2020-04-01 19:22:09 +00:00
xen-locore.S xen-locore: fix size in GDT descriptor 2020-05-26 10:24:06 +00:00