1/*
2 * Copyright (c) 2003-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;

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

102 arch = ObjectFile::UnknownArch;
103 }
104
105 //Detect the operating system
106 switch (ehdr.e_ident[EI_OSABI])
107 {
108
109 case ELFOSABI_LINUX:
110 case ELFOSABI_ARM:
110 opSys = ObjectFile::Linux;
111 break;
112 case ELFOSABI_SOLARIS:
113 opSys = ObjectFile::Solaris;
114 break;
115 case ELFOSABI_TRU64:
116 opSys = ObjectFile::Tru64;
117 break;
118 case ELFOSABI_ARM:
119 opSys = ObjectFile::LinuxArmOABI;
120 break;
121 default:
122 opSys = ObjectFile::UnknownOpSys;
123 }
124
125 //take a look at the .note.ABI section
126 //It can let us know what's what.
127 if (opSys == ObjectFile::UnknownOpSys) {
128 Elf_Scn *section;

--- 318 unchanged lines hidden ---