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 | b4c71f5629b187808be5a73ed5fa2220a9a189c1 (patch) | |
tree | 213f0fd26bb2ac2cf80cfa32dec5d364389f3cc6 /gas/config/tc-mips.c | |
parent | 54f4ddb3c62a8d38699b757a57984034045ab958 (diff) | |
download | gdb-b4c71f5629b187808be5a73ed5fa2220a9a189c1.zip gdb-b4c71f5629b187808be5a73ed5fa2220a9a189c1.tar.gz gdb-b4c71f5629b187808be5a73ed5fa2220a9a189c1.tar.bz2 |
* config/tc-mips.c (md_section_align): Check ELF-ness at runtime.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index e28d079..e891454 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)); } |