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).
Questions tagged [binutils]
418 questions
6
votes
2 answers
Is there another version of the binutils for x86_64?
I am trying to install a cross-compiler following instructions that I found here. I am using the 64 bit version of Ubuntu 13.10. As soon as I entered the command to configure the binutils I get:
Configuring for a x86_64-unknown-linux-gnu host.…

Isaac D. Cohen
- 797
- 2
- 10
- 26
6
votes
1 answer
Can I include/import a single function from a library in C++
I only need to use the iequals case-insensitive string comparison function from the BOOST library.
I am using #include to import it.
Is there any way that I could only import the iequals function by itself?
The reason I…

Dr3vvn45ty
- 63
- 1
- 5
5
votes
3 answers
Can't seem to get gcc or binutils to build a new linker or assembler
I am trying to set up a completely recent and up to date gcc environment... basically gcc 4.6.3 and binutils 2.22. Not the fairly old gcc 4.2.1 (llvm) that comes with Xcode 4.2.1. My problem is not with compiling (for now, at least). I can compile…
user451498
5
votes
1 answer
How does compressed debug info flow between the assembler and linker under various combinations of debug info compression flags?
There are a number of flags around debug info compression in gcc and binutils. Here, I'm interested in the interplay between the following four flags in a standard sort of C++ project that creates a number of object files with the compiler and then…

acm
- 12,183
- 5
- 39
- 68
5
votes
1 answer
Linker: Moving all functions but two to a specific memory region
I am working on firmware for a PIC32MX microcontroller. The program memory should be split into three segments:
Section 1: interrupt service routine and main function (startup_region)
Section 2: 50% of remaining program memory (program1)
Section…

Danish
- 407
- 3
- 10
5
votes
1 answer
how to make small binaries using assembly?
I was writing some assembly code for some project of mine and I saw something interesting. the size of binary when linked is so big. so I tested and tested and even with smallest possible lines of code, output Elf binary is so large. for…

Amir H
- 482
- 4
- 10
5
votes
2 answers
What's the "correct" way to determine target and architecture for GNU binutils?
In my build chain, I need to do this:
objcopy -I binary -O $BFDNAME -B $BFDARCH
in order to get a binary file into library form. Because I want other people to be able to use this, I need to know how to get $BFDNAME and $BFDARCH from…

regularfry
- 3,248
- 2
- 21
- 27
5
votes
3 answers
Adding new instruction to RISCV-32ima: "bad RISCV-opcode"
I'm seeking for help concerning the extensions I'm trying to add to riscv.
GLOBAL SETTING
My working baseline is a clone of the riscv-tools repo, containing the usual tools, among which are:
riscv-fesvr
riscv-gnu-toolchain
riscv-isa-sim…

Lionel Morel
- 51
- 2
5
votes
1 answer
Extract a string variable from elf/obj file
I'm trying to extract a particular string variable (i.e. symbol) from a Linux program's elf file, or even from the .o it comes from.
It's in the .rodata section, and obviously I know the symbol name.
Is there a sequence of objdump-style commands and…

ColH
- 453
- 5
- 10
5
votes
2 answers
How to decide the base address for the location counter "." when VMA and LMA are different?
According to the ld manual on the special symbol ., i.e.the Location Counter.
Note: . actually refers to the byte offset from the start of the
current containing object. Normally this is the SECTIONS statement,
whose start address is 0, hence .…

smwikipedia
- 61,609
- 92
- 309
- 482
5
votes
2 answers
I've already installed binutils in osx 10.11, but objdump still doesn't work
I've tried hard to install binutil with HomeBrew onto osx 10.11, finally succeed, but objdump still doesn't work. The response given by terminal is as follow:
MacBook-Pro:~ Mars$ brew install binutils
==> Downloading…

Runyi Wang
- 121
- 2
- 4
5
votes
2 answers
Make error installing ruby gem json v1.8.3: BFD (GNU Binutils for Debian) 2.22 internal error
I see something that resembles a C compiler error when I try installing ruby gem json 1.8.3
Here's the command I'm running:
gem install json -v '1.8.3'
And my output is:
Building native extensions. This could take a while...
ERROR: Error…

Sergey Neskhodovskiy
- 382
- 1
- 13
5
votes
2 answers
Installing Tensorflow on centos 5
I'm trying to install Tensorflow on Centos 5.
Unfortunatelly, after having installed it with pip as explained in the official doc
sudo pip install --upgrade
…

Mario
- 99
- 1
- 10
5
votes
2 answers
objdump ELF and Windows
I am fairly new to this subject, that is ELF and any Linux related stuff. I am trying to write an ELF file and would prefer to do it on WinXP.
My question is, can this be done with MS Visual Studio including the compilation? As far as my…

jacib
- 55
- 1
- 6
5
votes
2 answers
Remove the path in objcopy symbol names
I need to include a binary program in my project. I use objcopy to create an object file from a binary file. The object file can be linked in my program. objcopy creates appropriate symbols to access the binary data.
Example
objcopy -I binary -O…

harper
- 13,345
- 8
- 56
- 105