diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-05-16 19:15:25 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-05-16 19:15:25 +0200 |
commit | fe2d38b584e814ae6bb44e122ecec3d546976c8a (patch) | |
tree | 388a99988978e93b44e4f3ebca985944ec23660e | |
parent | 07b820f4575d2108b5675106d3ea16e83c168c22 (diff) |
see previous commit message
-rwxr-xr-x | blob | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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 |