aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-05-26 16:13:47 +0000
committerJeff Law <law@redhat.com>1994-05-26 16:13:47 +0000
commitada45a2a82ac8d312c15f8b5efae3ddee79ba818 (patch)
tree682887f682d7167c5a603d92b51292b39c9a4a76
parent66dea5074e273c5c36eb507f508fea253495604e (diff)
downloadgdb-ada45a2a82ac8d312c15f8b5efae3ddee79ba818.zip
gdb-ada45a2a82ac8d312c15f8b5efae3ddee79ba818.tar.gz
gdb-ada45a2a82ac8d312c15f8b5efae3ddee79ba818.tar.bz2
* som.c (som_prep_headers): Do not set the system_id here, private
bfd data has not been copied yet. (som_write_headers): Instead do it here.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/som.c17
2 files changed, 16 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 280b40f..8cfc521 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+Thu May 26 10:10:21 1994 Jeff Law (law@snake.cs.utah.edu)
+
+ * som.c (som_prep_headers): Do not set the system_id here, private
+ bfd data has not been copied yet.
+ (som_write_headers): Instead do it here.
+
Tue May 24 16:17:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Make MIPS ELF use new ELF backend linker. No shared library
diff --git a/bfd/som.c b/bfd/som.c
index 0ae7991..b67a87b 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -1959,13 +1959,6 @@ som_prep_headers (abfd)
}
obj_som_file_hdr (abfd) = file_hdr;
- /* FIXME. This should really be conditional based on whether or not
- PA1.1 instructions/registers have been used. */
- if (abfd->flags & (EXEC_P | DYNAMIC))
- file_hdr->system_id = obj_som_exec_data (abfd)->system_id;
- else
- file_hdr->system_id = CPU_PA_RISC1_0;
-
if (abfd->flags & (EXEC_P | DYNAMIC))
{
if (abfd->flags & D_PAGED)
@@ -3309,6 +3302,16 @@ som_write_headers (abfd)
section = section->next;
}
+ /* FIXME. This should really be conditional based on whether or not
+ PA1.1 instructions/registers have been used.
+
+ Setting of the system_id has to happen very late now that copying of
+ BFD private data happens *after* section contents are set. */
+ if (abfd->flags & (EXEC_P | DYNAMIC))
+ obj_som_file_hdr(abfd)->system_id = obj_som_exec_data (abfd)->system_id;
+ else
+ obj_som_file_hdr(abfd)->system_id = CPU_PA_RISC1_0;
+
/* Only thing left to do is write out the file header. It is always
at location zero. Seek there and write it. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) < 0)