Questions tagged [binutils]
The GNU binary utilities. A collection of tools for operating on object files. Most notably they include the GNU assembler and linker. They are typically used in conjunction with the GNU compiler collection (GCC).
binutils
424
questions
0
votes
1
answer
35
views
Minimum requirements of GCC towards a new target ISA
I'm porting the GCC and Binutils to a unique (really simple) 8-bit RISC soft processor.
I would like to be able to execute 16 and 32 bit arithmetics. The current ISA is probably not sufficient yet for ...
3
votes
1
answer
122
views
Data Integrity Issue with Custom .rawdata Section in Linker Script
I'm working on an embedded project using an ARM Cortex-M4 processor (specifically, an STM32F4 microcontroller) and I've encountered a peculiar issue related to memory sections defined in my linker ...
0
votes
0
answers
30
views
no sections assigned to phdrs
Since some month I'm trying to understand of sections header works. From what I've understood sections headers are a part of the elf file (so it is data) that contains information regroup under these ...
1
vote
1
answer
28
views
Binutils objdump reports incorrect section sizes in COFF object
It looks like that the objdump tool (part of GNU Binutils) on Linux displays the section sizes of a COFF object file incorrectly. For example, the size of the .bss section should be 0x130, but objdump ...
0
votes
0
answers
38
views
"Config.guess failed to determine the host type" when trying build binutils-2.7 with Cygwin
I'm trying to build binutils-2.7 and gcc with Cygwin while following https://wiki.osdev.org/GCC_Cross-Compiler. Everytime I run:
../binutils-2.7/configure --target=i386-elf --prefix="/home/jacki&...
0
votes
0
answers
34
views
Building binutils in cygwin error on 'make' command
I use the cygwin to build the binutils for my platform. I followed the GCC-Cross-Compiler article and stack on 'make' command. The command i used:
export PREFIX="$HOME/opt/cross"
../...
0
votes
0
answers
103
views
How to call printf from x86/32 GNU assembler?
I have written a small x86/32 assembler program that calls printf and gets compiled with gcc -m32 x.s:
.data
format:
.string "%d\n"
.text
.global main
.type main, @...
0
votes
2
answers
181
views
How to specify symbol name when creating objects from raw binary files using objcopy?
As described in this answer, GNU objcopy can be used to create object files from arbitrary file content. This method can be used to embed resources into programs. However, the symbol name is generated ...
1
vote
1
answer
71
views
how to decompose elf file size into different size of sections or symbols?
I want to know each symbol's size in elf executable or dynamic library and I assume the total symble size and other stuff's size can add up to the file size.
From size command I can see all section ...
0
votes
0
answers
177
views
How to link SYSV and GNU/Linux shared libs
file /usr/lib/aarch64-linux-gnu/libavcodec-ffmpeg.so.56.60.100
/usr/lib/aarch64-linux-gnu/libavcodec-ffmpeg.so.56.60.100: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically ...
4
votes
1
answer
694
views
How to handle the "relocation R_X86_64_PC32 against protected symbol" when writing shared objects in assembly?
I am writing an object file in assembly language to be included in a shared object. I am using the GNU toolchain, and my target is x86_64-pc-linux-gnu. Please consider the following (example) source:...
1
vote
0
answers
52
views
Running .s file with yasm
I want start learning Assembly. But, there is a problem. I can't run my file.
I tried to use yasm file.s -o run and after ./run, but I see this:
bash: ./run: Permission denied
After, I searched and ...
0
votes
0
answers
23
views
What's the meaning for "-z" ld command line option
The ld doc shows that some of the options are prefixed with -z:
-z keyword
The recognized keywords are:
‘call-nop=prefix-addr’
‘call-nop=suffix-nop’
‘call-nop=prefix-byte’
‘call-nop=suffix-...
0
votes
0
answers
354
views
makeinfo: loadable library and perl binaries are mismatched
I recently upgraded Ubuntu on my system to version 22.04.3 LTS (Jammy Jellyfish) which broke my cross-compiler toolchain, which consists of binutils and gcc configured for the i686 architecture.
...
1
vote
1
answer
2k
views
Objdump for ARM64 Architecture
I’ve encountered this error in Ubuntu with ARM64 (aarch64) architecture where Objdump doesnt wan’t to run.
The error message for the following command «objdump -d filename»:
filename: file format ...