aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2010-02-08 20:00:54 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2010-02-08 20:00:54 +0000
commit9ea2b9423ff6fdf5ff6a57d9bfe787c67d396bfe (patch)
treeaafffba3e931e38e2b93c0e96fcc237e0894fdaa /bfd
parentde0a02497e91b8f887be102a876f388dcc9f58e6 (diff)
downloadgdb-9ea2b9423ff6fdf5ff6a57d9bfe787c67d396bfe.zip
gdb-9ea2b9423ff6fdf5ff6a57d9bfe787c67d396bfe.tar.gz
gdb-9ea2b9423ff6fdf5ff6a57d9bfe787c67d396bfe.tar.bz2
bfd/
* xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating max_contents_size, only consider sections whose contents must be swapped in.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/xcofflink.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 45c5784..7aecf51 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-08 Richard Sandiford <r.sandiford@uk.ibm.com>
+
+ * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
+ max_contents_size, only consider sections whose contents must
+ be swapped in.
+
2010-02-09 Alan Modra <amodra@gmail.com>
* elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 118fcf2..8198e93 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -5872,10 +5872,13 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
o->reloc_count += sec->reloc_count;
- if (sec->rawsize > max_contents_size)
- max_contents_size = sec->rawsize;
- if (sec->size > max_contents_size)
- max_contents_size = sec->size;
+ if ((sec->flags & SEC_IN_MEMORY) == 0)
+ {
+ if (sec->rawsize > max_contents_size)
+ max_contents_size = sec->rawsize;
+ if (sec->size > max_contents_size)
+ max_contents_size = sec->size;
+ }
if (coff_section_data (sec->owner, sec) != NULL
&& xcoff_section_data (sec->owner, sec) != NULL
&& (xcoff_section_data (sec->owner, sec)->lineno_count