mirror of https://gitlab.com/ita1024/waf.git
file_to_object: use different alignments
This commit is contained in:
parent
e8f4715c8d
commit
cacc8c343b
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue