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
1 answer

pass -fcommon flag in CFLAGS for make

The build code of binutils: echo -e "${BLUE}===================== build gas && gold ===========================${NC}" echo if [ ! -f ${PWD_PATH}/succeed/binutils ]; then wget -c 'https://ftp.gnu.org/gnu/binutils/binutils-2.30.tar.xz' tar…
NobinPegasus
  • 545
  • 2
  • 16
0
votes
0 answers

/usr/local/bin/ld: error: symbols.o: multiple definition of 'jmp_table'

While building binutils gas and gold I'm facing the following error. I've changed the gcc versions namely gcc-7,gcc-8 and gcc-11 for several times. After that I'm facing this error. The code: echo -e "${BLUE}===================== build gas && gold…
NobinPegasus
  • 545
  • 2
  • 16
0
votes
0 answers

Linker error because `-Tdata` does not work as expected? `address 0x803e00 of section '.data' is not within region 'data'`

I am having the following problem when I try to compiler a simple test program for ATtiny424 with avr-gcc v8 (same with avr-gcc v13): C program simple.c: char x; int main (void) { x = 1; return 0; } avr-gcc does not support ATtiny424, so I…
emacs drives me nuts
  • 2,785
  • 13
  • 23
0
votes
0 answers

gold linker binutils [Makefile:16060: install-libsframe] Error 1

http://blog.binpang.me/2018/09/27/llvm-gold/ I was going through this resource and trying to build llvm gold. Download binutils source code git clone --depth 1 git://sourceware.org/git/binutils-gdb.git binutils Build binutils mkdir build cd…
NobinPegasus
  • 545
  • 2
  • 16
0
votes
1 answer

Syntax error when running configure in binutils

Was building a cross compiler from C to the i686 processor with the elf file structure. When I ran configure for binutils, it ran until creating config.status and gave the error: configure: creating ./config.status ./config.status: line 470: syntax…
aqsw
  • 3
  • 6
0
votes
2 answers

How do I generate asconfig.texi when compiling GNU binutils' gas from git cloned source?

I have cloned the binutils-gdb repository from git://sourceware.org/git/binutils-gdb.git, checked out the tag binutils-2_40 (commit 32778522c7d8777803c88684b8e428ee729f0b22), in a separate directory run ../../binutils-gdb/configure which generated a…
Adam Barnes
  • 2,922
  • 21
  • 27
0
votes
0 answers

Relocation R_X86_64_PC32: why value is x-4 instead of x?

Consider this code: int arr[4]; void foo(void) { arr[0] = arr[1]; } compiled and objdumped as: gcc t57.c -O3 -c && objdump -Dr t57.o leading to: 0000000000000000 : 0: f3 0f 1e fa endbr64 4: 8b 05 00 00 00 00 …
pmor
  • 5,392
  • 4
  • 17
  • 36
0
votes
0 answers

On Raspios 64-bit when building openssl-1.1.1n getting error ar: no operation specified

During compilation of openssl-1.1.1n under Linux cognavision 5.10.103-v8+ #1529 SMP PREEMPT Tue Mar 8 12:26:46 GMT 2022 aarch64 GNU/Linux with newest wersion (2.31.1-16) of binutils I was expecting this to build as per openssl installation…
topquant
  • 11
  • 2
0
votes
1 answer

GNU LD: Override funtions in static library

I have the following problem: In some commercial project (ARM Cortex-M), we have pre-compiled libraries from a supplier. The library contains code from different suppliers; some library functions use the standard malloc() function call, while others…
Martin Rosenau
  • 17,897
  • 3
  • 19
  • 38
0
votes
1 answer

AVR gcc build produces non-working compiler

I'm trying to build binutils-2.39 and gcc-7.5.0 following the instruction here: https://www.nongnu.org/avr-libc/user-manual/install_tools.html These instructions have worked for me in the past. However with the above versions at least I get a…
Britton Kerin
  • 427
  • 4
  • 9
0
votes
1 answer

how to set flag EXEC_P in elf file

I make an elf file from an intel-hex file using riscv64-unknown-elf-objcopy. exact command: riscv64-unknown-elf-objcopy -O elf32-littleriscv --set-start 0x10000000 --rename-section .sec1=.text image32.ihex image32.elf the result looks like this: $…
acapola
  • 1,078
  • 1
  • 12
  • 23
0
votes
0 answers

Indirect reading of content of symbols in elf file with binutils?

I can only provide an example for this for Raspberry Pi Pico - therefore ARM - but I hope this question can also be answered generally in terms of gcc and .elf files. When programming for the Pico, the pico-sdk contains macros like bi_decl and…
sdbbs
  • 4,270
  • 5
  • 32
  • 87
0
votes
0 answers

objdump giving no output

Does objdump require some information embedded in an executable that may be stripped by a compiler or something? I tried using it on an executable on Linux and this is the only output I get objdump -D foo foo: file format elf64-x86-64
Liam Clink
  • 189
  • 1
  • 11
0
votes
1 answer

Compiler error while cross compiling gnu binutils 2.7 for ppc

This is the Error I get: /usr/bin/powerpc-linux-gnu-gcc -c -DDEFAULT_VECTOR=bfd_elf32_powerpc_vec…
0
votes
1 answer

Compiling binutils 3.8 for AVR give systax errors in gnu code

I am trying to setup my development toolchain for AVR in Debian Linux, from source donwloaded directly from gnu.org, latest versions. I am stocked in this step: #./configure --target-avr --program-prefix='avr-' # make Configure terminates well…