aboutsummaryrefslogtreecommitdiff
path: root/blobheader
blob: c1882050b7fe1e85c18f5c7cc069275e3d5ce47f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
source="$1"
symbol_base="$(echo "$source" | tr '[:punct:]' '_')"
cat << EOF
#pragma once
// NOTE: THIS FILE IS GENERATED, DO NOT EDIT
#include <stddef.h>

extern char _binary_${symbol_base}_start;
extern char _binary_${symbol_base}_end;

#define ${symbol_base} ((const char* const)(&_binary_${symbol_base}_start))
#define ${symbol_base}_size ((size_t)(&_binary_${symbol_base}_end - &_binary_${symbol_base}_start))

EOF