mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-29 12:53:43 +08:00
Add padding to the last section when aligning it increases its size.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2000-07-12 Mark Elbrecht <snowball3@bigfoot.com>
|
||||||
|
|
||||||
|
* config/obj-coff.c (coff_frob_section): Add padding to the last
|
||||||
|
section when aligning it increases its size.
|
||||||
|
|
||||||
2000-07-11 Kazu Hirata <kazu@hxi.com>
|
2000-07-11 Kazu Hirata <kazu@hxi.com>
|
||||||
|
|
||||||
* config/tc-tic54x.c: Fix formatting.
|
* config/tc-tic54x.c: Fix formatting.
|
||||||
|
@ -1489,8 +1489,20 @@ coff_frob_section (sec)
|
|||||||
#if !defined(TICOFF)
|
#if !defined(TICOFF)
|
||||||
if (size & mask)
|
if (size & mask)
|
||||||
{
|
{
|
||||||
size = (size + mask) & ~mask;
|
bfd_vma new_size;
|
||||||
bfd_set_section_size (stdoutput, sec, size);
|
fragS *last;
|
||||||
|
|
||||||
|
new_size = (size + mask) & ~mask;
|
||||||
|
bfd_set_section_size (stdoutput, sec, new_size);
|
||||||
|
|
||||||
|
/* If the size had to be rounded up, add some padding in
|
||||||
|
the last non-empty frag. */
|
||||||
|
fragp = seg_info (sec)->frchainP->frch_root;
|
||||||
|
last = seg_info (sec)->frchainP->frch_last;
|
||||||
|
while (fragp->fr_next != last)
|
||||||
|
fragp = fragp->fr_next;
|
||||||
|
last->fr_address = size;
|
||||||
|
fragp->fr_offset += new_size - size;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user