Questions tagged [objcopy]
142 questions
0
votes
1 answer
How to retrieve flat binary from an executable file in C
How to retrieve a block of binary from .text section in an executable?
I know objcopy can help by using:
objcopy --only-section=.text --output-target binary a.out a.out.bin
But it would be much better if I can realize the same goal within a…

zhoubot
- 1
- 1
0
votes
0 answers
how to convert .obj to to .coff (in cygwin platform)
Facing problem to convert .obj to .coff file using objcopy command.
Currently i am trying to solve this issue by using OBJCOPY Command.
i tried Command objcopy -I input.O -O output.
output which will be get converted to COFF format and input is in…

pseudoboom
- 11
- 1
0
votes
1 answer
Is there any command similar to objcopy which can remove symbol from shared objects files?
Is there any command similar to objcopy which can remove symbol from shared objects files on linux platform ?

Chandu
- 1,837
- 7
- 30
- 51
0
votes
1 answer
how to stop objcopy from padding sections
I'm using objcopy on bash (ubuntu linux) and im trying to copy 2 sections from an ELF file using the folowing commend:
objcopy -j .section1 -j .section2
The problem is the objcopy is adding some padding between the sections. Is there a way (a…

Jah
- 1,019
- 1
- 11
- 25
-1
votes
2 answers
Conversion from .elf to .bin increases file size
When we covert a .elf file generated from arm-gcc toolchain to .bin file, its size increases from 40kB to 1.1Gb.
For conversion we are using :
./arm-none-eabi-objcopy -O binary test.elf test.bin
It might be because of non-contiguous memory map and…

dfordevy
- 161
- 1
- 15
-1
votes
1 answer
C program to open binary elf files, read from them, and print them out (like objcopy)
I am trying to implement a functionality similar to objcopy where bytes of a binary file (specifically the .text section) will be printed out using open() and read(). How would I set the buffer sizes and iterate till the end of a .text section so…

Aaron Li
- 89
- 10
-5
votes
1 answer
What is the difference between executable files?
I have the following C program:
#include
int main()
{
printf("hhhh");
return 0;
}
Commands to compile, copy and compare:
$ gcc print.c -o a.out
$ objcopy a.out b.out
$ cmp a.out b.out
I have compiled this program and created an…

Akshay
- 159
- 1
- 9