This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Aligment of data in .text and .data section (Intel/Linux)
- To: binutils at sources dot redhat dot com
- Subject: Aligment of data in .text and .data section (Intel/Linux)
- From: Frank Klemm <pfk at fuchs dot offl dot uni-jena dot de>
- Date: Tue, 31 Jul 2001 17:16:06 +0200
- >Received: (from pfk@localhost)by fuchs.offl.uni-jena.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id RAA01786for binutils@sources.redhat.com; Tue, 31 Jul 2001 17:16:06 +0200
I need something like:
--------- nasm ---------------------------------------
segment .data align=1
db 0x8B, 0x44, 0x24
db 4
db 0xF7, 0xD8
------------------------------------------------------
The following is not equivalent
--------- gas -----------------------------------------
.data
.byte 0x8B, 0x44, 0x24
.byte 4
.byte 0xF7, 0xD8
--------------------------------------------------------
It aligns the data to a boundery of 4.
If I name the segemnt different, it works, but I have a lot of other
problems:
--------- gas -------------------------------------------
.section "noname"
.byte 0x8B, 0x44, 0x24
.byte 4
.byte 0xF7, 0xD8
---------------------------------------------------------
How can I EXPLICITELY select an section alignment without patching the *.o
files? Automatics are fine, I only need a switch to turn them of.
A constructed sample follows. I don't want to post the whole project
and the explanation.
--
Frank Klemm
example.zip