aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.h
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-02-24 20:50:59 +0000
committerDoug Kwan <dougkwan@google.com>2010-02-24 20:50:59 +0000
commit101654612f383f5427e2d727556eda80537de76b (patch)
treeb57e25c9d904f79e0cd79d05af1fdc32f1be34b9 /gold/fileread.h
parent24291992dac3f63bef7ee031d4d5f2f96920e070 (diff)
downloadfsf-binutils-gdb-101654612f383f5427e2d727556eda80537de76b.zip
fsf-binutils-gdb-101654612f383f5427e2d727556eda80537de76b.tar.gz
fsf-binutils-gdb-101654612f383f5427e2d727556eda80537de76b.tar.bz2
2010-02-24 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::do_finalize_sections): Skip processor specific flags and attributes merging if an input file is a binary file. * fileread.cc (Input_file::open): Record format of original file. * fileread.h (Input_file::Format): New enum type. (Input_file::Input_file): Initialize data member format_. (Input_file::format): New method definition. (Input_file::format_):: New data member.
Diffstat (limited to 'gold/fileread.h')
-rw-r--r--gold/fileread.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/gold/fileread.h b/gold/fileread.h
index 5aac7ad..9933460 100644
--- a/gold/fileread.h
+++ b/gold/fileread.h
@@ -464,9 +464,16 @@ class File_view
class Input_file
{
public:
+ enum Format
+ {
+ FORMAT_NONE,
+ FORMAT_ELF,
+ FORMAT_BINARY
+ };
+
Input_file(const Input_file_argument* input_argument)
: input_argument_(input_argument), found_name_(), file_(),
- is_in_sysroot_(false)
+ is_in_sysroot_(false), format_(FORMAT_NONE)
{ }
// Create an input file with the contents already provided. This is
@@ -536,6 +543,11 @@ class Input_file
bool
just_symbols() const;
+ // Return the format of the unconverted input file.
+ Format
+ format() const
+ { return this->format_; }
+
private:
Input_file(const Input_file&);
Input_file& operator=(const Input_file&);
@@ -555,6 +567,8 @@ class Input_file
File_read file_;
// Whether we found the file in a directory in the system root.
bool is_in_sysroot_;
+ // Format of unconverted input file.
+ Format format_;
};
} // end namespace gold