elf: add CREL object file (#26)

This commit is contained in:
Philip Craig
2025-06-29 18:22:23 +10:00
committed by GitHub
parent 7d8221390c
commit 5b121e59e3
2 changed files with 2 additions and 1 deletions
BIN
View File
Binary file not shown.
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/sh
gcc -c base.c -o base.o
gcc base.c -o base -Xlinker --hash-style=both
objcopy --only-keep-debug base base.debug
llvm-objcopy-6.0 --strip-sections base base.strip
x86_64-linux-gnu-gcc-11 -fcf-protection=full -c base.c -o base-x86_64-gnu-properties.o
aarch64-linux-gnu-gcc -c base.c -o base-aarch64.o
@@ -19,4 +20,4 @@ objcopy --compress-debug-sections=zstd base-debug.o base-debug-zstd.o
gcc -shared -fPIC -o libbase.so base.c -Wl,--default-symver
x86_64-linux-gnu-gcc-13 base.c -o base-relr-x86_64 -Wl,-z,pack-relative-relocs
i686-linux-gnu-gcc-13 base.c -o base-relr-i686 -Wl,-z,pack-relative-relocs
objcopy --only-keep-debug base base.debug
clang-21 -c base.c -o base-crel.o -Wa,--crel,--allow-experimental-crel