Compare commits
7 Commits
v1.0.0-rc3
...
f964ef7b60
Author | SHA1 | Date | |
---|---|---|---|
f964ef7b60 | |||
dd05449f36 | |||
3ff626134e | |||
29fdc841b7 | |||
dc30188593 | |||
2bea5d288c | |||
8a0226a5ea |
2
3rdparty/libfort
vendored
2
3rdparty/libfort
vendored
Submodule 3rdparty/libfort updated: 41237162a9...5a8f9312bd
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.5...3.18)
|
||||
|
||||
project(patchelfcrc LANGUAGES C)
|
||||
|
||||
@@ -28,12 +28,23 @@ pkg_check_modules(ELF REQUIRED libelf)
|
||||
find_package(Doxygen)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
|
||||
add_subdirectory(man)
|
||||
|
||||
aux_source_directory("src" CFILES)
|
||||
|
||||
set(GEN_HEADER_PATH "${CMAKE_CURRENT_BINARY_DIR}/include/generated")
|
||||
|
||||
|
||||
if (DEFINED NO_VERSION_INFO)
|
||||
add_custom_target(
|
||||
version-header
|
||||
COMMAND
|
||||
mkdir -p ${GEN_HEADER_PATH} && bash "${CMAKE_CURRENT_SOURCE_DIR}/gen_version_header.sh" "${GEN_HEADER_PATH}/version.h" "dummy"
|
||||
WORKING_DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Generating version header dummy"
|
||||
)
|
||||
set (NO_VERSION_INFO true)
|
||||
message("${BoldMagenta}No Version Information will be built${ColorReset}")
|
||||
else(DEFINED NO_VERSION_INFO)
|
||||
add_custom_target(
|
||||
version-header
|
||||
COMMAND
|
||||
@@ -42,6 +53,8 @@ add_custom_target(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Generating version header"
|
||||
)
|
||||
add_subdirectory(man)
|
||||
endif(DEFINED NO_VERSION_INFO)
|
||||
|
||||
add_custom_target(schema-header DEPENDS "${GEN_HEADER_PATH}/schema-blob.h")
|
||||
add_custom_command(
|
||||
@@ -66,9 +79,10 @@ target_link_directories(${PROJECT_NAME} PRIVATE ${ELF_LIBRARY_DIRS} ${LIBXML2_LI
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${ELF_INCLUDE_DIRS})
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/include")
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE "include")
|
||||
add_dependencies(${PROJECT_NAME} version-header schema-header)
|
||||
add_dependencies(${PROJECT_NAME} schema-header)
|
||||
add_dependencies(${PROJECT_NAME} version-header)
|
||||
|
||||
if (DOXYGEN_FOUND)
|
||||
if (DOXYGEN_FOUND AND (NOT (DEFINED NO_VERSION_INFO)))
|
||||
set(DOXYFILE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in")
|
||||
set(DOXYFILE_DEST "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
|
||||
configure_file(${DOXYFILE_SRC} ${DOXYFILE_DEST} @ONLY)
|
||||
@@ -87,7 +101,7 @@ if (DOXYGEN_FOUND)
|
||||
WORKING_DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
else (DOXYGEN_FOUND)
|
||||
else (DOXYGEN_FOUND AND (NOT (DEFINED NO_VERSION_INFO)))
|
||||
message("${BoldMagenta}Doxygen needs to be installed to generate the doxygen documentation${ColorReset}")
|
||||
message("${BoldMagenta}doxygen target will not be available${ColorReset}")
|
||||
endif (DOXYGEN_FOUND)
|
||||
endif (DOXYGEN_FOUND AND (NOT (DEFINED NO_VERSION_INFO)))
|
||||
|
@@ -4,7 +4,12 @@ if [[ -z $1 ]]; then
|
||||
exit -1;
|
||||
fi
|
||||
|
||||
ver=`git describe --tags --always --dirty`
|
||||
if [[ "$2" == "dummy" ]]; then
|
||||
ver="v0.0.0-undefined"
|
||||
else
|
||||
ver=`git describe --tags --always --dirty`
|
||||
fi
|
||||
|
||||
echo "#ifndef _VERSION_GENERATED_H_" > $1
|
||||
echo "#define _VERSION_GENERATED_H_" >> $1
|
||||
echo "#define GIT_VERSION_STRING \"$ver\"" >> $1
|
||||
|
Submodule linklist-lib updated: c20b5c2528...fdd99bad48
@@ -61,7 +61,7 @@
|
||||
: Export the calculated files to an XML file *XMLFILE*.
|
||||
|
||||
**--import**=*XMLFILE*
|
||||
: Import the CRCs from an XML file *XMLFILE* and do not caclulate anything in the given *ELF*
|
||||
: Import the CRCs from an XML file *XMLFILE* and do not calculate anything in the given *ELF*
|
||||
|
||||
**--help**, **-h**, **-?**
|
||||
: Print help.
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
**patchelfcrc** -l -g word --start-magic=0x12345678 --end-magic=0x8754321 -p crc-32-mpeg -f bare -O .outputsection -S .text executable.elf
|
||||
: Calculate the CRC over *.text* section and place the result in the *.outputsection* section.
|
||||
The output sections start and end are checked for the given magic numbers in order to assure correct memory layout.
|
||||
The output sections start and end are checked for the given magic numbers in order to ensure correct memory layout.
|
||||
*CRC-32-MPEG* is used as CRC algorithm.
|
||||
The memory is interpreted as *little endian* and the CRC calculation granularity is a 32 bit *word*.
|
||||
|
||||
|
Reference in New Issue
Block a user