diff options
author | Thiemo Seufer <ths@networkno.de> | 2006-08-01 07:58:22 +0000 |
---|---|---|
committer | Thiemo Seufer <ths@networkno.de> | 2006-08-01 07:58:22 +0000 |
commit | 6f8425a67513ada4562b69115dc12b4fef82d168 (patch) | |
tree | 3288bb8225794dfef07a6388573cc66b9297b057 /gas | |
parent | 27d52dd3e0e6ca53e0dd904a74739e7dacc86acc (diff) | |
download | binutils-redhat-6f8425a67513ada4562b69115dc12b4fef82d168.tar.gz |
* config/tc-mips.c (md_section_align): Check ELF-ness at runtime.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 21 |
2 files changed, 15 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 959a9e6718..c6ae3ed3ad 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2006-08-01 Thiemo Seufer <ths@mips.com> + * config/tc-mips.c (md_section_align): Check ELF-ness at runtime. + +2006-08-01 Thiemo Seufer <ths@mips.com> + * config/tc-mips.c (macro_build_lui): Fix comment formatting. (md_apply_fix): Likewise. Unify handling of BFD_RELOC_RVA, BFD_RELOC_32 and BFD_RELOC_16. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index e28d07973e..e891454308 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -13042,16 +13042,17 @@ md_section_align (asection *seg, valueT addr) { int align = bfd_get_section_alignment (stdoutput, seg); -#ifdef OBJ_ELF - /* We don't need to align ELF sections to the full alignment. - However, Irix 5 may prefer that we align them at least to a 16 - byte boundary. We don't bother to align the sections if we are - targeted for an embedded system. */ - if (strcmp (TARGET_OS, "elf") == 0) - return addr; - if (align > 4) - align = 4; -#endif + if (IS_ELF) + { + /* We don't need to align ELF sections to the full alignment. + However, Irix 5 may prefer that we align them at least to a 16 + byte boundary. We don't bother to align the sections if we + are targeted for an embedded system. */ + if (strcmp (TARGET_OS, "elf") == 0) + return addr; + if (align > 4) + align = 4; + } return ((addr + (1 << align) - 1) & (-1 << align)); } |