[ECOS] Switch to turn off data alignment in arm-elf-gcc

Lewin A.R.W. Edwards ledwards@digi-frame.com
Mon Jan 8 14:47:00 GMT 2001

I'm SURE this is an RTFM but I can't find this in the man page... what is 
the command-line switch to turn off structure alignment in arm-elf-gcc? For 
example in the following structure:

// Master Boot Record
typedef struct {
	unsigned char fill[0x1be];	// boot code
	PARTENTRY partitions[4];	// partition table
	unsigned char sig_55;		// 55h boot signature
	unsigned char sig_aa;		// AAh boot signature

arm-elf-gcc will try to align the PARTENTRY structure on a 4-byte boundary 
(0x1C0 offset). This is highly undesirable. I can work with 
on-disk-structures using offsets inside raw dump arrays, but it's much 
friendlier if I can use unions.

-- Lewin A.R.W. Edwards
Embedded Engineer, Digi-Frame Inc.
Tel (914) 937-4090 9am-6:30pm M-F ET

More information about the Ecos-discuss mailing list