http://www.cse.wustl.edu/~mdeters/seminar/fall2005/mi.html#basics
As we discussed in class, single inheritance leads to an object layoutwith base class data laid out before derived class data. So if classes A and B are defined as:
http://www.cse.wustl.edu/~mdeters/seminar/fall2005/mi.html#basics
As we discussed in class, single inheritance leads to an object layoutwith base class data laid out before derived class data. So if classes A and B are defined as:
# Copyright 2024, Peter Goodman. All rights reserved. | |
""" | |
This program approximately groups functions by their types, and then prints | |
out the grouped functions. | |
XREF: https://x.com/eatonphil/status/1821573274582823247 | |
""" | |
import argparse |
+- Grammar ---------------+ +-----------------------------------------------------+ | |
| | | Production | Nullable | FIRST | FOLLOW | | |
| S -> S S | |-------------------------+----------+-------+--------| | |
| S -> if E then S else S | | S' -> S $ | False | exit | | | |
| S -> if E then S | | | | if | | | |
| S -> exit when E | |-------------------------+----------+-------+--------| | |
+-------------------------+ | S -> S S | False | exit | $ | | |
| S -> if E then S else S | | if | exit | | |
| S -> if E then S | | | if | | |
| S -> exit when E | | | else | |
// Copyright 2020 Peter Goodman, all rights reserved. | |
#include <cassert> | |
#include <cstdint> | |
#include <cstddef> | |
#include <iostream> | |
#include <type_traits> | |
#include <vector> | |
template<typename IntegralType_, unsigned kNumBits_, unsigned kShift_> |
export CFLAGS="-fsanitize=address -ffunction-sections -fdata-sections -Wl,-dead_strip -Wl,-undefined,dynamic_lookup -Wno-unused-command-line-argument"
export CXXFLAGS="-fsanitize=address -ffunction-sections -fdata-sections -Wl,-dead_strip -Wl,-undefined,dynamic_lookup -Wno-unused-command-line-argument"
export CFLAGS="-fsanitize=address -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,--allow-multiple-definition"
export CXXFLAGS="-fsanitize=address -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,--allow-multiple-definition"
/path/to/remill-build/tools/anvill/anvill-decompile-json-9.0 --spec /tmp/slice.json --ir_out /dev/stderr |
clang --target=armv8-pc-linux-gnu -m64 -c /tmp/test.c -o /tmp/test.o |
cd ~/src
git clone [email protected]:trailofbits/cxx-common.git
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-pc-linux-gnu-elf" | |
%struct.Memory = type opaque | |
%struct.State = type { %struct.ArchState, [32 x %union.VectorReg], %struct.ArithFlags, %union.anon, %struct.Segments, %struct.AddressSpace, %struct.GPR, %struct.X87Stack, %struct.MMX, %struct.FPUStatusFlags, %union.anon, %union.FPU, %struct.SegmentCaches } | |
%struct.ArchState = type { i32, i32, %union.anon } | |
%union.VectorReg = type { %union.vec512_t } | |
%union.vec512_t = type { %struct.uint64v8_t } | |
%struct.uint64v8_t = type { [8 x i64] } | |
%struct.ArithFlags = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } |
0: 89 f8 mov eax,edi | |
2: 0f b7 4c 24 18 movzx ecx,WORD PTR [rsp+0x18] | |
7: 81 f9 00 80 00 00 cmp ecx,0x8000 | |
d: 0f 95 c1 setne cl | |
10: d3 e0 shl eax,cl | |
12: c3 ret |