diff mbox series

[FFmpeg-devel,GASPP] Implicitly start out in the text section for armasm

Message ID 20240403134709.3652978-1-martin@martin.st
State Accepted
Headers show
Series [FFmpeg-devel,GASPP] Implicitly start out in the text section for armasm | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch

Commit Message

Martin Storsjö April 3, 2024, 1:47 p.m. UTC
This fixes assembling files starting with bare symbol declarations,
without explicitly switching to .text first.
---
 gas-preprocessor.pl | 3 +++
 1 file changed, 3 insertions(+)

Comments

Henrik Gramner April 4, 2024, 2:57 p.m. UTC | #1
On Wed, Apr 3, 2024 at 3:47 PM Martin Storsjö <martin@martin.st> wrote:
>
> This fixes assembling files starting with bare symbol declarations,
> without explicitly switching to .text first.

lgtm.
diff mbox series

Patch

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 2880858..b66181a 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -289,6 +289,9 @@  my %aarch64_req_alias;
 if ($force_thumb) {
     parse_line(".thumb\n");
 }
+if ($as_type eq "armasm") {
+    parse_line(".text\n");
+}
 
 # pass 1: parse .macro
 # note that the handling of arguments is probably overly permissive vs. gas