diff options
author | Ian Lance Taylor <iant@google.com> | 2007-10-16 23:23:08 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-10-16 23:23:08 +0000 |
commit | 436ca963fd42564971f2906e4ba7263d513e483c (patch) | |
tree | 422fb94d22ab9e5df3475ff43c3b734625a489f2 /gold/output.cc | |
parent | a360aedd0fd0e2c02c0896046bec126e6ad72308 (diff) | |
download | gdb-436ca963fd42564971f2906e4ba7263d513e483c.zip gdb-436ca963fd42564971f2906e4ba7263d513e483c.tar.gz gdb-436ca963fd42564971f2906e4ba7263d513e483c.tar.bz2 |
From Cary Coutant: preliminary shared library support.
Diffstat (limited to 'gold/output.cc')
-rw-r--r-- | gold/output.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gold/output.cc b/gold/output.cc index 6406c78..9aaa7e9 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -401,9 +401,10 @@ Output_file_header::do_sized_write(Output_file* of) oehdr.put_e_ident(e_ident); elfcpp::ET e_type; - // FIXME: ET_DYN. if (parameters->output_is_object()) e_type = elfcpp::ET_REL; + else if (parameters->output_is_shared()) + e_type = elfcpp::ET_DYN; else e_type = elfcpp::ET_EXEC; oehdr.put_e_type(e_type); @@ -531,6 +532,11 @@ Output_reloc<elfcpp::SHT_REL, dynamic, size, big_endian>::get_symbol_index() index = this->u1_.os->symtab_index(); break; + case 0: + // Relocations without symbols use a symbol index of 0. + index = 0; + break; + default: if (dynamic) { |