Aligment of data in .text and .data section (Intel/Linux)
Frank Klemm
pfk@fuchs.offl.uni-jena.de
Tue Jul 31 08:17:00 GMT 2001
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
More information about the Binutils
mailing list