diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/alpha/process.cc | 7 | ||||
-rw-r--r-- | src/arch/alpha/system.cc | 4 | ||||
-rw-r--r-- | src/arch/arm/freebsd/system.cc | 2 | ||||
-rw-r--r-- | src/arch/arm/linux/system.cc | 2 | ||||
-rw-r--r-- | src/arch/arm/process.cc | 2 | ||||
-rw-r--r-- | src/arch/arm/system.cc | 2 | ||||
-rw-r--r-- | src/arch/mips/process.cc | 2 | ||||
-rw-r--r-- | src/arch/power/process.cc | 2 | ||||
-rw-r--r-- | src/arch/riscv/bare_metal/system.cc | 2 | ||||
-rw-r--r-- | src/arch/riscv/process.cc | 2 | ||||
-rw-r--r-- | src/arch/sparc/process.cc | 2 | ||||
-rw-r--r-- | src/arch/sparc/system.cc | 12 | ||||
-rw-r--r-- | src/arch/x86/process.cc | 2 |
13 files changed, 21 insertions, 22 deletions
diff --git a/src/arch/alpha/process.cc b/src/arch/alpha/process.cc index ea1cb0819..d0bfa79c8 100644 --- a/src/arch/alpha/process.cc +++ b/src/arch/alpha/process.cc @@ -58,9 +58,8 @@ AlphaProcess::AlphaProcess(ProcessParams *params, ObjectFile *objFile) objFile->bssSize(); brk_point = roundUp(brk_point, PageBytes); - // Set up stack. On Alpha, stack goes below text section. This - // code should get moved to some architecture-specific spot. - Addr stack_base = objFile->textBase() - (409600+4096); + // Set up stack. On Alpha, stack goes below the image. + Addr stack_base = objFile->textBase() - (409600 + 4096); // Set up region for mmaps. Addr mmap_end = 0x10000; @@ -80,7 +79,7 @@ AlphaProcess::argsInit(int intSize, int pageSize) // Patch the ld_bias for dynamic executables. updateBias(); - objFile->loadSections(initVirtMem); + objFile->loadSegments(initVirtMem); std::vector<AuxVector<uint64_t>> auxv; diff --git a/src/arch/alpha/system.cc b/src/arch/alpha/system.cc index b72821ed1..7bff6da01 100644 --- a/src/arch/alpha/system.cc +++ b/src/arch/alpha/system.cc @@ -109,8 +109,8 @@ AlphaSystem::initState() System::initState(); // Load program sections into memory - pal->loadSections(physProxy, loadAddrMask); - console->loadSections(physProxy, loadAddrMask); + pal->loadSegments(physProxy, loadAddrMask); + console->loadSegments(physProxy, loadAddrMask); /** * Copy the osflags (kernel arguments) into the consoles diff --git a/src/arch/arm/freebsd/system.cc b/src/arch/arm/freebsd/system.cc index 84538e18e..6e544a70e 100644 --- a/src/arch/arm/freebsd/system.cc +++ b/src/arch/arm/freebsd/system.cc @@ -133,7 +133,7 @@ FreebsdArmSystem::initState() bootReleaseAddr = ra & ~ULL(0x7F); dtb_file->setTextBase(params()->atags_addr + loadAddrOffset); - dtb_file->loadSections(physProxy); + dtb_file->loadSegments(physProxy); delete dtb_file; // Kernel boot requirements to set up r0, r1 and r2 in ARMv7 diff --git a/src/arch/arm/linux/system.cc b/src/arch/arm/linux/system.cc index 094e4d7a7..f03a5c6cb 100644 --- a/src/arch/arm/linux/system.cc +++ b/src/arch/arm/linux/system.cc @@ -152,7 +152,7 @@ LinuxArmSystem::initState() } dtb_file->setTextBase(params()->atags_addr + loadAddrOffset); - dtb_file->loadSections(physProxy); + dtb_file->loadSegments(physProxy); delete dtb_file; } else { // Using ATAGS diff --git a/src/arch/arm/process.cc b/src/arch/arm/process.cc index 8e3cfd91d..1a1d4a2a0 100644 --- a/src/arch/arm/process.cc +++ b/src/arch/arm/process.cc @@ -272,7 +272,7 @@ ArmProcess::argsInit(int pageSize, IntRegIndex spIndex) updateBias(); // load object file into target memory - objFile->loadSections(initVirtMem); + objFile->loadSegments(initVirtMem); //Setup the auxilliary vectors. These will already have endian conversion. //Auxilliary vectors are loaded only for elf formatted executables. diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc index 4ea0d1a91..efc347d9d 100644 --- a/src/arch/arm/system.cc +++ b/src/arch/arm/system.cc @@ -143,7 +143,7 @@ ArmSystem::initState() if (bootldr) { bool isGICv3System = dynamic_cast<Gicv3 *>(getGIC()) != nullptr; - bootldr->loadSections(physProxy); + bootldr->loadSegments(physProxy); inform("Using bootloader at address %#x\n", bootldr->entryPoint()); diff --git a/src/arch/mips/process.cc b/src/arch/mips/process.cc index fb78cee24..e3405fdaa 100644 --- a/src/arch/mips/process.cc +++ b/src/arch/mips/process.cc @@ -94,7 +94,7 @@ MipsProcess::argsInit(int pageSize) updateBias(); // load object file into target memory - objFile->loadSections(initVirtMem); + objFile->loadSegments(initVirtMem); std::vector<AuxVector<IntType>> auxv; diff --git a/src/arch/power/process.cc b/src/arch/power/process.cc index 6362027de..467c820f2 100644 --- a/src/arch/power/process.cc +++ b/src/arch/power/process.cc @@ -100,7 +100,7 @@ PowerProcess::argsInit(int intSize, int pageSize) updateBias(); // load object file into target memory - objFile->loadSections(initVirtMem); + objFile->loadSegments(initVirtMem); //Setup the auxilliary vectors. These will already have endian conversion. //Auxilliary vectors are loaded only for elf formatted executables. diff --git a/src/arch/riscv/bare_metal/system.cc b/src/arch/riscv/bare_metal/system.cc index 5cbd63af2..3fb07a489 100644 --- a/src/arch/riscv/bare_metal/system.cc +++ b/src/arch/riscv/bare_metal/system.cc @@ -55,7 +55,7 @@ BareMetalRiscvSystem::initState() RiscvSystem::initState(); // load program sections into memory - if (!bootloader->loadSections(physProxy)) { + if (!bootloader->loadSegments(physProxy)) { warn("could not load sections to memory"); } } diff --git a/src/arch/riscv/process.cc b/src/arch/riscv/process.cc index ab8305257..ca3f0e2b8 100644 --- a/src/arch/riscv/process.cc +++ b/src/arch/riscv/process.cc @@ -126,7 +126,7 @@ RiscvProcess::argsInit(int pageSize) const int addrSize = sizeof(IntType); updateBias(); - objFile->loadSections(initVirtMem); + objFile->loadSegments(initVirtMem); ElfObject* elfObject = dynamic_cast<ElfObject*>(objFile); memState->setStackMin(memState->getStackBase()); diff --git a/src/arch/sparc/process.cc b/src/arch/sparc/process.cc index d89c606a3..cca61c1be 100644 --- a/src/arch/sparc/process.cc +++ b/src/arch/sparc/process.cc @@ -208,7 +208,7 @@ SparcProcess::argsInit(int pageSize) updateBias(); // load object file into target memory - objFile->loadSections(initVirtMem); + objFile->loadSegments(initVirtMem); enum hardwareCaps { diff --git a/src/arch/sparc/system.cc b/src/arch/sparc/system.cc index a68b11cad..5896061a6 100644 --- a/src/arch/sparc/system.cc +++ b/src/arch/sparc/system.cc @@ -138,22 +138,22 @@ SparcSystem::initState() // Load reset binary into memory reset->setTextBase(params()->reset_addr); - reset->loadSections(physProxy); + reset->loadSegments(physProxy); // Load the openboot binary openboot->setTextBase(params()->openboot_addr); - openboot->loadSections(physProxy); + openboot->loadSegments(physProxy); // Load the hypervisor binary hypervisor->setTextBase(params()->hypervisor_addr); - hypervisor->loadSections(physProxy); + hypervisor->loadSegments(physProxy); // Load the nvram image nvram->setTextBase(params()->nvram_addr); - nvram->loadSections(physProxy); + nvram->loadSegments(physProxy); // Load the hypervisor description image hypervisor_desc->setTextBase(params()->hypervisor_desc_addr); - hypervisor_desc->loadSections(physProxy); + hypervisor_desc->loadSegments(physProxy); // Load the partition description image partition_desc->setTextBase(params()->partition_desc_addr); - partition_desc->loadSections(physProxy); + partition_desc->loadSegments(physProxy); // @todo any fixup code over writing data in binaries on setting break diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc index 0765adea5..60f4f474b 100644 --- a/src/arch/x86/process.cc +++ b/src/arch/x86/process.cc @@ -776,7 +776,7 @@ X86Process::argsInit(int pageSize, updateBias(); // load object file into target memory - objFile->loadSections(initVirtMem); + objFile->loadSegments(initVirtMem); enum X86CpuFeature { X86_OnboardFPU = 1 << 0, |