Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(959)

Unified Diff: ports/nacl-spawn/elf_reader.h

Issue 627103003: Add shared library version of libcli_main Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/nacl-spawn/build.sh ('k') | ports/nacl-spawn/elf_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/nacl-spawn/elf_reader.h
diff --git a/ports/nacl-spawn/elf_reader.h b/ports/nacl-spawn/elf_reader.h
deleted file mode 100644
index ad71589c9d95bb4dff1eee01bc3727151ac2d05c..0000000000000000000000000000000000000000
--- a/ports/nacl-spawn/elf_reader.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2014 The Native Client Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NACL_SPAWN_ELF_READER_
-#define NACL_SPAWN_ELF_READER_
-
-#include <elf.h>
-#include <stdio.h>
-
-#include <string>
-#include <vector>
-
-// An ELF reader which extracts shared objects which are necessary to
-// run the specified binary (DT_NEEDED). As no NaCl binary in the NaCl
-// SDK does not have DT_RPATH and DT_RUNPATH (as of Jan. 2014), we do
-// not support them.
-class ElfReader {
- public:
- explicit ElfReader(const char* filename);
-
- bool is_valid() const { return is_valid_; }
- bool is_static() const { return is_static_; }
- Elf64_Half machine() const { return machine_; }
- const std::vector<std::string>& neededs() const { return neededs_; }
-
- private:
- bool ReadHeaders(FILE* fp, std::vector<Elf64_Phdr>* phdrs);
- bool ReadDynamic(FILE* fp, const std::vector<Elf64_Phdr>& phdrs,
- Elf64_Addr* straddr, size_t* strsize,
- std::vector<int>* neededs);
- bool ReadStrtab(FILE* fp, const std::vector<Elf64_Phdr>& phdrs,
- Elf64_Addr straddr, size_t strsize,
- std::string* strtab);
- void PrintError(const char* fmt, ...);
-
- const char* filename_;
- bool is_valid_;
- bool is_static_;
- Elf64_Half machine_;
- unsigned char elf_class_;
- std::vector<std::string> neededs_;
-};
-
-#endif // NACL_SPAWN_ELF_READER_
« no previous file with comments | « ports/nacl-spawn/build.sh ('k') | ports/nacl-spawn/elf_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698