This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
__attribute aligned and objcopy
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 25 Sep 2003 12:37:34 +0200
- Subject: [ECOS] __attribute aligned and objcopy
This is driving me nuts, and I can't seem to find a solution
to this on the net.
I have a romfs image that I try to convert to a .o file using:
# how do I add a __attribute((aligned(4))__ to objcopy?
arm-elf-objcopy -B arm -I binary -O elf32-littlearm --rename-section
.data=.rodata1 $*.rawdata $(OUTPUT)/$*_raw.o
This is used to mount a ROMFS:
extern "C"
{
extern const cyg_uint8 _binary___rom_rawdata_start[];
}
// this is not aligned to 4 bytes, and hence it does not work
sprintf( address, "%p", _binary___rom_rawdata_start);
err = mount( address, "rom", "romfs" );
Øyvind
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss