objcopy to srec format have address problem

Bug #1635100 reported by Hake Huang

This bug report was converted into a question: question #403853: objcopy to srec format have address problem.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
Invalid
Undecided
Unassigned

Bug Description

I use armgcc version of
gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977] (GNU Tools for ARM Embedded Processors)

and I compile resule as attached elf file.

and I use the arm-none-eabi-objcopy do convert the elf to srec format the command line is
arm-none-eabi-objcopy --srec-forceS3 -O srec hello_world.elf hello_world.srec

and the result is different from the result I convert with fromelf from MDK

and I use the readelf to check the elf file, the result is correct, there is the text and data segment information

Tags: objcopy
Revision history for this message
Hake Huang (hakehuang) wrote :
Revision history for this message
Thomas Preud'homme (thomas-preudhomme) wrote :

Hi Hake,

I'm afraid I'm not familiar with SREC format. Could you explain us how to interpret the content of the SREC files and what does the difference means?

Revision history for this message
Hake Huang (hakehuang) wrote :

Hi Thomas,

please check below link.
https://en.wikipedia.org/wiki/SREC_(file_format)

Regards,

Revision history for this message
Hake Huang (hakehuang) wrote :

the differences means from the same elf file, the objcopy phase a wrong base address for each S3. while the formelf is correct.

Revision history for this message
Hake Huang (hakehuang) wrote :

does anyone response for this?

Changed in gcc-arm-embedded:
status: New → Invalid
Revision history for this message
Hake Huang (hakehuang) wrote :

seems unbunto-one team can not resolve this, I need check with GCC team instead

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.