dwarf: add tombstone variations (#16)

Different linkers use different values for the tombstones.
This commit is contained in:
Philip Craig
2024-09-11 11:58:24 +10:00
committed by GitHub
parent 7651ef6c5b
commit 76d453e88c
9 changed files with 24 additions and 0 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+14
View File
@@ -0,0 +1,14 @@
// Source: https://reviews.llvm.org/D84825#2183197
__attribute__((noinline)) void f1() { }
void f2() {
int i = 3;
f1();
i = 7;
f1();
}
int main() {
int i = 3;
f1();
i = 7;
f1();
}
+10
View File
@@ -0,0 +1,10 @@
CFLAGS="-fdebug-prefix-map=`pwd`=/object/testfiles/dwarf -ffunction-sections -Wl,-gc-sections -O3 -gdwarf-4"
g++-13 $CFLAGS tombstone.cpp -o tombstone-loc-0 -fuse-ld=bfd
g++-13 $CFLAGS tombstone.cpp -o tombstone-loc-addend -fuse-ld=gold
g++-13 $CFLAGS tombstone.cpp -o tombstone-loc-1 -fuse-ld=lld -B /usr/lib/llvm-16/bin
g++-13 $CFLAGS tombstone.cpp -o tombstone-loc-max -fuse-ld=lld -B /usr/lib/llvm-16/bin -z dead-reloc-in-nonalloc='.debug_*=0xffffffffffffffff' -z dead-reloc-in-nonalloc=.debug_loc=0xfffffffffffffffe -z dead-reloc-in-nonalloc=.debug_ranges=0xfffffffffffffffe
CFLAGS="-fdebug-prefix-map=`pwd`=/object/testfiles/dwarf -ffunction-sections -Wl,-gc-sections -O3 -gdwarf-5"
g++-13 $CFLAGS tombstone.cpp -o tombstone-loclists-0 -fuse-ld=bfd
g++-13 $CFLAGS tombstone.cpp -o tombstone-loclists-addend -fuse-ld=gold
g++-13 $CFLAGS tombstone.cpp -o tombstone-loclists-max -fuse-ld=lld -B /usr/lib/llvm-16/bin -z dead-reloc-in-nonalloc='.debug_*=0xffffffffffffffff' -z dead-reloc-in-nonalloc=.debug_loc=0xfffffffffffffffe -z dead-reloc-in-nonalloc=.debug_ranges=0xfffffffffffffffe