Deleted Added
sdiff udiff text old ( 5713:993c7952b930 ) new ( 5753:db1653549204 )
full compact
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 641 unchanged lines hidden (view full) ---

650 }
651
652 if (objFile->isDynamic())
653 fatal("Object file is a dynamic executable however only static "
654 "executables are supported!\n Please recompile your "
655 "executable as a static binary and try again.\n");
656
657#if THE_ISA == ALPHA_ISA
658 if (objFile->hasTLS())
659 fatal("Object file has a TLS section and single threaded TLS is not\n"
660 " currently supported for Alpha! Please recompile your "
661 "executable with \n a non-TLS toolchain.\n");
662
663 if (objFile->getArch() != ObjectFile::Alpha)
664 fatal("Object file architecture does not match compiled ISA (Alpha).");
665 switch (objFile->getOpSys()) {
666 case ObjectFile::Tru64:
667 process = new AlphaTru64Process(params, objFile);
668 break;
669
670 case ObjectFile::Linux:
671 process = new AlphaLinuxProcess(params, objFile);
672 break;
673
674 default:
675 fatal("Unknown/unsupported operating system.");
676 }
677#elif THE_ISA == SPARC_ISA
678 if (objFile->getArch() != ObjectFile::SPARC64 && objFile->getArch() != ObjectFile::SPARC32)
679 fatal("Object file architecture does not match compiled ISA (SPARC).");
680 switch (objFile->getOpSys()) {
681 case ObjectFile::Linux:
682 if (objFile->getArch() == ObjectFile::SPARC64) {
683 process = new Sparc64LinuxProcess(params, objFile);
684 } else {
685 process = new Sparc32LinuxProcess(params, objFile);
686 }
687 break;
688
689
690 case ObjectFile::Solaris:
691 process = new SparcSolarisProcess(params, objFile);
692 break;
693 default:
694 fatal("Unknown/unsupported operating system.");
695 }
696#elif THE_ISA == X86_ISA
697 if (objFile->getArch() != ObjectFile::X86)
698 fatal("Object file architecture does not match compiled ISA (x86).");
699 switch (objFile->getOpSys()) {
700 case ObjectFile::Linux:
701 process = new X86LinuxProcess(params, objFile);
702 break;
703 default:
704 fatal("Unknown/unsupported operating system.");
705 }
706#elif THE_ISA == MIPS_ISA
707 if (objFile->getArch() != ObjectFile::Mips)
708 fatal("Object file architecture does not match compiled ISA (MIPS).");
709 switch (objFile->getOpSys()) {
710 case ObjectFile::Linux:
711 process = new MipsLinuxProcess(params, objFile);
712 break;
713
714 default:
715 fatal("Unknown/unsupported operating system.");
716 }
717#elif THE_ISA == ARM_ISA
718 if (objFile->getArch() != ObjectFile::Arm)
719 fatal("Object file architecture does not match compiled ISA (ARM).");
720 switch (objFile->getOpSys()) {
721 case ObjectFile::Linux:
722 process = new ArmLinuxProcess(params, objFile);
723 break;
724
725 default:
726 fatal("Unknown/unsupported operating system.");
727 }
728#else

--- 14 unchanged lines hidden ---