aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sparc.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-05-19 19:44:02 +0000
committerIan Lance Taylor <ian@airs.com>1994-05-19 19:44:02 +0000
commitf9c57637e42d17078adb2b1cb544d43426cda697 (patch)
treef5fe5e2254dca3d8dab8b5d6e1dfd4e6955ec71e /gas/config/tc-sparc.c
parent2a9fa50cd8ae5dc1e99056c9683bece549e0b68f (diff)
downloadgdb-f9c57637e42d17078adb2b1cb544d43426cda697.zip
gdb-f9c57637e42d17078adb2b1cb544d43426cda697.tar.gz
gdb-f9c57637e42d17078adb2b1cb544d43426cda697.tar.bz2
* config/tc-sparc.c (md_section_align): Don't change the size if
OBJ_ELF.
Diffstat (limited to 'gas/config/tc-sparc.c')
-rw-r--r--gas/config/tc-sparc.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 7574e16..26e6643 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -2320,11 +2320,18 @@ md_section_align (segment, size)
segT segment;
valueT size;
{
-#ifdef OBJ_AOUT
- /* Round all sects to multiple of 8 */
- size = (size + 7) & (valueT) ~7;
-#endif
+#ifndef OBJ_ELF
+ /* This is not right for ELF; a.out wants it, and COFF will force
+ the alignment anyways. */
+ valueT align = (valueT) 1 << (valueT) (stdoutput->xvec->align_power_min);
+ valueT newsize;
+ /* turn alignment value into a mask */
+ align--;
+ newsize = (size + align) & ~align;
+ return newsize;
+#else
return size;
+#endif
}
/* Exactly what point is a PC-relative offset relative TO?