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
258
questions
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 ...
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 ...
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 ...
-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 = ...
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 ...
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 << '\...
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. ...
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':...
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/...
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 ...
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 ...
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 ...
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 ...
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 ...
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/...