Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [relocation]

Relocation is the adaptation of a piece of code assembled on a certain address in memory to another address It is a typical task of dynamic linkers and program loaders, and thus last step in a standard development toolchain.

relocation
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
0 votes
0 answers
13 views

Code addresses in DWARF v1 should be relocated but aren't

I'm looking at an ELF file built for MIPS targeting (I think) PlayStation. It has DWARFv1 debug info. The ELF type is ET_EXEC. There are two segments defined in the program header table, with p_vaddr ...
Seva Alekseyev's user avatar
2 votes
0 answers
54 views

relative address instead of absolute address in the relocation table

In the context of compiler optimization and linker behavior, I'm trying to understand the implications of using relative addresses instead of absolute addresses in the relocation table during the ...
Alfa Hores's user avatar
-1 votes
2 answers
62 views

How to str_detect a pattern in the pipe to relocate columns

I am struggling to relocate the descriptive statistics columns close to the original columns iris2 <- iris %>% dplyr::select(c(2:4)) %>% dplyr::mutate(across(.cols = where(is.numeric), .fns = ...
Javier Hernando's user avatar
0 votes
0 answers
14 views

Managing Relocation Order Dependencies in ELF Shared Libraries [duplicate]

When you link an application let's call it main_program with a shared library message_library on a Linux device, there's a scenario to consider. This shared library contains a global variable message ...
K.D.Dilshan's user avatar
18 votes
1 answer
2k views

Where is the order in which ELF relocations are applied specified?

Consider the following two files on a Linux system: use_message.cpp #include <iostream> extern const char* message; void print_message(); int main() { std::cout << message << '\...
TartanLlama's user avatar
  • 65.1k
3 votes
0 answers
61 views

Different behaviour of multiple ELF relocations on i386 and x86-64

Per the System V gABI, If multiple consecutive relocation records are applied to the same relocation location (r_offset), they are composed instead of being applied independently, as described above. ...
Alex Shpilkin's user avatar
0 votes
0 answers
86 views

"relocation truncated to fit" error in riscv-tests

I am currently trying the multithreading tests in the mt folder of risc-tests. I gave the make command to compile the tests, but I am facing an error as shown below : mt-vvadd.o: in function `barrier':...
Megna Premkumar's user avatar
0 votes
0 answers
61 views

How to read .llvm_addrsig section from relocatable object file or an ELF?

I have got a vague idea about what .llvm_addrsig section is from this post and linker use this to prevent ICF.. https://discourse.llvm.org/t/problems-with-mach-o-address-significance-table-generation/...
Kishan Parmar's user avatar
3 votes
1 answer
94 views

Handling DWARF-5 relocations in a custom ELF loader

I'm building a custom ELF object loader which resolves the library dependencies (DT_NEEDED) and recursively loads those, performs relocations and symbol resolution, calls preinit, etc. ld.so is ...
Cyan Ogilvie's user avatar
1 vote
0 answers
143 views

How to resolve Duplicate class error with relocation e/ou shadow?

I'm writing a react-native package. This package has two libraries added manually. As you can see from the error, both implement the package com.realsil.sdk.* I can't contact the library developer to ...
Joao Victor Simonassi Farias's user avatar
1 vote
0 answers
72 views

Why compiler point to global variable using [rip+0x00]

I am new to compiler, and I am trying to understand why the compiler emit this code. I have this very simple C code // main.c int b = 7; int main(){ int a = 5 + b; return 0; } I compiled ...
kunquan's user avatar
  • 1,257
2 votes
1 answer
95 views

Compilation from .c files vs precompiling object files and linking them separately

I am trying to build a simple hello world program I have written for the riscv64 architecture and run it with qemu. That works as long as I compile specific files as .c files in the main gcc ...
patvax's user avatar
  • 514
0 votes
1 answer
48 views

Include&relocate maven dependency in another module java

I have a multi module maven project which I build with maven's shade plugin. I have a module called "distribution" which includes all the other modules and then builds. My problem is that I ...
Nandor Dukat's user avatar
5 votes
1 answer
221 views

Calculation of relative offset in small code model

I am trying to understand the RIP relative offset used in small-code model. Perhaps the only approachable resource on the internet on this topic is: https://eli.thegreenplace.net/2012/01/03/...
Ricky's user avatar
  • 695

15 30 50 per page
1
2 3 4 5
18