[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/3207] New: Why do we need md_section_align?
From: |
hjl at lucon dot org |
Subject: |
[Bug gas/3207] New: Why do we need md_section_align? |
Date: |
14 Sep 2006 18:46:38 -0000 |
There are
@item md_section_align
@cindex md_section_align
GAS will call this function for each section at the end of the assembly, to
permit the CPU backend to adjust the alignment of a section. The function
must take two arguments, a @code{segT} for the section and a @code{valueT}
for the size of the section, and return a @code{valueT} for the rounded
size.
In config/tc-i386.c:
valueT
md_section_align (segment, size)
segT segment ATTRIBUTE_UNUSED;
valueT size;
{
#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
if (OUTPUT_FLAVOR == bfd_target_aout_flavour)
{
/* For a.out, force the section size to be aligned. If we don't do
this, BFD will align it for us, but it will not write out the
final bytes of the section. This may be a bug in BFD, but it is
easier to fix it here since that is how the other a.out targets
work. */
int align;
align = bfd_get_section_alignment (stdoutput, segment);
size = ((size + (1 << align) - 1) & ((valueT) -1 << align));
}
#endif
return size;
}
It looks like that md_section_align is used to work around a bug in BFD. Many
targets just return size without any problems. Do we really need it today?
--
Summary: Why do we need md_section_align?
Product: binutils
Version: 2.18 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gas
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: hjl at lucon dot org
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=3207
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug gas/3207] New: Why do we need md_section_align?,
hjl at lucon dot org <=