Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] Shifted binary produced by arm-none-eabi-objcopy

Status
Not open for further replies.

en2

Newbie level 1
Newbie level 1
Joined
Aug 2, 2019
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12
Greetings,

Im currently trying to fix a strange behavior of objcopy, which sometimes generates invalid output binary image with 0x4 byte shift.

I found this issue because this shift was affecting my __init_array_start__ table (which is indeed pointing to right address in *.axf file, but after shift in binary file, its payload is gets corrupted - 1 pointer is 0x4 before desired table, and last item becomes null) - hard debugging week unfortunately :)

Here are the dumps produced by readelf and xxd:

Orginal __init_array_start__ symbol from *.axf file (symbol point to 0x00085a80)

symbol.png
https://ibb.co/q75t9x4

Valid code payload from *.axf file (note that first entry is at correct 0x00085a80 address)

axf.png
https://ibb.co/wQ93JCd

Invalid payload from *.bin file (note that first entry is at invalid 0x00085a7c address)

bin.png
https://ibb.co/vdxS2H3

Im converting *.axf to *.bin with:

Code:
arm-none-eabi-objcopy -O binary binary/executable.axf binary/executable.bin
Is it a bug, or im missing something ?



Best,

Ernest
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top