rename clang folder, add clang before main scripts, update guide
parent
68e02cc9a6
commit
5c44c148cd
28
GUIDE.txt
28
GUIDE.txt
|
@ -7,20 +7,24 @@ layer, plugin, and main program.
|
|||
|
||||
The examples:
|
||||
|
||||
*_linking - Concrete examples for each operating system I have investigated
|
||||
showing how to setup and use various types of dynamic linking. In
|
||||
these the "base" layer goes through load-time linking, the
|
||||
"plugin" layer goes through run-time linking, and the "main" layer
|
||||
acts as the executable that must bind it all together.
|
||||
*_linking - Concrete examples for each operating system showing how to
|
||||
setup and use various types of dynamic linking. In these
|
||||
the "base" layer uses load-time linking, the "plugin" layer uses
|
||||
run-time linking, and the "main" layer acts as the executable that
|
||||
binds it all together into a process.
|
||||
|
||||
clang_linking - Build scripts that build the *_linking examples with clang.
|
||||
Clang does not require changes to the source in either case.
|
||||
The build lines require some modification on Windows.
|
||||
On Linux clang can be directly swapped out for gcc.
|
||||
*_before_main - Concrete examples for each operating system showing how to
|
||||
create a function that runs before main.
|
||||
|
||||
clang - Build scripts that build the concrete examples with clang instead of
|
||||
cl or gcc. In each case clang can build the same source. In some cases
|
||||
clang on windows can even build the linux source. The build lines for
|
||||
clang that replace cl require some modification. The build lines for
|
||||
clang that replace gcc have the exact same flags and inputs.
|
||||
|
||||
xlist - My prefered solution to the problem posed in the investigation which
|
||||
relies only on run-time linking. It uses an xlist to manage the
|
||||
maintenance burden of run-time linking, and a basic outline of the
|
||||
abstracted form of each layer.
|
||||
relies only on run-time linking & before-main execution. It uses an
|
||||
xlist to manage the maintenance burden of run-time linking, and a
|
||||
basic outline of the abstracted form of the base layer.
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Path setup
|
||||
cd ../linux_before_main
|
||||
src=$PWD
|
||||
cd ..
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
|
||||
# Build
|
||||
clang -fvisibility=hidden $src/linux_before_main.c -o linux_before_main
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
@echo off
|
||||
|
||||
REM: Path setup
|
||||
|
||||
cd ..\win32_before_main
|
||||
SET src=%cd%
|
||||
cd ..
|
||||
if not exist "build\" mkdir build
|
||||
cd build
|
||||
|
||||
|
||||
|
||||
REM: Build
|
||||
clang %src%\win32_before_main.c
|
Loading…
Reference in New Issue