aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-05-16 19:15:25 +0200
committerlonkaars <loek@pipeframe.xyz>2024-05-16 19:15:25 +0200
commitfe2d38b584e814ae6bb44e122ecec3d546976c8a (patch)
tree388a99988978e93b44e4f3ebca985944ec23660e
parent07b820f4575d2108b5675106d3ea16e83c168c22 (diff)
see previous commit message
-rwxr-xr-xblob11
1 files changed, 5 insertions, 6 deletions
diff --git a/blob b/blob
index e0f4b4c..601337d 100755
--- a/blob
+++ b/blob
@@ -1,13 +1,12 @@
#!/bin/sh
input="$1"
base="$2"
-symbol_base="$(echo "$base" | tr '[:punct:]' '_')"
# assembly (used to compile data with custom symbol name)
cat << EOF > "$base.s"
.section .rodata
-.global ${symbol_base}_head
-${symbol_base}_head:
+.global ${base}_head
+${base}_head:
.incbin "$input"
EOF
@@ -17,9 +16,9 @@ cat << EOF > "$base.h"
// NOTE: THIS FILE IS GENERATED, DO NOT EDIT
#include <stddef.h>
-extern const char ${symbol_base}_head;
-static const char* ${symbol_base} = &${symbol_base}_head;
-static const size_t ${symbol_base}_size = $(wc -c < "$input");
+extern const char ${base}_head;
+static const char* ${base} = &${base}_head;
+static const size_t ${base}_size = $(wc -c < "$input");
EOF