HomeFreeBSD

Fix PPC symbol resolution

Description

Fix PPC symbol resolution

Summary:
There were 2 issues that were preventing correct symbol resolution
on PowerPC/pseries:

1- memory corruption at chrp_attach() - this caused the inital

part of the symbol table to become zeroed, which would cause
the kernel linker to fail to parse it.
(this was probably zeroing out other memory parts as well)

2- DDB symbol resolution wasn't working because symtab contained

not relocated addresses but it was given relocated offsets.
Although relocating the symbol table fixed this, it broke the
linker, that already handled this case.
Thus, the fix for this consists in adding a new DDB macro:
DB_STOFFS(offs) that converts a (potentially) relocated offset
into one that can be compared with symbol table values.

PR: 227093
Submitted by: Leandro Lupori <leandro.lupori_gmail.com>
Differential Revision: https://reviews.freebsd.org/D15372

Details

Provenance
jhibbitsAuthored on
Differential Revision
D15372: Fix PPC symbol resolution
Parents
rS333446: Rework CTL frontend & backend options to use nv(3), allow creating multiple
Branches
Unknown
Tags
Unknown