From 2007c3bb38b46a799f8f523eed8aa2168630b4de Mon Sep 17 00:00:00 2001 From: Johann Date: Mon, 27 Jun 2011 11:38:26 -0400 Subject: [PATCH] respect alignment in arm asm files Conversion script was discarding alignment. Also, set default alignment to 4 bytes. Change-Id: I1e9cbbb8c142bdf93df4e9aaccf967ed43dff906 https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/789198 --- build/make/ads2gas.pl | 5 ++++- build/make/ads2gas_apple.pl | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/make/ads2gas.pl b/build/make/ads2gas.pl index efdfce7a1..be4658253 100755 --- a/build/make/ads2gas.pl +++ b/build/make/ads2gas.pl @@ -82,7 +82,10 @@ while () s/CODE([0-9][0-9])/.code $1/; # No AREA required - s/^\s*AREA.*$/.text/; + # But ALIGNs in AREA must be obeyed + s/^\s*AREA.*ALIGN=([0-9])$/.text\n.p2align $1/; + # If no ALIGN, strip the AREA and align to 4 bytes + s/^\s*AREA.*$/.text\n.p2align 2/; # DCD to .word # This one is for incoming symbols diff --git a/build/make/ads2gas_apple.pl b/build/make/ads2gas_apple.pl index 1b3039374..78f4a97f5 100755 --- a/build/make/ads2gas_apple.pl +++ b/build/make/ads2gas_apple.pl @@ -100,7 +100,10 @@ while () s/CODE([0-9][0-9])/.code $1/; # No AREA required - s/^\s*AREA.*$/.text/; + # But ALIGNs in AREA must be obeyed + s/^\s*AREA.*ALIGN=([0-9])$/.text\n.p2align $1/; + # If no ALIGN, strip the AREA and align to 4 bytes + s/^\s*AREA.*$/.text\n.p2align 2/; # DCD to .word # This one is for incoming symbols -- 2.50.1