Questions tagged [objcopy]
142 questions
0
votes
1 answer
Objcopy getting object file 64 bit binaries
I use objcopy on windows 10 to embed my dll inside an exe and load it. It runs fine with 32 bit compilation with a 32 bits binary dll file as i am getting no errors loading my dll.
objcopy --prefix-symbol=_ --input-target binary --output-target…

Ahmed Can Unbay
- 2,694
- 2
- 16
- 33
0
votes
1 answer
Problem while using objcopy with "thin archive" file
Please use following shell commands to reproduce the problem:
# create subdirectory
mkdir subdir
# create source files with dummy functions
echo 'void func1(){}' > file1.c
echo 'void func2(){}' > ./subdir/file2.c
# compiling sources into object…

lol lol
- 319
- 3
- 18
0
votes
1 answer
objcopy generate huge binary file (265M)
When trying to generate a binary file removing two text sections I end up with a huge binary file of 265M.
arm-none-eabi-objcopy -v -O binary --remove-section=.text_F3 --remove-section=.text_F4 file.axf out_file.bin
Has anybody has a clue why this…

maverick
- 31
- 4
0
votes
1 answer
Object file created by objcopy is not compatible
I have created an object file from a binary file using objcopy as below:
objcopy -I binary -O elf32-little --rename-section .data=.text file.bin file.o
In one of the linker script sections I have included the following to place that file into that…

maverick
- 31
- 4
0
votes
1 answer
objcopy for pic30/xc16 - where to find, analogs
I am working with a non-standalone project on PIC24 which requires a bootloader and I want to debug it with a bootloader. I am able to produce an .hex file that contains the application code with the bootloader, registering a custom script that…

Carry
- 11
- 1
0
votes
1 answer
cmake target created with custom_target fails
I am trying to add a custom target to my Cmake project, which will output .hex file out of .elf. Here is a piece of script I use:
....
set(EXECUTABLE_OUTPUT_PATH…

Peter V
- 71
- 4
0
votes
1 answer
Discard unused symbos from dlopen()'ed .so
I have a set of shared libraries (Intel MKL) that are only distributed in binary form. A top-level "runtime" library, libmkl_rt.so, links against my executable and is visible with ldd:
...
libmkl_rt.so => /var/task/lib/libmkl_rt.so…

thinkski
- 1,306
- 1
- 15
- 25
0
votes
1 answer
how to avoid objcopy blowing up the file?
I use objcopy to extract/replace some section is an ELF file on a windows system.
>objcopy.exe -V
GNU objcopy 2.17.50 20060824
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms…

Timothy Truckle
- 15,071
- 2
- 27
- 51
0
votes
1 answer
Is it possible to relocate a binary?
I have created a raw binary created from an elf file by using objcopy -o binary. Is it possible to relocate it by a given offset? I believe the effect that I'm searching for would be similar to use --change-addresses option and then convert it to…

josecm
- 413
- 3
- 15
0
votes
1 answer
GCC. Generate limited debug info
Is there a way to force gcc to generate only subset of full debug info that will be sufficient for addr2line utility? Or any way to strip unneeded? I've tried
$ objcopy --only-keep-debug --remove-section=.debug_loc --remove-section=.debug_aranges…

Sergio
- 8,099
- 2
- 26
- 52
0
votes
1 answer
SDL2/SDL_Image loading objcopy files
As stated on the topic, i'm using objcopy to load SDL_Image images with MinGW over Eclipse Helios for windows.
I'm using the command: objcopy --input-target binary --output-target pei-i386 --binary-architecture i386 Lilothyn.jpg Lilothyn.o
That…

Lilothyn
- 31
- 3
0
votes
0 answers
Creating an ARM flat pic binary
I would like to write a position relative code that includes data.
that means, a function that gets the absolute address of printf and prints a simple string.
I have managed to achieve this by compiling an ELF using arm-none-eabi-gcc with the…

ASmith
- 21
- 2
0
votes
0 answers
Compiling assembly code with absolute addressing using gas, ld, objcopy
I'm attempting to write some boot code for a MIPS Malta board, emulated in QEMU.
As I understand it, the Malta board loads 4MB of code from flash to a specific position in physical RAM (0x1fc00000, which is 0xbfc00000 in the MIPS program address…

Sacha
- 21
- 3
0
votes
1 answer
How to translate an lib build with g++ 2.96 to new BFD format?
I've a library file which was built using g++ version 2.96. The source code of the lib is not available and also there is no support from the original developer.
I want to link it with my application using the latest g++ version (say 4.x). As I…

Suleman Khalid
- 1
- 2
0
votes
1 answer
Editing object file on osx (cf objcopy)
How can I edit object files on osx?
For example, renaming or removing a symbol from an object file.
I've tried binutil's gobjcopy:
gobjcopy --strip-symbol some_symbol foo.o foo2.o
This seems to work but ld complains when linking foo2.o (it didn't…

timotheecour
- 3,104
- 3
- 26
- 29