This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Aligment of data in .text and .data section (Intel/Linux)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]