The first portion of any ELF file is the ELF header. This generally provides offsets to other headers (program headers and section headers) within an ELF.
typedef struct {
unsigned char e_ident[EI_NIDENT];
uint16_t e_type;| #!/bin/bash | |
| # Generate patch set in git repo. With this script, you can easily obtain a | |
| # patchset that can be used for Linux kernel development. | |
| # | |
| # Copyright (c) 2022-2025 Rong Tao | |
| # | |
| set -e | |
| subject_prefix= | |
| downer_commit= |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <net/if.h> | |
| #include <net/ethernet.h> | |
| #include <netinet/in.h> | |
| #include <netinet/ip.h> | |
| #include <arpa/inet.h> | |
| #include <netpacket/packet.h> |
| #include <errno.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/ptrace.h> | |
| #include <sys/types.h> | |
| #include <unistd.h> | |
| struct elf { |
| #!/bin/sh | |
| # | |
| # Create a rootfs environment for chroot building. | |
| # | |
| # Requires | |
| # - OS installing CDROM at the current directory, | |
| # - the root authority. | |
| # | |
| # mount install cd |
| # How to sign your custom RPM package with GPG key | |
| # Step: 1 | |
| # Generate gpg key pair (public key and private key) | |
| # | |
| # You will be prompted with a series of questions about encryption. | |
| # Simply select the default values presented. You will also be asked | |
| # to create a Real Name, Email Address and Comment (comment optional). | |
| # | |
| # If you get the following response: |
| #!/bin/bash | |
| REPOSYNC_SCRIPTS_LIST=$(find -name reposync.sh) | |
| for script in $REPOSYNC_SCRIPTS_LIST | |
| do | |
| cd $(dirname $script) | |
| sh $(basename $script) | |
| cd - | |
| done |