mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
18 lines
675 B
ArmAsm
18 lines
675 B
ArmAsm
|
// Embed a binary file into an executable.
|
||
|
|
||
|
// The variable BINARY_FILE_NAME is the actual name of the file to include
|
||
|
// The variable SYMBOL_NAME is the "normalized" name of the symbol, with
|
||
|
// symbols like `-`, `.`, and `/` replaced with `_`. This is to match how
|
||
|
// objcopy rewrites symbol names, and matches the expectation in
|
||
|
// `base/common/getResource.cpp`
|
||
|
|
||
|
.data
|
||
|
.global _binary_@SYMBOL_NAME@_start
|
||
|
_binary_@SYMBOL_NAME@_start:
|
||
|
.incbin "@BINARY_FILE_NAME@"
|
||
|
.global _binary_@SYMBOL_NAME@_end
|
||
|
_binary_@SYMBOL_NAME@_end:
|
||
|
.global _binary_@SYMBOL_NAME@_size
|
||
|
_binary_@SYMBOL_NAME@_size:
|
||
|
.quad _binary_@SYMBOL_NAME@_end - _binary_@SYMBOL_NAME@_start
|