According to the specifications of the C and the C++ programming languages, implementations of C and C++ can be classified into hosted ones and freestanding ones, depending on whether the implementation has access to functionalities that require operating system (OS) support, such as memory allocation and multi-threading. A hosted implementation has full access to these functionalities, and can provide the full range of features required by the language. A freestanding implementation, on the other hand, does not have access to any functionality that requires support from the execution environment. Such implementations are only required to provide a subset of the language features. Freestanding implementations are important when developing operating systems, the standard C library,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MacBook Lid Angle Sensor Diagnostic Script | |
# This script helps identify the lid angle sensor on different MacBook models | |
echo "==============================================" | |
echo "MacBook Lid Angle Sensor Diagnostic Tool" | |
echo "==============================================" | |
echo "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# This program downloads and builds several compression utilities, benchmarks their compression and decompression | |
# performance on a specific input file including memory consumption, and finally generates HTML charts. | |
require 'benchmark' | |
require 'digest' | |
require 'etc' | |
require 'fileutils' | |
require 'json' | |
require 'net/http' | |
require 'optparse' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RUN: %llvmbuildpath/bin/clang --sysroot=%libcpath --target="riscv32-none-elf" -menable-experimental-extensions -mabi="ilp32" -march="rv32imxsimple0p1" -O3 -S -o - %s | FileCheck %s | |
// CHECK: main: | |
// CHECK-DAG: SIMPLE.mac [[RD1:[as][0-9]+]], [[RS1:[as][0-9]+]], [[RS2:[as][0-9]+]] | |
// CHECK: call printf | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> |
namerefs (introduced in bash 4.0) act as aliases for other variables
var=meow
declare -n ref=var
echo $ref # prints meow
ref=moo
echo $var # prints moo
"%" means not tested by me personally.
- syscall.sh: Linux ARMv7/AArch64/x86/x86_64 ABI and syscall tables
- %C8051F34x_Glitch: silicon glitching tutorial
- Binary Ninja: interactive native code disassembler, decompiler, and debugger
- BinExport: companion tool for BinDiff
- when building, replace the BN SDK it downloads with a path to BN API library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# SPDX-License-Identifier: BSD-3-Clause | |
# Copyright (c) 2023, Alex Taradov <[email protected]>. All rights reserved. | |
#------------------------------------------------------------------------------ | |
core_debug = { | |
'name': 'CD', | |
'description': 'Core Debug', | |
'base': 0xe000edf0, | |
'source': 'DDI0403D_arm_architecture_v7m_reference_manual.pdf', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
itm = { | |
'name': 'ITM', | |
'description': 'Instrumentation Trace Macrocell', | |
'base': 0xe0000000, | |
'source': '', | |
'registers': [ | |
('PORT', 0x000, 'RW', 'ITM Stimulus Port', (32, 4)), | |
('TER', 0xe00, 'RW', 'ITM Trace Enable Register'), | |
('TPR', 0xe40, 'RW', 'ITM Trace Privilege Register'), | |
('TCR', 0xe80, 'RW', 'ITM Trace Control Register', [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compile with whatever then run PractRand: | |
// ./test | RNG_test stdin64 -tlmin 256KB -tf 2 -tlmax 512GB -seed 0 | |
//**************************************************************************** | |
// verbatim from: https://prng.di.unimi.it/xoroshiro128plus.c | |
/* Written in 2016-2018 by David Blackman and Sebastiano Vigna ([email protected]) | |
To the extent possible under law, the author has dedicated all copyright | |
and related and neighboring rights to this software to the public domain |
Disclaimer: ChatGPT generated document.
Stack unwinding is the process of cleaning up the stack when an exception is thrown. It involves destructing local variables and calling cleanup functions while propagating the exception up the call stack until a matching catch
block is found.
NewerOlder