[llvm] [llvm-objcopy] Support SREC output format (PR #75874)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 01:09:04 PST 2023


================
@@ -0,0 +1,11 @@
+# RUN: yaml2obj %p/Inputs/srec-elf-sections.yaml -o %t
+# RUN: llvm-objcopy -O srec %t - | FileCheck %s
+
+# The record type for the header should be S0 with a 2 byte address
+# of 0. For an output file named "-" the header data field should contain "2D"
+# The byte count field should therefore have a value of 4: 2 bytes for address,
+# 1 byte for output file and 1 byte for checksum
+CHECK: S00400002DCE
+CHECK-EMPTY:
+
+# FIXME: write the rest of the records
----------------
MaskRay wrote:

need a `\n` at file end

https://github.com/llvm/llvm-project/pull/75874


More information about the llvm-commits mailing list