aboutsummaryrefslogtreecommitdiff
path: root/gold/output.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/output.cc')
-rw-r--r--gold/output.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gold/output.cc b/gold/output.cc
index 2f9db62..cb9e038 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -432,7 +432,6 @@ Output_file_header::do_sized_write(Output_file* of)
? elfcpp::ELFDATA2MSB
: elfcpp::ELFDATA2LSB);
e_ident[elfcpp::EI_VERSION] = elfcpp::EV_CURRENT;
- // FIXME: Some targets may need to set EI_OSABI and EI_ABIVERSION.
oehdr.put_e_ident(e_ident);
elfcpp::ET e_type;
@@ -489,6 +488,10 @@ Output_file_header::do_sized_write(Output_file* of)
else
oehdr.put_e_shstrndx(elfcpp::SHN_XINDEX);
+ // Let the target adjust the ELF header, e.g., to set EI_OSABI in
+ // the e_ident field.
+ parameters->target().adjust_elf_header(view, ehdr_size);
+
of->write_output_view(0, ehdr_size, view);
}