summaryrefslogtreecommitdiffstats
path: root/src/build/linker/linker.C
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2011-12-06 15:42:14 -0600
committerThi N. Tran <thi@us.ibm.com>2011-12-06 15:58:50 -0600
commitc761a76534988071d0988daa77b8c51526e2d9f4 (patch)
treef609233795fe4b99f1de3dc89c12207f784d139b /src/build/linker/linker.C
parentf478f52831aff692d4a5fd31c2991e76e7188284 (diff)
downloadtalos-hostboot-c761a76534988071d0988daa77b8c51526e2d9f4.tar.gz
talos-hostboot-c761a76534988071d0988daa77b8c51526e2d9f4.zip
Make image files end on 8-byte boundary
Change-Id: I2c933597d48b5cd16a3e26bffc0371f5df340181 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/566 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Diffstat (limited to 'src/build/linker/linker.C')
-rw-r--r--src/build/linker/linker.C22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/build/linker/linker.C b/src/build/linker/linker.C
index e635c8017..e0acbdef4 100644
--- a/src/build/linker/linker.C
+++ b/src/build/linker/linker.C
@@ -518,16 +518,6 @@ bool Object::write_object()
cout << strerror(error) << endl;
}
- // make file end on 8 byte boundary
- uint64_t eof = ftell(iv_output);
- if (0 != (eof % 8))
- {
- char zero = 0;
- fwrite(&zero, 0, 8 - (eof % 8), iv_output);
- }
-
- modinfo << &name[(name.find_last_of("/")+1)] << ",0x"
- << std::hex << offset + base_addr << endl;
}
else // binary blob
{
@@ -541,6 +531,18 @@ bool Object::write_object()
delete [] buffer;
fclose(file);
}
+
+ // make file end on 8 byte boundary
+ uint64_t eof = ftell(iv_output);
+ if (0 != (eof % 8))
+ {
+ char zero = 0;
+ fwrite(&zero, 1, 8 - (eof % 8), iv_output);
+ }
+
+ modinfo << &name[(name.find_last_of("/")+1)] << ",0x"
+ << std::hex << offset + base_addr << endl;
+
}
//-----------------------------------------------------------------------------
OpenPOWER on IntegriCloud