1*5103e761SPatrick Mooney# 2*5103e761SPatrick Mooney# CDDL HEADER START 3*5103e761SPatrick Mooney# 4*5103e761SPatrick Mooney# This file and its contents are supplied under the terms of the 5*5103e761SPatrick Mooney# Common Development and Distribution License ("CDDL"), version 1.0. 6*5103e761SPatrick Mooney# You may only use this file in accordance with the terms of version 7*5103e761SPatrick Mooney# 1.0 of the CDDL. 8*5103e761SPatrick Mooney# 9*5103e761SPatrick Mooney# A full copy of the text of the CDDL should have accompanied this 10*5103e761SPatrick Mooney# source. A copy of the CDDL is also available via the Internet at 11*5103e761SPatrick Mooney# http://www.illumos.org/license/CDDL. 12*5103e761SPatrick Mooney# 13*5103e761SPatrick Mooney# CDDL HEADER END 14*5103e761SPatrick Mooney# 15*5103e761SPatrick Mooney 16*5103e761SPatrick Mooney# 17*5103e761SPatrick Mooney# Copyright 2022 Oxide Computer Company 18*5103e761SPatrick Mooney# 19*5103e761SPatrick Mooney 20*5103e761SPatrick Mooney$mapfile_version 2 21*5103e761SPatrick Mooney 22*5103e761SPatrick Mooney# The .eh_frame data was ending up in front of the .text segment, causing issues 23*5103e761SPatrick Mooney# when the guest attempted to start its payload 24*5103e761SPatrick MooneyNULL_SEGMENT discard { 25*5103e761SPatrick Mooney ASSIGN_SECTION eh_discard { 26*5103e761SPatrick Mooney IS_NAME = .eh_frame; 27*5103e761SPatrick Mooney }; 28*5103e761SPatrick Mooney}; 29*5103e761SPatrick Mooney 30*5103e761SPatrick MooneyLOAD_SEGMENT payload { 31*5103e761SPatrick Mooney FLAGS = READ WRITE EXECUTE; 32*5103e761SPatrick Mooney VADDR = 0x800000; 33*5103e761SPatrick Mooney PADDR = 0x800000; 34*5103e761SPatrick Mooney ALIGN = 0x1000; 35*5103e761SPatrick Mooney 36*5103e761SPatrick Mooney # Make sure that payload_start.s`_start is the first thing in .text segment, 37*5103e761SPatrick Mooney # since when we "boot", that is where we want to begin running. 38*5103e761SPatrick Mooney ASSIGN_SECTION is_start_text { 39*5103e761SPatrick Mooney IS_NAME = .text; 40*5103e761SPatrick Mooney FILE_BASENAME = payload_start.o; 41*5103e761SPatrick Mooney }; 42*5103e761SPatrick Mooney ASSIGN_SECTION is_text { 43*5103e761SPatrick Mooney IS_NAME = .text; 44*5103e761SPatrick Mooney }; 45*5103e761SPatrick Mooney ASSIGN_SECTION is_alloc { 46*5103e761SPatrick Mooney FLAGS = ALLOC; 47*5103e761SPatrick Mooney }; 48*5103e761SPatrick Mooney IS_ORDER = is_start_text is_text is_alloc; 49*5103e761SPatrick Mooney}; 50