From 9590bf2544154e40e76e1e4d795d1b21327b0abb Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Mon, 1 Aug 2011 18:25:22 +0000 Subject: * layout.cc (Layout::set_segment_offsets): Don't realign text segment if -Ttext was specified. * object.cc (Sized_relobj_file::Sized_relobj_file): Store the ELF file type. * object.h (Sized_relobj_file::e_type): New function. (Sized_relobj_file::e_type_): New data member. * symtab.cc (Symbol_table::add_from_relobj): Don't add section base address for ET_EXEC files. * target.cc (Target::do_make_elf_object_implementation): Allow ET_EXEC files with --just-symbols option. --- gold/object.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gold/object.h') diff --git a/gold/object.h b/gold/object.h index 9c363cd..a389c54 100644 --- a/gold/object.h +++ b/gold/object.h @@ -1912,6 +1912,11 @@ class Sized_relobj_file : public Sized_relobj sized_relobj() const { return this; } + // Return the ELF file type. + int + e_type() const + { return this->e_type_; } + // Return the number of symbols. This is only valid after // Object::add_symbols has been called. unsigned int @@ -2504,6 +2509,9 @@ class Sized_relobj_file : public Sized_relobj // General access to the ELF file. elfcpp::Elf_file elf_file_; + // Type of ELF file (ET_REL or ET_EXEC). ET_EXEC files are allowed + // as input files only for the --just-symbols option. + int e_type_; // Index of SHT_SYMTAB section. unsigned int symtab_shndx_; // The number of local symbols. -- cgit v1.1