* aoutx.h (adjust_z_magic): Don't merge the start of bss with the

end of data if they are not contiguous.
This commit is contained in:
David MacKenzie 1994-01-07 21:33:00 +00:00
parent f0d2557ca4
commit 5330499f72
2 changed files with 17 additions and 5 deletions

View File

@ -1,5 +1,8 @@
Fri Jan 7 10:27:27 1994 David J. Mackenzie (djm@rtl.cygnus.com)
* aoutx.h (adjust_z_magic): Don't merge the start of bss with the
end of data if they are not contiguous.
* aoutf1.h (sunos4_aout_backend): Comment the fields' meanings.
Fri Jan 7 15:40:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)

View File

@ -788,10 +788,8 @@ adjust_z_magic (abfd, execp)
if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
execp->a_text += adata(abfd).exec_bytes_size;
N_SET_MAGIC (*execp, ZMAGIC);
/* Spec says data section should be rounded up to page boundary. */
/* If extra space in page is left after data section, fudge data
in the header so that the bss section looks smaller by that
amount. We'll start the bss section there, and lie to the OS. */
obj_datasec(abfd)->_raw_size
= align_power (obj_datasec(abfd)->_raw_size,
obj_bsssec(abfd)->alignment_power);
@ -803,8 +801,19 @@ adjust_z_magic (abfd, execp)
if (!obj_bsssec(abfd)->user_set_vma)
obj_bsssec(abfd)->vma = (obj_datasec(abfd)->vma
+ obj_datasec(abfd)->_raw_size);
execp->a_bss = (data_pad > obj_bsssec(abfd)->_raw_size) ? 0 :
obj_bsssec(abfd)->_raw_size - data_pad;
/* If the BSS immediately follows the data section and extra space
in the page is left after the data section, fudge data
in the header so that the bss section looks smaller by that
amount. We'll start the bss section there, and lie to the OS.
(Note that a linker script, as well as the above assignment,
could have explicitly set the BSS vma to immediately follow
the data section.) */
if (align_power (obj_bsssec(abfd)->vma, obj_bsssec(abfd)->alignment_power)
== obj_datasec(abfd)->vma + obj_datasec(abfd)->_raw_size)
execp->a_bss = (data_pad > obj_bsssec(abfd)->_raw_size) ? 0 :
obj_bsssec(abfd)->_raw_size - data_pad;
else
execp->a_bss = obj_bsssec(abfd)->_raw_size;
}
static void