it wasn't feasible without knowledge of the size which I couldn't find without reading the elf file. Moreover, it wasn't really required and was halting progress
20 lines
294 B
CMake
20 lines
294 B
CMake
project(Minimal)
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
|
|
set(CMAKE_BUILD_TYPE "Debug")
|
|
add_compile_options(-g -ffunction-sections -fdata-sections)
|
|
|
|
add_executable(minimal
|
|
minimal.cpp
|
|
)
|
|
|
|
add_library(mini SHARED
|
|
minimal_lib.cpp
|
|
minimal_lib.h
|
|
|
|
)
|
|
|
|
target_link_libraries(minimal mini hiload)
|