diff options
author | Alan Modra <amodra@gmail.com> | 2005-11-18 04:12:27 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-11-18 04:12:27 +0000 |
commit | 94b50910fb44b8b019b32dba42a22ff2f8fcf6be (patch) | |
tree | 65a6f03533b0abb36eb9e54f8350072e44c2c867 /ld/ldlang.c | |
parent | d97a892405988f4cdb131805eb8b96987dff4892 (diff) | |
download | gdb-94b50910fb44b8b019b32dba42a22ff2f8fcf6be.zip gdb-94b50910fb44b8b019b32dba42a22ff2f8fcf6be.tar.gz gdb-94b50910fb44b8b019b32dba42a22ff2f8fcf6be.tar.bz2 |
* ldlang.c (lang_size_sections_1): Revert 2005-11-16 functional
changes to section alignment.
* ldmisc.c (vfinfo): Handle %ld and %lu.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 6972b50..cba7179 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -4137,7 +4137,7 @@ lang_size_sections_1 } else { - bfd_vma savedot; + int align; if (os->addr_tree == NULL) { @@ -4188,20 +4188,25 @@ lang_size_sections_1 } newdot = os->region->current; + align = os->bfd_section->alignment_power; } + else + align = os->section_alignment; /* Align to what the section needs. */ - savedot = newdot; - newdot = align_power (newdot, - os->bfd_section->alignment_power); + if (align > 0) + { + bfd_vma savedot = newdot; + newdot = align_power (newdot, align); - if (newdot != savedot - && (config.warn_section_align - || os->addr_tree != NULL) - && expld.phase != lang_mark_phase_enum) - einfo (_("%P: warning: changing start of section" - " %s by %lu bytes\n"), - os->name, (unsigned long) (newdot - savedot)); + if (newdot != savedot + && (config.warn_section_align + || os->addr_tree != NULL) + && expld.phase != lang_mark_phase_enum) + einfo (_("%P: warning: changing start of section" + " %s by %lu bytes\n"), + os->name, (unsigned long) (newdot - savedot)); + } bfd_set_section_vma (0, os->bfd_section, newdot); |