mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
Relocate a few extra addresses that are stored as physical addresses via
the boot loader.
This commit is contained in:
parent
624b326270
commit
2da2eeacee
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40252
1 changed files with 7 additions and 3 deletions
|
@ -23,7 +23,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: subr_module.c,v 1.1 1998/10/09 00:31:29 msmith Exp $
|
||||
* $Id: subr_module.c,v 1.2 1998/10/09 23:59:01 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -247,10 +247,14 @@ preload_bootstrap_relocate(vm_offset_t offset)
|
|||
if (hdr[0] == 0 && hdr[1] == 0)
|
||||
break;
|
||||
|
||||
/* Look for a MODINFO_ADDR field */
|
||||
if (hdr[0] == MODINFO_ADDR) {
|
||||
/* Deal with the ones that we know we have to fix */
|
||||
switch (hdr[0]) {
|
||||
case MODINFO_ADDR:
|
||||
case MODINFO_METADATA|MODINFOMD_SSYM:
|
||||
case MODINFO_METADATA|MODINFOMD_ESYM:
|
||||
ptr = (vm_offset_t *)(curp + (sizeof(u_int32_t) * 2));
|
||||
*ptr += offset;
|
||||
break;
|
||||
}
|
||||
/* The rest is beyond us for now */
|
||||
|
||||
|
|
Loading…
Reference in a new issue