Skip to main content

Questions tagged [elf]

ELF stands for Executable and Linkable Format, a file format for files containing machine code. Use this tag for questions about the ELF format itself, or for questions which are specifically about reading/writing ELF files.

elf
-1 votes
0 answers
11 views

How to use `bpftrace` for tracing user-space Java functions on Android without recompiling system libraries?

I'm attempting to trace user-space Java function calls using bpftrace on an Android device, specifically within oat/odex files (a special type of ELF file) that contain pre-compiled code. I've been ...
CMZ's user avatar
  • 19
1 vote
0 answers
36 views

CMAKE error while building the application (No SOURCES given to target)

I am trying to build an application that will generate an .elf file. This build is done with the Hi-tech compiler and CMAKE environment. I have some .c source files, corresponding .h files, and ...
user2986042's user avatar
  • 1,166
0 votes
0 answers
34 views

Error cross compiling on windows 64 bit to x86 32bit with i368-gcc - "Warning: .type pseudo-op used outside of .def/.endef ignored."

I'm trying to make a simple os that uses the x86 32 bit architecture, my kernel is the following: kernel.c: void dummy_test_entrypoint() { } void main() { char* video_memory = (char*) 0xb8000; ...
Tedy koud's user avatar
0 votes
0 answers
47 views

signal SIGSEGV: address access protected in __run_exit_handlers

I'm trying to do a packer project for my school, it is made in C and ASM, and for the moment it is supposed to target only ELF files. I have managed to do my section injection, correctly align my new ...
Maxence Gama's user avatar
0 votes
0 answers
30 views

Why is my assembly code giving extra output? [duplicate]

Before I start, it's important to say I am a complete beginner to Assembly, so I might be missing something very obvious. I was trying to make an Assembly program where it prints the following output ...
Spyridon Manolidis's user avatar
0 votes
0 answers
18 views

Relocating a ELF in a freestanding env

Well I am making an OS and I want to make my Programs/Kernel elf's but I want them relocated so that I can protect programs more to memory editing. I did not yet try something because I don't know ...
lucas's user avatar
  • 19
0 votes
0 answers
32 views

Use linker on M1 macOS to link bash and C files to compile simple kernel

I am following this tutorial on M1 MacBook (macOS Sonoma 14.5): https://github.com/debashisbarman/Simple-Kernel-in-C-and-Assembly. The kernel should connect to C. I have following three files with the ...
user7289922's user avatar
0 votes
1 answer
30 views

readelf -R (--relocated-dump) option

Can anyone explain how the contents of a section are relocated using the -R option for readelf? I would like to see an example of this so I can understand how it works. When I build an executable ...
srek's user avatar
  • 3
0 votes
0 answers
60 views

Path to source file not being included in ELF file debug section

I am trying to develop a C++ application for the RTEMS RTOS but I am having trouble getting debugging to work. They have a basic LED blinky example written in C that I am able to debug. However, ...
embedded.kyle's user avatar
1 vote
0 answers
54 views

Unable to access mapped memory

Why can not access the memory after 0x010ff8 (gdb) br *0x0100e2 Breakpoint 1 at 0x100e2 (gdb) run ... Breakpoint 1, 0x00000000000100e2 in ?? () (gdb) info proc mappings process 2563326 Mapped address ...
ton's user avatar
  • 4,349
2 votes
1 answer
29 views

Why gcc-7.5.0 generate different relocation entry

I am studying elf relocation and note that in our school's container, compile the c file below: int sum(int *a, int n) { return a[0]+a[1]; } int array[2] = {1, 2}; int main() { int val = sum(...
季子墨's user avatar
7 votes
1 answer
579 views

The meaning of these 16 bytes in the `.data` segment

I wrote a C++ program (t.cc) that only has an empty main function: int main() { } I used g++ t.cc -o a.out to compile it into an executable program, and then used objdump --section=.data -s a.out to ...
fansure grin's user avatar
0 votes
1 answer
52 views

Troubleshooting Execution Failure of the musl-libc Shared Library

Problem Description I am currently working on a project involving shared library reconstruction (on a x64, Linux virtual machine), specifically targeting the musl-libc (verion: 1.1.15). After ...
Chibi Gwen's user avatar
0 votes
0 answers
29 views

How to get Type:FUNC and its name from a ELF file? [duplicate]

include <stdio.h> #include <stdlib.h> #include <elf.h> #include <string.h> #include <fcntl.h> int main(int argc, char *argv[]) { if (argc != 2) { fprintf(...
lala piggy's user avatar
0 votes
1 answer
42 views

Analyzing Relocations in ARM for cortex-m4

I'm trying to understand how to correctly read the relocation entries generated by my ARM compiler (I'm using (GNU Arm Embedded Toolchain 9-2020-q2-update) 9.3.1 20200408 (release)). To my ...
I.Y.A.L's user avatar

15 30 50 per page
1
2 3 4 5
159