Change text alignement to 4 bytes.

This commit is contained in:
Tom Rix 2002-06-12 16:04:39 +00:00
parent 6c5e141af0
commit f381349953
3 changed files with 20 additions and 8 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;