diff options
-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 |