Compare commits
5 Commits
baddea7f57
...
v0.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 24b0f6b7e4 | |||
| e77c3fdee6 | |||
| 383b956bc0 | |||
| 5fad15305a | |||
| ad91fb36a5 |
@@ -24,8 +24,7 @@ repos:
|
|||||||
entry: '^#define SHOW_MEMORY 1$'
|
entry: '^#define SHOW_MEMORY 1$'
|
||||||
language: pygrep
|
language: pygrep
|
||||||
types: [c++]
|
types: [c++]
|
||||||
- repo: https://github.com/koalaman/shellcheck-precommit
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||||
rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # frozen: v0.10.0
|
rev: a23f6b85d0fdd5bb9d564e2579e678033debbdff # frozen: v0.10.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: shellcheck
|
- id: shellcheck
|
||||||
# args: ["--severity=warning"] # Optionally only show errors and warnings
|
|
||||||
@@ -136,7 +136,8 @@ else()
|
|||||||
TARGET ${PROJECT_NAME}-static
|
TARGET ${PROJECT_NAME}-static
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND
|
COMMAND
|
||||||
${CMAKE_OBJCOPY} --keep-global-symbols=${CMAKE_SOURCE_DIR}/symbols.txt
|
${CMAKE_OBJCOPY}
|
||||||
|
--keep-global-symbols=${CMAKE_SOURCE_DIR}/symbol-exports.txt
|
||||||
$<TARGET_FILE:${PROJECT_NAME}-static> || echo
|
$<TARGET_FILE:${PROJECT_NAME}-static> || echo
|
||||||
"Proceeding with all symbols global in static library")
|
"Proceeding with all symbols global in static library")
|
||||||
endif()
|
endif()
|
||||||
@@ -301,8 +302,12 @@ if(BUILD_TESTING)
|
|||||||
set(symbol_imports ${CMAKE_SOURCE_DIR}/apple-symbol-imports.txt)
|
set(symbol_imports ${CMAKE_SOURCE_DIR}/apple-symbol-imports.txt)
|
||||||
else()
|
else()
|
||||||
set(symbol_exports ${CMAKE_SOURCE_DIR}/symbol-exports.txt)
|
set(symbol_exports ${CMAKE_SOURCE_DIR}/symbol-exports.txt)
|
||||||
|
if(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
|
||||||
|
set(symbol_imports ${CMAKE_SOURCE_DIR}/aarch64-symbol-imports.txt)
|
||||||
|
else()
|
||||||
set(symbol_imports ${CMAKE_SOURCE_DIR}/symbol-imports.txt)
|
set(symbol_imports ${CMAKE_SOURCE_DIR}/symbol-imports.txt)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
add_test(
|
add_test(
|
||||||
NAME conflict_set_shared_symbols
|
NAME conflict_set_shared_symbols
|
||||||
COMMAND
|
COMMAND
|
||||||
@@ -341,6 +346,12 @@ set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
|
|||||||
|
|
||||||
# deb
|
# deb
|
||||||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
||||||
|
# see *-imports.txt - dependency versions need to be synced with symbol versions
|
||||||
|
if(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.17)")
|
||||||
|
else()
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.14)")
|
||||||
|
endif()
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
|
|||||||
8
aarch64-symbol-imports.txt
Normal file
8
aarch64-symbol-imports.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
__stack_chk_fail@GLIBC_2.17
|
||||||
|
__stack_chk_guard@GLIBC_2.17
|
||||||
|
abort@GLIBC_2.17
|
||||||
|
free@GLIBC_2.17
|
||||||
|
malloc@GLIBC_2.17
|
||||||
|
memcpy@GLIBC_2.17
|
||||||
|
memmove@GLIBC_2.17
|
||||||
|
memset@GLIBC_2.17
|
||||||
9
symbol-imports.txt
Normal file
9
symbol-imports.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
_GLOBAL_OFFSET_TABLE_
|
||||||
|
__stack_chk_fail@GLIBC_2.4
|
||||||
|
__tls_get_addr@GLIBC_2.3
|
||||||
|
abort@GLIBC_2.2.5
|
||||||
|
free@GLIBC_2.2.5
|
||||||
|
malloc@GLIBC_2.2.5
|
||||||
|
memcpy@GLIBC_2.14
|
||||||
|
memmove@GLIBC_2.2.5
|
||||||
|
memset@GLIBC_2.2.5
|
||||||
@@ -7,7 +7,7 @@ set -euo pipefail
|
|||||||
diff -u <(sort < "$2") <(nm "$1" | grep " T " | cut -f3 -d " " | sort)
|
diff -u <(sort < "$2") <(nm "$1" | grep " T " | cut -f3 -d " " | sort)
|
||||||
ec=0
|
ec=0
|
||||||
for symbol in $(nm "$1" | grep " U " | sed 's/ U //') ; do
|
for symbol in $(nm "$1" | grep " U " | sed 's/ U //') ; do
|
||||||
if ! grep "$symbol" "$3" > /dev/null ; then
|
if ! grep --fixed-strings "$symbol" "$3" > /dev/null ; then
|
||||||
echo "Imported symbol $symbol not present in $3"
|
echo "Imported symbol $symbol not present in $3"
|
||||||
ec=1
|
ec=1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user