This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch 1/7] [gold] Add a new Input_file constructor taking just a filename

This is the first of seven patches to add a new "dwp" utility to the
binutils/gold directory.  The dwp utility collects ".dwo" files generated
by GCC's --split-dwarf option (patch pending review) and produces a debug
package file (a ".dwp" file).

This is part of the Fission project:
The DWP file format is described at

Patches 1-4 make relatively minor changes to gold proper,
allowing the dwp utility to reuse various pieces of the gold linker.

Patch 5 adds support for the DWP format to readelf.

Patch 6 adds the dwp code itself, and patch 7 adds some testcases to the gold

This patch adds a new Input_file constructor, taking just a filename.

	* (Input_file::Input_file): New constructor.
	* fileread.h (class Input_file): Add new constructor.
 gold/ |   10 ++++++++++
 gold/fileread.h  |    3 +++
 2 files changed, 13 insertions(+)

diff --git a/gold/ b/gold/
index c5dc320..3fd35af 100644
--- a/gold/
+++ b/gold/
@@ -856,6 +856,16 @@ File_view::~File_view()
 // Class Input_file.
+// Create a file given just the filename.
+Input_file::Input_file(const char* name)
+  : found_name_(), file_(), is_in_sysroot_(false), format_(FORMAT_NONE)
+  this->input_argument_ =
+    new Input_file_argument(name, Input_file_argument::INPUT_FILE_TYPE_FILE,
+                            "", false, Position_dependent_options());
 // Create a file for testing.
 Input_file::Input_file(const Task* task, const char* name,
diff --git a/gold/fileread.h b/gold/fileread.h
index 02c7a64..08a4583 100644
--- a/gold/fileread.h
+++ b/gold/fileread.h
@@ -493,6 +493,9 @@ class Input_file
       is_in_sysroot_(false), format_(FORMAT_NONE)
   { }
+  // Create an input file given just a filename.
+  Input_file(const char* name);
   // Create an input file with the contents already provided.  This is
   // only used for testing.  With this path, don't call the open
   // method.
-- (Apple Git-31.1)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]