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).

418 questions
0
votes
0 answers

using the make command for a minimalOS from a gcc and binutils setup

I have a kernel.c file that I have edited but then when I go back to run make before I would then run the make run command I get this error. linux error lines I'm not very clued up in any of this but I don't understand why changes in my c file have…
0
votes
0 answers

elfutils build error on mac: configure: error: __thread support required

Instructions to repro: $ git clone --depth=1 git://sourceware.org/git/elfutils.git $ cd elfutils $ autoreconf -i -f $ ./configure Error log: ... checking whether the compiler generates build-ids... ./configure: line 6951: -n: command not…
A. K.
  • 34,395
  • 15
  • 52
  • 89
0
votes
0 answers

yocto build libiberty.h missing for linux 5.10

We are using yocto-sumo and trying to update our current linux 4.19.1 to 5.10 for various reasons, I've created a new defconfig and updated the linux-recipe. Using bitbake gives me the following error: ERROR: linux-apa-4.19.1-r0 do_compile:…
DK999
  • 3
  • 1
0
votes
1 answer

Error: invalid operands (*UND* and *UND* sections) for `%'

This cppreference example fails with Error: invalid operands (*UND* and *UND* sections) for %'` on g++ 11.1.0 on my Archlinux box, but not on coliru. Why? The file name is _1h6.cpp: $ g++ _1h6.cpp -S && as _1h6.s # same error as g++ _1h6.cpp _1h6.s:…
Roland Puntaier
  • 3,250
  • 30
  • 35
0
votes
1 answer

Is there a way to create a a stripped binary with correct offsets?

I'm attempting to convert an assembly file to C++ for use as a small and easy to insert "trampoline" loader for another library. It is injected into another program at runtime, then loads a library, runs a function inside of it, and frees it. This…
the4naves
  • 333
  • 2
  • 9
0
votes
1 answer

Error cross-compiling binutils-gdb for windows

I cloned binutils-gdb repository from here (master branch) on a linux machine (Ubuntu) and I want to compile it for Windows (using x86_64_w64_mingw32 toolchain). First, I ran ./configure with the following options to specify the cross-compile…
Stepii
  • 142
  • 3
  • 10
0
votes
0 answers

How do I disable ASLR for heap addresses for a program compiled and linked with mingw-w64 GCC?

Problem I am using mingw-w64 GCC to compile and link a C program on Windows 10 Home, build 1809 (I know it's old--long story). I want to disable Address Space Layout Randomization (ASLR) so my heap addresses do not change from run to run while…
Scott McPeak
  • 8,803
  • 2
  • 40
  • 79
0
votes
1 answer

Why does arm-none-eabi-ld align program headers to 64KiB when linking? How do I change it?

Consider the following program and the corresponding linker script: // file: foo.c int foo = 42; /* file: link.x */ SECTIONS { .data : { *(.data) } /DISCARD/ : { *(*) } } Now I build and link as follows: $ arm-none-eabi-gcc -c foo.c $…
asynts
  • 2,213
  • 2
  • 21
  • 35
0
votes
2 answers

How do I install x86_64-elf-ld on ubuntu 20.04?

I am trying to write an OS kernel and I need a certain dependency for compiling the assembly to an iso binary. The dependency is x86_64-elf-ld. I cannot find any resources for installing it on ubuntu online so I thought I would ask the internet.
Lambda Banquo
  • 81
  • 1
  • 5
0
votes
1 answer

How do I build a newlib RISC-V toolchain with a modified linker script?

I'm trying to build a GCC/newlib cross compilation toolchain targeting an embedded OS on RISC-V. For this purpose, I need to modify the virtual addresses that binaries are linked at. One way to achieve this is to modify the default linker script…
Julian Stecklina
  • 1,271
  • 1
  • 10
  • 24
0
votes
1 answer

Building binutils with debugging mode

I'm trying to build binutils 2.21 source code with debugging on. My main aim is to debug objdump actually. But in order to build it I think I have to build whole package. Unfortunately there is no debugging option on the configure file. I tried…
Halil
  • 2,076
  • 1
  • 22
  • 30
0
votes
1 answer

How to identify an array defined in a shared library?

I'm dealing with an old proprietary shared library -- no source code. The binary contains lots of symbols (thousands), among them an array of character strings I need (several hundred strings). I know, it is there, because strings(1) lists them all…
Mikhail T.
  • 3,043
  • 3
  • 29
  • 46
0
votes
2 answers

nm: command not found despite latest binutils installed Ubuntu 20.04

I'm trying to build GCC from source, and when I tried to configure gmp 4.3.2 using ./configure --prefix=/tmp/gcc, I get the following error message checking if globals are prefixed by underscore... ./configure: line 30083: nm: command not…
0
votes
0 answers

Difference between llvm-as and binutils-as, naming of variables

I try to assemble an example test.s: .file "test.c" .text .globl f .type f, @function f: .LFB0: .cfi_startproc movl $"A,B", %eax ret .cfi_endproc .LFE0: .size f, .-f …
Павел
  • 113
  • 7
0
votes
0 answers

How to build old version of GCC and BINUTILS?

I need to build GCC 3.1.1 and BINUTILS 2.13.1 because they support FreeBSD 1 executable format. Unfortunately, while building an old version of BINUTILS with the current version of GCC (10.2.0) I get a lot of errors. What flags do I need to pass to…
yomol777
  • 463
  • 4
  • 16