diff options
author | Timothy Wall <twall@alum.mit.edu> | 2000-02-03 18:20:23 +0000 |
---|---|---|
committer | Timothy Wall <twall@alum.mit.edu> | 2000-02-03 18:20:23 +0000 |
commit | bea9907b2a19c3ed94595a88003b8900938b0ad9 (patch) | |
tree | b2652f586bd91490ee6f658b40744dee34f5d96c /gas/config/obj-coff.c | |
parent | 940b2b788ccdda311ff16e18d79e68d0c7928842 (diff) | |
download | gdb-bea9907b2a19c3ed94595a88003b8900938b0ad9.zip gdb-bea9907b2a19c3ed94595a88003b8900938b0ad9.tar.gz gdb-bea9907b2a19c3ed94595a88003b8900938b0ad9.tar.bz2 |
octets vs bytes changes for GAS
Diffstat (limited to 'gas/config/obj-coff.c')
-rw-r--r-- | gas/config/obj-coff.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index eceda5a..f361b43 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -1269,7 +1269,7 @@ coff_frob_symbol (symp, punt) for (; i > 0; i--) { if (lptr->frag) - lptr->l.u.offset += lptr->frag->fr_address; + lptr->l.u.offset += lptr->frag->fr_address / OCTETS_PER_BYTE; l[i] = lptr->l; lptr = lptr->next; } @@ -1453,25 +1453,32 @@ coff_frob_section (sec) char *p; fragS *fragp; bfd_vma size, n_entries, mask; + bfd_vma align_power = (bfd_vma)sec->alignment_power + OCTETS_PER_BYTE_POWER; /* The COFF back end in BFD requires that all section sizes be - rounded up to multiples of the corresponding section alignments. - Seems kinda silly to me, but that's the way it is. */ + rounded up to multiples of the corresponding section alignments, + supposedly because standard COFF has no other way of encoding alignment + for sections. If your COFF flavor has a different way of encoding + section alignment, then skip this step, as TICOFF does. */ size = bfd_get_section_size_before_reloc (sec); - mask = ((bfd_vma) 1 << (bfd_vma) sec->alignment_power) - 1; + mask = ((bfd_vma) 1 << align_power) - 1; +#if !defined(TICOFF) if (size & mask) { size = (size + mask) & ~mask; bfd_set_section_size (stdoutput, sec, size); } +#endif /* If the section size is non-zero, the section symbol needs an aux entry associated with it, indicating the size. We don't know all the values yet; coff_frob_symbol will fill them in later. */ +#ifndef TICOFF if (size != 0 || sec == text_section || sec == data_section || sec == bss_section) +#endif { symbolS *secsym = section_symbol (sec); |