Skip to content

Instantly share code, notes, and snippets.

@huangxianxia
huangxianxia / debugging_kernel.txt
Created January 23, 2025 03:02 — forked from hngouveia01/debugging_kernel.txt
Debugging kernel code line by line with Qemu and GDB
We are going to use buildroot to download, configure and compile the kernel.
First, download and uncompress buildroot: https://buildroot.org/download.html
Go to the directory and:
make qemu_x86_defconfig
make menuconfig
@huangxianxia
huangxianxia / All_about_static_and_dynamic_in_linux.md
Created November 26, 2023 14:32 — forked from reveng007/All_about_static_and_dynamic_in_linux.md
`Static` vs `Dynamic` library in `Linux`, `PIC`,`PIE`, `plt`, `got`, `Virtual vs Physical Addresses`:

Static vs Dynamic library in Linux, PIC, PIE, plt, got, Virtual vs Physical Addresses:


plt ---> procedure linkage table
logical addresses ---> virtual addresses
virtual address space (VAS) or address space ---> is the set of ranges of virtual addresses that an operating system makes available to a process.
memory management unit (MMU) or paged memory management unit (PMMU) ---> is a computer hardware unit having all memory references passed through itself, primarily performing the translation of virtual memory addresses to physical addresses.
Virtual address space randomization ----> Address space layout randomization ----> (ASLR)

NOTE:

@huangxianxia
huangxianxia / uart.c
Created March 21, 2023 02:26 — forked from ryankurte/uart.c
Simple unix serial implementation. This uses pthreads to receive and buffer incoming data for later use.
#include "uart.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <termios.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@huangxianxia
huangxianxia / Makefile
Created September 30, 2018 06:07 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@huangxianxia
huangxianxia / default.custom.yaml
Created November 6, 2017 15:00 — forked from lotem/default.custom.yaml
在Rime輸入方案選單中添加五筆、雙拼、粵拼、注音,保留你需要的
# default.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
schema_list:
- schema: luna_pinyin # 朙月拼音
- schema: luna_pinyin_simp # 朙月拼音 简化字模式

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key

灵魂选择自己的伴侣

灵魂选择自己的伴侣,少年选择自己的城市。异类需要与异类在一起。欢迎各位来参加开智部落成立典礼。今天,我要跟大家分享一位异类的故事。

我必须徒步穿越太阳系

从前有一位女孩子

从前有一位女孩子,十六岁时父亲去世,家庭陷入贫困。父亲因为感染肺结核而去世,而她自己也感染了肺结核。她一生备受病魔贫困摧残。窘迫时不得不出售自己的香水与内衣,换得稿纸。