diff options
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gas/write.c b/gas/write.c index 0dfca0c..9af1f80 100644 --- a/gas/write.c +++ b/gas/write.c @@ -579,7 +579,12 @@ size_seg (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED) x = bfd_set_section_flags (abfd, sec, flags); gas_assert (x); - newsize = md_section_align (sec, size); + /* If permitted, allow the backend to pad out the section + to some alignment boundary. */ + if (do_not_pad_sections_to_alignment) + newsize = size; + else + newsize = md_section_align (sec, size); x = bfd_set_section_size (abfd, sec, newsize); gas_assert (x); @@ -1696,7 +1701,7 @@ set_symtab (void) } /* Finish the subsegments. After every sub-segment, we fake an - ".align ...". This conforms to BSD4.2 brane-damage. We then fake + ".align ...". This conforms to BSD4.2 brain-damage. We then fake ".fill 0" because that is the kind of frag that requires least thought. ".align" frags like to have a following frag since that makes calculating their intended length trivial. */ @@ -1708,6 +1713,7 @@ set_symtab (void) code-bearing sections. */ #define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \ (!(FRCHAIN)->frch_next && subseg_text_p (SEG) \ + && !do_not_pad_sections_to_alignment \ ? get_recorded_alignment (SEG) \ : 0) #else |