* config/tc-mips.c (md_section_align): Check ELF-ness at runtime.
This commit is contained in:
parent
54f4ddb3c6
commit
b4c71f5629
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2006-08-01 Thiemo Seufer <ths@mips.com>
|
||||||
|
|
||||||
* config/tc-mips.c (macro_build_lui): Fix comment formatting.
|
* config/tc-mips.c (macro_build_lui): Fix comment formatting.
|
||||||
|
|
|
@ -13042,16 +13042,17 @@ md_section_align (asection *seg, valueT addr)
|
||||||
{
|
{
|
||||||
int align = bfd_get_section_alignment (stdoutput, seg);
|
int align = bfd_get_section_alignment (stdoutput, seg);
|
||||||
|
|
||||||
#ifdef OBJ_ELF
|
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
|
/* We don't need to align ELF sections to the full alignment.
|
||||||
byte boundary. We don't bother to align the sections if we are
|
However, Irix 5 may prefer that we align them at least to a 16
|
||||||
targeted for an embedded system. */
|
byte boundary. We don't bother to align the sections if we
|
||||||
if (strcmp (TARGET_OS, "elf") == 0)
|
are targeted for an embedded system. */
|
||||||
return addr;
|
if (strcmp (TARGET_OS, "elf") == 0)
|
||||||
if (align > 4)
|
return addr;
|
||||||
align = 4;
|
if (align > 4)
|
||||||
#endif
|
align = 4;
|
||||||
|
}
|
||||||
|
|
||||||
return ((addr + (1 << align) - 1) & (-1 << align));
|
return ((addr + (1 << align) - 1) & (-1 << align));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue