ext: Revert "base: Use system libelf instead of ext"

This reverts commit bbb32ca1ef,
which tells scons to use the system's libelf instead of
ext/libelf.

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Change-Id: I3bb3e62f2ef0fbc72983c221d5570edb4b35d157
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33940
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Hoa Nguyen
2020-09-01 17:31:57 -07:00
parent 14f6c40797
commit 21abaac89d
4 changed files with 143 additions and 8 deletions

View File

@@ -41,7 +41,6 @@
#include "base/loader/elf_object.hh"
#include <fcntl.h>
#include <gelf.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -55,6 +54,7 @@
#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/Loader.hh"
#include "gelf.h"
#include "sim/byteswap.hh"
namespace Loader
@@ -221,7 +221,8 @@ ElfObject::determineArch()
auto &edata = ehdr.e_ident[EI_DATA];
// Detect the architecture
if ((emach == EM_SPARC && eclass == ELFCLASS64) || emach == EM_SPARCV9) {
if (emach == EM_SPARC64 || (emach == EM_SPARC && eclass == ELFCLASS64) ||
emach == EM_SPARCV9) {
arch = SPARC64;
} else if (emach == EM_SPARC32PLUS ||
(emach == EM_SPARC && eclass == ELFCLASS32)) {

View File

@@ -41,12 +41,11 @@
#ifndef __BASE_LOADER_ELF_OBJECT_HH__
#define __BASE_LOADER_ELF_OBJECT_HH__
#include <gelf.h>
#include <set>
#include <vector>
#include "base/loader/object_file.hh"
#include "gelf.h"
namespace Loader
{