file_to_object: use different alignments

This commit is contained in:
Jérôme Carretero 2014-09-08 17:36:49 -04:00
parent e8f4715c8d
commit cacc8c343b
1 changed files with 3 additions and 1 deletions

View File

@ -50,8 +50,10 @@ class file_to_object(Task.Task):
size = os.path.getsize(file)
if self.env.DEST_CPU in ('x86_64', 'ia', 'aarch64'):
unit = 'quad'
align = 8
elif self.env.DEST_CPU in ('x86','arm', 'thumb', 'm68k'):
unit = 'long'
align = 4
else:
raise Errors.WafError("Unsupported DEST_CPU, please report bug!")
@ -71,7 +73,7 @@ class file_to_object(Task.Task):
%(name)s_start:
.incbin "%(file)s"
%(name)s_end:
.align 64
.align %(align)d
%(name)s_size:
.%(unit)s 0x%(size)x
""" % locals())