aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog11
-rw-r--r--bfd/coff-rs6000.c7
-rw-r--r--bfd/coffcode.h10
3 files changed, 20 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fd43970..38f19f1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,14 @@
+2002-06-11 Tom Rix <trix@redhat.com>
+
+ * coffcode.h (coff_compute_section_file_positions): Add data
+ section to AIX loader alignment check.
+
+ * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
+ alignment to 4 bytes.
+ (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
+ power accessor macro.
+ (do_shared_object_padding): Remove invalid assertion.
+
2002-06-10 Richard Sandiford <rsandifo@redhat.com>
* section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 7cd26b8..a18aa5e 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -237,7 +237,7 @@ _bfd_xcoff_mkobject (abfd)
xcoff_data (abfd)->debug_indices = NULL;
/* text section alignment is different than the default */
- /* xcoff_data (abfd)->text_align_power = 5; */
+ bfd_xcoff_text_align_power (abfd) = 2;
return true;
}
@@ -278,8 +278,8 @@ _bfd_xcoff_copy_private_bfd_data (ibfd, obfd)
else
ox->snentry = sec->output_section->target_index;
}
- ox->text_align_power = ix->text_align_power;
- ox->data_align_power = ix->data_align_power;
+ bfd_xcoff_text_align_power (obfd) = bfd_xcoff_text_align_power (ibfd);
+ bfd_xcoff_data_align_power (obfd) = bfd_xcoff_data_align_power (ibfd);
ox->modtype = ix->modtype;
ox->cputype = ix->cputype;
ox->maxdata = ix->maxdata;
@@ -1730,7 +1730,6 @@ do_shared_object_padding (out_bfd, in_bfd, offset, ar_header_size)
int text_align_power;
text_align_power = bfd_xcoff_text_align_power (in_bfd);
- BFD_ASSERT (2 < text_align_power);
pad = 1 << text_align_power;
pad -= (*offset + ar_header_size) & (pad - 1);
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index ece19a2..0363bb7 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1782,8 +1782,8 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
xcoff->toc = internal_a->o_toc;
xcoff->sntoc = internal_a->o_sntoc;
xcoff->snentry = internal_a->o_snentry;
- xcoff->text_align_power = internal_a->o_algntext;
- xcoff->data_align_power = internal_a->o_algndata;
+ bfd_xcoff_text_align_power (abfd) = internal_a->o_algntext;
+ bfd_xcoff_data_align_power (abfd) = internal_a->o_algndata;
xcoff->modtype = internal_a->o_modtype;
xcoff->cputype = internal_a->o_cputype;
xcoff->maxdata = internal_a->o_maxdata;
@@ -3084,8 +3084,10 @@ coff_compute_section_file_positions (abfd)
AIX executable is stripped with gnu strip because the default vma
of native is 0x10000150 but default for gnu is 0x10000140. Gnu
stripped gnu excutable passes this check because the filepos is
- 0x0140. */
- if (!strcmp (current->name, _TEXT))
+ 0x0140. This problem also show up with 64 bit shared objects. The
+ data section must also be aligned. */
+ if (!strcmp (current->name, _TEXT)
+ || !strcmp (current->name, _DATA))
{
bfd_vma pad;
bfd_vma align;